/* ============================================================
   KKAeAL BUILDER MODAL
   ------------------------------------------------------------
   깨봇 AI 생성 서비스 모달 전용 CSS

   파일:
   /assets/css/ai_builder_modal.css
   ============================================================ */

/* ============================================================
   HIDDEN
   ============================================================ */

.ai-builder-modal[hidden] {
  display: none !important;
}

/* ============================================================
   MODAL ROOT
   ============================================================ */

.ai-builder-modal {
  position: fixed;

  inset: 0;

  z-index: 10000;

  display: flex;

  align-items: center;
  justify-content: center;

  padding: 28px;
}

/* ============================================================
   BACKDROP
   ============================================================ */

.ai-builder-modal-backdrop {
  position: absolute;

  inset: 0;

  background: rgba(15, 18, 27, 0.72);

  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
}

/* ============================================================
   PANEL
   ============================================================ */

.ai-builder-modal-panel {
  position: relative;

  z-index: 1;

  width: min(1120px, calc(100vw - 56px));

  height: min(860px, calc(100vh - 56px));

  min-height: 480px;

  display: flex;

  flex-direction: column;

  overflow: hidden;

  border: 1px solid rgba(255, 255, 255, 0.14);

  border-radius: 18px;

  background: #ffffff;

  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.32);
}

/* ============================================================
   HEADER
   ============================================================ */

.ai-builder-modal-head {
  min-height: 64px;

  flex: 0 0 auto;

  display: flex;

  align-items: center;
  justify-content: space-between;

  gap: 18px;

  padding: 11px 15px 11px 18px;

  border-bottom: 1px solid #e8e8e4;

  background: #ffffff;
}

.ai-builder-modal-heading {
  min-width: 0;
}

.ai-builder-modal-kicker {
  display: block;

  margin-bottom: 2px;

  color: #7a7d74;

  font-size: 8px;
  font-weight: 800;

  letter-spacing: 0.35px;
}

.ai-builder-modal-title {
  margin: 0;

  overflow: hidden;

  color: #22231f;

  font-size: 17px;
  font-weight: 900;

  line-height: 1.3;

  letter-spacing: -0.45px;

  text-overflow: ellipsis;

  white-space: nowrap;
}

/* ============================================================
   CLOSE BUTTON
   ============================================================ */

.ai-builder-modal-close {
  width: 34px;
  height: 34px;

  flex: 0 0 34px;

  display: flex;

  align-items: center;
  justify-content: center;

  padding: 0;

  border: 1px solid #e0e0db;

  border-radius: 10px;

  background: #f5f5f1;

  color: #666860;

  font-size: 12px;

  line-height: 1;

  cursor: pointer;

  transition:
    background 0.15s ease,
    border-color 0.15s ease,
    color 0.15s ease,
    transform 0.15s ease;
}

.ai-builder-modal-close:hover {
  border-color: #d2d2cc;

  background: #ecece7;

  color: #33352f;
}

.ai-builder-modal-close:active {
  transform: scale(0.96);
}

.ai-builder-modal-close:focus-visible {
  outline: 3px solid rgba(92, 151, 215, 0.25);

  outline-offset: 2px;
}

/* ============================================================
   BODY
   ============================================================ */

.ai-builder-modal-body {
  min-width: 0;
  min-height: 0;

  flex: 1 1 auto;

  position: relative;

  overflow: hidden;

  background: #ffffff;
}

/* ============================================================
   SERVICE FRAME
   ============================================================ */

.ai-builder-modal-frame {
  display: block;

  width: 100%;
  height: 100%;

  margin: 0;
  padding: 0;

  border: 0;

  background: #ffffff;
}

/* ============================================================
   BODY LOCK
   ============================================================ */

html.ai-builder-modal-open,
html.ai-builder-modal-open body {
  overflow: hidden;
}

/* ============================================================
   MOBILE
   ============================================================ */

@media (max-width: 520px) {
  .ai-builder-modal {
    padding: 0;
  }

  .ai-builder-modal-panel {
    width: 100vw;
    height: 100dvh;

    min-height: 0;

    border: 0;

    border-radius: 0;

    box-shadow: none;
  }

  .ai-builder-modal-head {
    min-height: 58px;

    padding: 9px 11px 9px 14px;
  }

  .ai-builder-modal-kicker {
    font-size: 7px;
  }

  .ai-builder-modal-title {
    font-size: 14px;
  }

  .ai-builder-modal-close {
    width: 32px;
    height: 32px;

    flex-basis: 32px;
  }
}
