/*
  CanadaDream / DreamTrade Service Portal Theme
  ------------------------------------------------
  Customer-facing theme overrides.
  Change this file later when the storefront/theme branding changes.
*/

.customer-view {
  background:
    radial-gradient(circle at top left, rgba(44, 110, 203, 0.08), transparent 32%),
    linear-gradient(180deg, #ffffff 0%, #f6f6f7 100%);
}

.customer-view .shell {
  max-width: 1040px;
  padding: 32px 18px 48px;
}

.customer-view .topbar {
  align-items: flex-start;
  border-bottom: 1px solid rgba(223, 227, 232, 0.8);
  padding-bottom: 18px;
  margin-bottom: 28px;
}

.customer-view .topbar h1 {
  font-size: 34px;
  line-height: 1.18;
  letter-spacing: -0.04em;
}

.customer-view .language-switcher {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 8px 12px;
  box-shadow: 0 8px 24px rgba(32, 34, 35, 0.06);
}

.customer-view .card {
  border-radius: 22px;
  border: 1px solid rgba(223, 227, 232, 0.92);
  box-shadow: 0 14px 38px rgba(32, 34, 35, 0.07);
  padding: 26px;
  margin-bottom: 22px;
}

.customer-view .card h1,
.customer-view .card h2,
.customer-view .card h3 {
  letter-spacing: -0.03em;
}

.customer-view .card h2 {
  font-size: 24px;
  margin-top: 0;
  margin-bottom: 10px;
}

.customer-view .card h3 {
  font-size: 19px;
}

.customer-view .muted {
  color: #5f6368;
  line-height: 1.65;
}

.customer-view .form-row {
  margin-bottom: 18px;
}

.customer-view .form-row label {
  font-size: 14px;
  letter-spacing: -0.01em;
  margin-bottom: 8px;
}

.customer-view .form-row input,
.customer-view .form-row select,
.customer-view .form-row textarea {
  min-height: 46px;
  border-radius: 14px;
  padding: 13px 14px;
  background: #ffffff;
  border-color: #d9dde3;
  font-size: 15px;
}

.customer-view .form-row textarea {
  min-height: 130px;
  font-family: Arial, sans-serif;
  line-height: 1.55;
}

.customer-view .form-row input:focus,
.customer-view .form-row select:focus,
.customer-view .form-row textarea:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 4px rgba(44, 110, 203, 0.12);
}

.customer-view .button,
.customer-view button.button {
  border-radius: 999px;
  padding: 13px 20px;
  font-size: 15px;
  font-weight: 800;
  background: #111827;
  box-shadow: 0 10px 24px rgba(17, 24, 39, 0.18);
  transition: transform 0.15s ease, filter 0.15s ease;
}

.customer-view .button:hover,
.customer-view button.button:hover {
  transform: translateY(-1px);
  filter: brightness(1.05);
}

.customer-view .button.secondary {
  background: #ffffff;
  color: #111827;
  border: 1px solid #cfd6df;
  box-shadow: none;
}

.customer-view .checkbox-row {
  align-items: flex-start;
  gap: 12px;
  line-height: 1.55;
}

.customer-view .checkbox-row input {
  margin-top: 3px;
  transform: scale(1.1);
}

.customer-view table {
  border-radius: 18px;
  overflow: hidden;
}

.customer-view th {
  background: #f5f7fa;
}

.customer-view .badge {
  padding: 6px 10px;
}

@media (max-width: 768px) {
  .customer-view .shell {
    padding: 20px 12px 36px;
  }

  .customer-view .topbar {
    display: block;
  }

  .customer-view .topbar h1 {
    font-size: 28px;
    margin-bottom: 14px;
  }

  .customer-view .language-switcher {
    display: inline-block;
  }

  .customer-view .card {
    border-radius: 18px;
    padding: 20px;
  }

  .customer-view .button,
  .customer-view button.button {
    width: 100%;
    text-align: center;
    box-sizing: border-box;
  }
}

/* Mobile usability improvements for confirmation cards and CTA buttons */
.customer-view .card .checkbox-row {
  margin-top: 14px;
  padding: 12px 14px;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  background: #f8fafc;
}

.customer-view .card .checkbox-row input[type="checkbox"] {
  width: 20px;
  height: 20px;
  min-width: 20px;
  margin-top: 1px;
  accent-color: #111827;
}

.customer-view .card .checkbox-row span,
.customer-view .card .checkbox-row label {
  font-size: 14px;
  font-weight: 700;
  color: #111827;
}

.customer-view form > .card:last-child {
  position: sticky;
  bottom: 0;
  z-index: 10;
  margin-left: -18px;
  margin-right: -18px;
  margin-bottom: 0;
  border-radius: 22px 22px 0 0;
  box-shadow: 0 -12px 30px rgba(17, 24, 39, 0.12);
}

.customer-view form > .card:last-child .button,
.customer-view form > .card:last-child button.button {
  width: 100%;
  min-height: 52px;
  font-size: 16px;
}

@media (max-width: 768px) {
  .customer-view .card {
    padding: 18px;
  }

  .customer-view .card ul {
    padding-left: 20px;
  }

  .customer-view .card li {
    margin-bottom: 6px;
    line-height: 1.55;
  }

  .customer-view .card .checkbox-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 16px;
    padding: 14px;
    border-radius: 16px;
  }

  .customer-view .card .checkbox-row input[type="checkbox"] {
    width: 22px;
    height: 22px;
    min-width: 22px;
  }

  .customer-view .card .checkbox-row span,
  .customer-view .card .checkbox-row label {
    font-size: 14px;
    line-height: 1.35;
  }

  .customer-view form > .card:last-child {
    padding: 14px;
  }

  .customer-view form > .card:last-child .button,
  .customer-view form > .card:last-child button.button {
    display: block;
    width: 100%;
    min-height: 54px;
    font-size: 16px;
    border-radius: 999px;
  }
}

/* Admin HTML editor */
.admin-html-editor {
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  background: #ffffff;
}

.admin-html-editor-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  padding: 10px;
  border-bottom: 1px solid var(--border);
  background: #f9fafb;
}

.admin-html-editor-toolbar button {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #ffffff;
  color: var(--text);
  padding: 7px 10px;
  font-weight: 700;
  cursor: pointer;
}

.admin-html-editor-toolbar button:hover {
  border-color: var(--blue);
}

.admin-html-editor-toolbar button.active {
  background: var(--blue);
  color: #ffffff;
  border-color: var(--blue);
}

.admin-html-editor-surface {
  min-height: 260px;
  padding: 18px;
  line-height: 1.65;
  outline: none;
}

.admin-html-editor-surface:focus {
  box-shadow: inset 0 0 0 3px rgba(44, 110, 203, 0.12);
}

.admin-html-editor-source {
  display: none;
  width: 100%;
  min-height: 260px;
  box-sizing: border-box;
  border: 0;
  border-radius: 0;
  padding: 18px;
  font-family: Consolas, Monaco, monospace;
  font-size: 14px;
  line-height: 1.5;
}

.admin-html-editor.html-mode .admin-html-editor-surface {
  display: none;
}

.admin-html-editor.html-mode .admin-html-editor-source {
  display: block;
}

.admin-html-editor-help {
  margin-top: 8px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

/* Admin HTML editor */
.admin-html-editor {
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  background: #ffffff;
}

.admin-html-editor-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  padding: 10px;
  border-bottom: 1px solid var(--border);
  background: #f9fafb;
}

.admin-html-editor-toolbar button {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #ffffff;
  color: var(--text);
  padding: 7px 10px;
  font-weight: 700;
  cursor: pointer;
}

.admin-html-editor-toolbar button:hover {
  border-color: var(--blue);
}

.admin-html-editor-toolbar button.active {
  background: var(--blue);
  color: #ffffff;
  border-color: var(--blue);
}

.admin-html-editor-surface {
  min-height: 260px;
  padding: 18px;
  line-height: 1.65;
  outline: none;
}

.admin-html-editor-surface:focus {
  box-shadow: inset 0 0 0 3px rgba(44, 110, 203, 0.12);
}

.admin-html-editor-source {
  display: none;
  width: 100%;
  min-height: 260px;
  box-sizing: border-box;
  border: 0;
  border-radius: 0;
  padding: 18px;
  font-family: Consolas, Monaco, monospace;
  font-size: 14px;
  line-height: 1.5;
}

.admin-html-editor.html-mode .admin-html-editor-surface {
  display: none;
}

.admin-html-editor.html-mode .admin-html-editor-source {
  display: block;
}

.admin-html-editor-help {
  margin-top: 8px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

/* Customer option description HTML */
.customer-view .option-content {
  display: block;
  width: 100%;
}

.customer-view .option-description {
  margin-top: 6px;
  margin-bottom: 6px;
}

.customer-view .option-description p {
  margin: 4px 0;
}

.customer-view .option-description ul,
.customer-view .option-description ol {
  margin: 6px 0;
  padding-left: 20px;
}

.customer-view .option-description li {
  margin-bottom: 3px;
}

.customer-view .option-description img {
  max-width: 100%;
  height: auto;
  border-radius: 12px;
  margin-top: 8px;
}

.customer-view .option-price {
  margin-top: 6px;
  font-weight: 700;
}

.admin-html-editor.mini .admin-html-editor-surface,
.admin-html-editor.mini .admin-html-editor-source {
  min-height: 150px;
}

/* Customer portal shared header */
.customer-view .customer-portal-header {
  background: #ef4f53;
  color: #ffffff;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.08);
}

.customer-view .customer-portal-header__inner {
  max-width: 1040px;
  margin: 0 auto;
  padding: 14px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.customer-view .customer-portal-header__brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #ffffff;
  text-decoration: none;
  font-weight: 900;
  letter-spacing: -0.02em;
}

.customer-view .customer-portal-header__logo {
  width: 34px;
  height: 34px;
  border: 1.5px solid rgba(255, 255, 255, 0.9);
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 900;
}

.customer-view .customer-portal-header__nav {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.customer-view .customer-portal-header__nav a {
  color: #ffffff;
  text-decoration: none;
  font-weight: 800;
  font-size: 14px;
  opacity: 0.96;
}

.customer-view .customer-portal-header__nav a:hover {
  text-decoration: underline;
}

.customer-view .customer-portal-header__account {
  padding: 7px 11px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 999px;
}

/* Customer portal home cards */
.customer-view .grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-bottom: 22px;
}

.customer-view .metric {
  background: #ffffff;
  border: 1px solid rgba(223, 227, 232, 0.92);
  border-radius: 22px;
  padding: 24px;
  box-shadow: 0 14px 38px rgba(32, 34, 35, 0.07);
}

.customer-view .metric .label {
  color: #6b7280;
  font-size: 13px;
  font-weight: 800;
  margin-bottom: 8px;
}

.customer-view .metric .value {
  color: #111827;
  font-weight: 900;
  letter-spacing: -0.03em;
}

/* Customer requests page */
.customer-view .customer-account-return {
  display: none;
}

.customer-view .customer-request-section {
  overflow: hidden;
}

.customer-view .customer-request-table {
  overflow-x: auto;
}

.customer-view .customer-request-table table {
  min-width: 680px;
}

.customer-view .customer-request-table a {
  color: #111827;
  font-weight: 800;
}

.customer-view .customer-request-cards {
  display: none;
}

.customer-view .customer-request-card {
  color: #111827;
  text-decoration: none;
  border: 1px solid #e5e7eb;
  border-radius: 18px;
  padding: 16px;
  margin-top: 12px;
  background: #ffffff;
}

.customer-view .customer-request-card__top,
.customer-view .customer-request-card__meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.customer-view .customer-request-card__meta {
  margin-top: 14px;
}

.customer-view .customer-request-card__meta div {
  display: grid;
  gap: 4px;
}

.customer-view .customer-request-card__footer {
  margin-top: 14px;
  font-weight: 900;
}

@media (max-width: 768px) {
  .customer-view .customer-portal-header__inner {
    align-items: flex-start;
    flex-direction: column;
    padding: 14px 14px;
  }

  .customer-view .customer-portal-header__nav {
    width: 100%;
    gap: 8px;
  }

  .customer-view .customer-portal-header__nav a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
    font-size: 13px;
  }

  .customer-view .grid {
    grid-template-columns: 1fr;
  }

  .customer-view .metric {
    padding: 20px;
  }

  .customer-view .customer-request-table {
    display: none;
  }

  .customer-view .customer-request-cards {
    display: block;
  }

  .customer-view .customer-request-card__top,
  .customer-view .customer-request-card__meta {
    flex-direction: column;
  }
}
