/*
  Dream One Shopify page shell styles.
  This file contains only the outer /pages/service-portal shell styles.
  Customer fragment styles remain in public/css/service-portal.css.
*/

.main-page-title,
  .page-title,
  .title--primary,
  .shopify-section h1:first-child {
    display: none !important;
  }

  #MainContent,
  .main-content,
  .template-page,
  .page-width {
    padding-top: 0 !important;
    margin-top: 0 !important;
  }

  .dreamone-page {
    width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    margin-top: 0;
    box-sizing: border-box;
    background:
      radial-gradient(circle at 8% 8%, rgba(239, 68, 68, 0.12), transparent 28%),
      radial-gradient(circle at 92% 12%, rgba(59, 130, 246, 0.1), transparent 30%),
      linear-gradient(180deg, #fff7f2 0%, #fffaf5 30%, #f7fbff 100%);
    padding: 34px 18px 56px;
    overflow: hidden;
  }

  .dreamone-inner {
    max-width: 1280px;
    margin: 0 auto;
  }

  .dreamone-hero {
    text-align: center;
    margin: 0 auto 28px;
  }

  .dreamone-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.94);
    border: 1px solid rgba(239, 68, 68, 0.18);
    color: #ef4444;
    font-size: 13px;
    font-weight: 900;
    letter-spacing: 0.01em;
    box-shadow: 0 10px 26px rgba(239, 68, 68, 0.08);
  }

  @keyframes dreamone-sparkle-bounce {
    0%, 100% {
      transform: translateY(0) rotate(0deg);
    }
    50% {
      transform: translateY(-5px) rotate(8deg);
    }
  }

  .dreamone-badge .sparkle {
    display: inline-block;
    animation: dreamone-sparkle-bounce 1.35s ease-in-out infinite;
  }

  .dreamone-title {
    margin: 18px 0 10px;
    color: #111827;
    font-size: clamp(38px, 5.5vw, 66px);
    line-height: 1.06;
    font-weight: 950;
    letter-spacing: -0.06em;
  }

  .dreamone-desc {
    max-width: 860px;
    margin: 0 auto;
    color: #374151;
    font-size: 17px;
    line-height: 1.75;
    word-break: keep-all;
  }

  .dreamone-menu {
    display: grid;
    grid-template-columns: repeat(4, minmax(170px, 230px));
    justify-content: center;
    gap: 16px;
    margin: 28px auto 28px;
  }

  .dreamone-menu button {
    appearance: none;
    width: 100%;
    border: 1px solid rgba(17, 24, 39, 0.08);
    background: rgba(255, 255, 255, 0.92);
    color: #111827;
    border-radius: 22px;
    padding: 22px 14px 20px;
    min-height: 112px;
    cursor: pointer;
    box-shadow: 0 14px 34px rgba(15, 23, 42, 0.07);
    transition:
      transform 0.18s ease,
      box-shadow 0.18s ease,
      border-color 0.18s ease,
      background 0.18s ease,
      color 0.18s ease;
  }

  .dreamone-menu button:hover {
    transform: translateY(-3px);
    border-color: rgba(239, 68, 68, 0.28);
    box-shadow: 0 22px 48px rgba(15, 23, 42, 0.11);
  }

  .dreamone-menu button.is-active {
    background: #ef4444;
    color: #ffffff;
    border-color: #ef4444;
    box-shadow: 0 18px 42px rgba(239, 68, 68, 0.24);
  }

  .dreamone-menu-icon {
    display: block;
    font-size: 30px;
    line-height: 1;
    margin-bottom: 12px;
  }

  .dreamone-menu-label {
    display: block;
    font-size: 16px;
    line-height: 1.35;
    font-weight: 950;
    letter-spacing: -0.025em;
  }

  .dreamone-shell {
    max-width: 1220px;
    margin: 0 auto;
    padding: 18px;
    border-radius: 34px;
    border: 1px solid rgba(17, 24, 39, 0.08);
    background: rgba(255, 255, 255, 0.82);
    box-shadow: 0 28px 80px rgba(15, 23, 42, 0.13);
    box-sizing: border-box;
  }

  .dreamone-portal-root {
    border-radius: 26px;
    background: #ffffff;
    min-height: 360px;
    overflow: visible;
  }

  .dreamone-loading,
  .dreamone-error,
  .dreamone-coming-soon {
    padding: 34px 24px;
    border-radius: 26px;
    background: #ffffff;
    border: 1px solid rgba(17, 24, 39, 0.08);
    color: #374151;
    font-size: 15px;
    line-height: 1.7;
  }

  .dreamone-loading strong,
  .dreamone-error strong,
  .dreamone-coming-soon strong {
    display: block;
    margin-bottom: 8px;
    color: #111827;
    font-size: 21px;
    font-weight: 950;
    letter-spacing: -0.03em;
  }

  .dreamone-error {
    border-color: rgba(239, 68, 68, 0.25);
    background: #fff7f7;
  }

  @media (max-width: 980px) {
    .dreamone-page {
      padding-left: 14px;
      padding-right: 14px;
    }

    .dreamone-menu {
      grid-template-columns: repeat(2, minmax(0, 240px));
      gap: 14px;
    }

    .dreamone-shell {
      padding: 14px;
      border-radius: 28px;
    }
  }

  @media (max-width: 640px) {
    .dreamone-page {
      padding: 24px 8px 38px;
    }

    .dreamone-hero {
      margin-bottom: 20px;
    }

    .dreamone-title {
      margin-top: 14px;
      font-size: 36px;
      letter-spacing: -0.055em;
    }

    .dreamone-desc {
      max-width: 92%;
      font-size: 14px;
      line-height: 1.65;
    }

    .dreamone-menu {
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 9px;
      margin: 20px auto 20px;
    }

    .dreamone-menu button {
      min-height: 86px;
      padding: 14px 8px 13px;
      border-radius: 16px;
    }

    .dreamone-menu-icon {
      font-size: 23px;
      margin-bottom: 7px;
    }

    .dreamone-menu-label {
      font-size: 13px;
    }

    .dreamone-shell {
      padding: 8px;
      border-radius: 22px;
    }

    .dreamone-portal-root,
    .dreamone-loading,
    .dreamone-error,
    .dreamone-coming-soon {
      border-radius: 18px;
    }

    .dreamone-loading,
    .dreamone-error,
    .dreamone-coming-soon {
      padding: 24px 18px;
    }
  }

  @media (max-width: 390px) {
    .dreamone-menu {
      grid-template-columns: 1fr 1fr;
    }

    .dreamone-menu-label {
      font-size: 12px;
    }
  }

/* Unread message count on the Dream One portal navigation */
.dreamone-menu button {
  position: relative;
}

.dreamone-nav-message-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border: 2px solid #ffffff;
  border-radius: 999px;
  background: #ef4444;
  color: #ffffff;
  font-size: 11px;
  line-height: 1;
  font-weight: 900;
  box-shadow: 0 3px 10px rgba(127, 29, 29, 0.22);
}

.dreamone-global-message-toast {
  position: fixed;
  top: max(16px, env(safe-area-inset-top));
  right: 16px;
  z-index: 9999;
  display: none;
  box-sizing: border-box;
  width: min(360px, calc(100vw - 32px));
  padding: 14px;
  border: 1px solid #bfdbfe;
  border-radius: 14px;
  background: #eff6ff;
  color: #1e3a8a;
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.22);
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.dreamone-global-message-toast.is-visible {
  display: flex;
}

.dreamone-global-message-toast > div:first-child {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 3px;
}

.dreamone-global-message-toast span {
  font-size: 13px;
}

.dreamone-global-message-toast__actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.dreamone-global-message-toast button {
  min-height: 36px;
  padding: 0 12px;
  border: 0;
  border-radius: 999px;
  background: #1d4ed8;
  color: #ffffff;
  font: inherit;
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
}

.dreamone-global-message-toast button[data-message-toast-close] {
  width: 36px;
  padding: 0;
  background: rgba(30, 58, 138, 0.12);
  color: #1e3a8a;
  font-size: 20px;
}

@media (max-width: 640px) {
  .dreamone-global-message-toast {
    top: auto;
    right: 12px;
    bottom: calc(12px + env(safe-area-inset-bottom));
    left: 12px;
    width: auto;
  }
}

/* Dream One v1 visual system: unified SVG navigation icons and focus states */
.dreamone-page {
  --dreamone-brand: #ef4444;
  --dreamone-brand-strong: #dc2626;
  --dreamone-ink: #111827;
  --dreamone-muted: #667085;
  --dreamone-line: rgba(17, 24, 39, 0.1);
  --dreamone-focus: rgba(239, 68, 68, 0.22);
  font-family:
    Inter,
    Pretendard,
    "Noto Sans KR",
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
}

.dreamone-page button,
.dreamone-page input,
.dreamone-page select,
.dreamone-page textarea {
  font: inherit;
}

.dreamone-menu button:focus-visible,
.dreamone-global-message-toast button:focus-visible {
  outline: 3px solid var(--dreamone-focus);
  outline-offset: 3px;
}

.dreamone-menu-icon {
  display: inline-flex;
  width: 34px;
  height: 34px;
  align-items: center;
  justify-content: center;
  margin: 0 auto 12px;
  color: #ef4444;
  line-height: 1;
}

.dreamone-menu button.is-active .dreamone-menu-icon {
  color: #ffffff;
}

.dreamone-menu-icon .dreamone-icon,
.dreamone-badge .sparkle .dreamone-icon,
.dreamone-global-message-toast .dreamone-icon {
  display: block;
  width: 100%;
  height: 100%;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.85;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.dreamone-badge .sparkle {
  display: inline-flex;
  width: 18px;
  height: 18px;
  align-items: center;
  justify-content: center;
  color: currentColor;
}

.dreamone-global-message-toast button[data-message-toast-close] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0;
}

.dreamone-global-message-toast button[data-message-toast-close] .dreamone-icon {
  width: 18px;
  height: 18px;
}

.dreamone-shell {
  scroll-margin-top: 18px;
}

@media (max-width: 640px) {
  .dreamone-menu-icon {
    width: 27px;
    height: 27px;
    margin-bottom: 8px;
  }

  .dreamone-menu button {
    touch-action: manipulation;
  }
}
