/* ==========================================================================
   IN-ROOM PREVIEW (VER EN TU ESPACIO) STYLES
   ========================================================================== */

.room-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(8, 9, 11, 0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s var(--ease-gallery);
  padding: 1.5rem;
}

.room-modal-backdrop.active {
  opacity: 1;
  pointer-events: auto;
}

.room-modal-container {
  width: 100%;
  max-width: 1240px;
  height: 90vh;
  max-height: 840px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.8);
  position: relative;
}

/* Header Bar */
.room-modal-header {
  padding: 1.25rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-subtle);
  background: var(--bg-card);
}

.room-header-title h3 {
  font-size: 1.4rem;
  color: var(--accent-bone);
}

.room-header-title p {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.btn-close-room {
  background: #0e1014;
  border: 1.5px solid var(--accent-gold);
  color: var(--accent-bone);
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.25s;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.8), 0 0 10px rgba(212, 175, 55, 0.3);
  -webkit-tap-highlight-color: transparent;
}

.btn-close-room:hover {
  background: var(--accent-gold);
  color: #0c0d0f;
  border-color: var(--accent-gold);
  transform: scale(1.08);
}

.btn-close-room:active {
  transform: scale(0.94);
}

/* Main Visualizer Stage */
.room-stage-area {
  flex: 1;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #f4efe8;
}

.room-bg-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 1;
  pointer-events: none;
  transition: opacity 0.5s;
}

/* Wall Tint Overlay for testing paint colors */
.room-wall-tint {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 60%;
  mix-blend-mode: multiply;
  z-index: 2;
  pointer-events: none;
  opacity: 0.85;
  transition: background-color 0.4s ease;
}

/* Artwork On Wall Element */
.artwork-on-wall-container {
  position: absolute;
  top: 32%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 5;
  transition: all 0.4s var(--ease-gallery);
  cursor: grab;
}

.artwork-on-wall-container:active {
  cursor: grabbing;
}

.artwork-on-wall {
  position: relative;
  background: #fff;
  transition: all 0.3s;
  box-shadow: 0 25px 40px -10px rgba(0, 0, 0, 0.65), 0 0 15px rgba(0,0,0,0.3);
}

/* Frame Variations */
.artwork-on-wall.frame-none {
  border: 4px solid #111;
  box-shadow: 0 15px 30px rgba(0,0,0,0.5);
}

.artwork-on-wall.frame-oak {
  border: 12px solid #bda282;
  box-shadow: 0 20px 45px rgba(0,0,0,0.6), inset 0 0 10px rgba(0,0,0,0.2);
}

.artwork-on-wall.frame-black {
  border: 12px solid #1a1a1a;
  box-shadow: 0 20px 45px rgba(0,0,0,0.65);
}

.artwork-on-wall img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Real Dimensions Pill underneath painting */
.artwork-dimension-tag {
  position: absolute;
  bottom: -32px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(12, 13, 15, 0.8);
  backdrop-filter: blur(8px);
  color: var(--accent-bone);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  padding: 3px 10px;
  border-radius: 12px;
  border: 1px solid var(--border-subtle);
  white-space: nowrap;
  pointer-events: none;
}

/* Controls Toolstrip */
.room-controls-bar {
  padding: 1.25rem 2rem;
  background: var(--bg-card);
  border-top: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.room-control-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.room-control-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  font-weight: 600;
}

/* Color Swatches */
.wall-color-swatches {
  display: flex;
  gap: 0.5rem;
}

.color-swatch-btn {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.2s, border-color 0.2s;
}

.color-swatch-btn:hover {
  transform: scale(1.15);
}

.color-swatch-btn.active {
  border-color: var(--accent-gold);
  transform: scale(1.15);
  box-shadow: 0 0 10px rgba(212, 175, 55, 0.5);
}

/* Environment & Frame Switch Buttons */
.btn-toggle-group {
  display: flex;
  background: rgba(255, 255, 255, 0.05);
  padding: 3px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
}

.btn-toggle-option {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 0.76rem;
  padding: 5px 12px;
  border-radius: 2px;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-toggle-option.active {
  background: var(--accent-gold);
  color: #0c0d0f;
  font-weight: 600;
}

@media (max-width: 850px) {
  .room-modal-container {
    height: 95vh;
  }
  .room-controls-bar {
    padding: 1rem;
    gap: 1rem;
  }
}
