/**
 * MY MOBİ - AI Odanda Gör Stüdyosu Stilleri
 * Modern, Lüks ve Sadeleştirilmiş Referans-Prompt Mimarisi
 */

.ai-modal-card {
  background: #0f172a;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 20px;
  width: 1180px;
  max-width: 96vw;
  height: 720px;
  max-height: 92vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.8), 0 0 40px rgba(197, 155, 109, 0.15);
  overflow: hidden;
  color: #f8fafc;
  font-family: 'Outfit', -apple-system, sans-serif;
  animation: aiModalPop 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes aiModalPop {
  0% { transform: scale(0.95); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

/* HEADER */
.ai-modal-header {
  padding: 16px 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(15, 23, 42, 0.7);
}

.ai-modal-title {
  display: flex;
  align-items: center;
  gap: 14px;
}

.ai-badge-icon {
  font-size: 26px;
  background: rgba(197, 155, 109, 0.2);
  border: 1px solid rgba(197, 155, 109, 0.4);
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
}

.ai-modal-title h3 {
  margin: 0;
  font-size: 17px;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: -0.2px;
}

.ai-modal-title p {
  margin: 2px 0 0;
  font-size: 12px;
  color: #94a3b8;
}

.ai-close-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #94a3b8;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  font-size: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
}

.ai-close-btn:hover {
  background: rgba(239, 68, 68, 0.2);
  color: #f87171;
  border-color: rgba(239, 68, 68, 0.4);
}

/* BODY */
.ai-modal-body {
  display: flex;
  flex: 1;
  overflow: hidden;
}

/* SIDEBAR */
.ai-sidebar {
  width: 340px;
  padding: 20px;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(15, 23, 42, 0.5);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.ai-step-box {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  font-size: 13px;
  color: #e2e8f0;
}

.ai-step-num {
  background: #c59b6d;
  color: #0f172a;
  width: 20px;
  height: 20px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 800;
}

.ai-upload-area {
  border: 2px dashed rgba(197, 155, 109, 0.4);
  background: rgba(197, 155, 109, 0.05);
  border-radius: 14px;
  padding: 16px 12px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
}

.ai-upload-area:hover {
  border-color: #c59b6d;
  background: rgba(197, 155, 109, 0.1);
}

.ai-upload-icon {
  font-size: 28px;
  margin-bottom: 4px;
}

.ai-upload-text {
  font-size: 13px;
  font-weight: 700;
  color: #ffffff;
}

.ai-upload-subtext {
  font-size: 11px;
  color: #94a3b8;
  margin-top: 4px;
  line-height: 1.3;
}

.ai-sample-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}

.ai-sample-grid img {
  width: 100%;
  height: 52px;
  object-fit: cover;
  border-radius: 8px;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all 0.2s;
}

.ai-sample-grid img:hover {
  border-color: #c59b6d;
  transform: scale(1.04);
}

.ai-selected-product-card {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 10px;
}

.ai-selected-product-card img {
  width: 64px;
  height: 64px;
  object-fit: contain;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 8px;
  padding: 4px;
}

.ai-selected-product-info h4 {
  margin: 0 0 4px;
  font-size: 13px;
  font-weight: 700;
  color: #ffffff;
}

.ai-selected-product-info p {
  margin: 0;
  font-size: 11px;
  color: #94a3b8;
  line-height: 1.3;
}

.ai-prompt-box {
  margin-top: 4px;
}

.ai-select-input {
  width: 100%;
  background: #1e293b;
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #f8fafc;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 12.5px;
  font-family: inherit;
  outline: none;
  cursor: pointer;
}

.ai-select-input:focus {
  border-color: #c59b6d;
}

.ai-render-btn {
  width: 100%;
  background: linear-gradient(135deg, #c59b6d 0%, #a87d4f 100%);
  color: #0f172a;
  border: none;
  border-radius: 12px;
  padding: 14px 16px;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 10px 25px rgba(197, 155, 109, 0.3);
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.ai-render-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 30px rgba(197, 155, 109, 0.45);
}

/* STAGE */
.ai-stage {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: #020617;
  position: relative;
  overflow: hidden;
}

.ai-stage-header {
  padding: 12px 20px;
  background: rgba(0, 0, 0, 0.4);
  font-size: 12px;
  color: #94a3b8;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.ai-stage-body {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  position: relative;
  overflow: hidden;
}

/* INITIAL PREVIEW STAGE */
.ai-preview-stage {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ai-preview-stage img {
  max-width: 100%;
  max-height: 100%;
  border-radius: 14px;
  object-fit: cover;
  box-shadow: 0 15px 40px rgba(0,0,0,0.6);
}

.ai-initial-overlay-badge {
  position: absolute;
  bottom: 24px;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(10px);
  padding: 10px 20px;
  border-radius: 30px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  font-size: 12.5px;
  color: #e2e8f0;
  box-shadow: 0 8px 20px rgba(0,0,0,0.5);
}

/* BEFORE / AFTER SPLIT SLIDER */
.ai-before-after-wrap {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 15px 40px rgba(0,0,0,0.6);
  user-select: none;
}

.ai-ba-img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ai-ba-img-before-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 50%;
  height: 100%;
  overflow: hidden;
  z-index: 2;
  border-right: 2px solid #ffffff;
}

.ai-ba-img-before-container .before-img {
  max-width: none;
  height: 100%;
  object-fit: cover;
}

.ai-slider-handle {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 4px;
  z-index: 10;
  cursor: ew-resize;
  transform: translateX(-50%);
}

.ai-slider-line {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 1px;
  width: 2px;
  background: #ffffff;
  box-shadow: 0 0 8px rgba(0,0,0,0.5);
}

.ai-slider-button {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 40px;
  height: 40px;
  background: #ffffff;
  color: #0f172a;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 800;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
}

.ai-ba-badge {
  position: absolute;
  top: 16px;
  padding: 6px 14px;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(8px);
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.15);
  z-index: 5;
}

.badge-before { left: 16px; }
.badge-after { right: 16px; border-color: rgba(197, 155, 109, 0.4); color: #c59b6d; }

/* LOADING OVERLAY */
.ai-loading-overlay {
  position: absolute;
  inset: 0;
  background: rgba(10, 15, 29, 0.92);
  backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 20;
}

.ai-loading-box {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  padding: 30px 40px;
  text-align: center;
  max-width: 440px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
}

.ai-spinner {
  width: 50px;
  height: 50px;
  border: 4px solid rgba(197, 155, 109, 0.2);
  border-top-color: #c59b6d;
  border-radius: 50%;
  margin: 0 auto 16px;
  animation: aiSpin 0.9s linear infinite;
}

@keyframes aiSpin {
  to { transform: rotate(360deg); }
}

.ai-loading-box h4 {
  margin: 0 0 6px;
  font-size: 16px;
  font-weight: 700;
  color: #ffffff;
}

.ai-loading-box p {
  margin: 0 0 16px;
  font-size: 12px;
  color: #94a3b8;
}

.ai-progress-bar {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  overflow: hidden;
}

.ai-progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #c59b6d, #f59e0b);
  transition: width 0.3s ease;
}

/* RESULT ACTION BAR */
.ai-result-action-bar {
  padding: 12px 20px;
  background: rgba(15, 23, 42, 0.9);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.ai-act-btn {
  padding: 9px 16px;
  border-radius: 10px;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
}

.btn-retry {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #e2e8f0;
}

.btn-retry:hover {
  background: rgba(255, 255, 255, 0.14);
}

.btn-new-photo {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #e2e8f0;
}

.btn-download {
  background: #c59b6d;
  border: none;
  color: #0f172a;
}

.btn-download:hover {
  background: #d4ac7d;
}

/* RESPONSIVE */
@media (max-width: 900px) {
  .ai-modal-card {
    height: 95vh;
  }
  .ai-modal-body {
    flex-direction: column;
  }
  .ai-sidebar {
    width: 100%;
    max-height: 280px;
    border-right: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  }
}
