/* Shared chrome and transactional surfaces for the bilingual studio. */
:root {
  --shell-paper: var(--surface);
  --shell-divider: var(--line);
  --shell-raised: 0 4px 14px rgb(32 40 35 / 5%);
  --shell-focus: var(--green);
}
:root[data-theme="dark"] { --shell-raised: 0 4px 16px rgb(0 0 0 / 16%); }

.site-header { background: var(--shell-paper); }
.site-header .header-inner { height: 72px; gap: 16px; }
.site-header .desktop-nav { gap: clamp(10px, 1.4vw, 22px); }
.site-header .desktop-nav a { min-height: 44px; padding: 10px 0; gap: 6px; }
.site-header .desktop-nav a[aria-current]::after { inset-inline: 22px 0; }
.site-header .header-actions { gap: 4px; }
.site-header .header-actions .icon-button { width: 44px; height: 44px; }
.site-header .account-link { gap: 6px; font-size: 14px; }
.site-header .account-link span { display: none; white-space: nowrap; }
.site-header .header-cta { margin-inline: 4px; border-radius: 40px; min-height: 44px; padding: 9px 17px; gap: 10px; font-size: 14px; }
.site-header .menu-toggle { border: 1px solid var(--shell-divider); }
.site-header .theme-toggle .switch-to-light,
:root[data-theme="dark"] .site-header .theme-toggle .switch-to-dark { display: none; }
:root[data-theme="dark"] .site-header .theme-toggle .switch-to-light { display: block; }

.language-picker { position: relative; }
.language-picker > summary { list-style: none; min-height: 44px; padding: 8px; border-radius: 12px; cursor: pointer; align-items: center; justify-content: center; gap: 5px; }
.language-picker > summary::-webkit-details-marker { display: none; }
.language-picker[open] > summary,
.language-picker > summary:hover { background: var(--soft); }
.language-picker .language-caret { width: 12px; height: 12px; }
.language-options { position: absolute; top: calc(100% + 6px); inset-inline-end: 0; z-index: 1; min-width: 156px; padding: 6px; background: var(--shell-paper); border: 1px solid var(--shell-divider); border-radius: 16px; box-shadow: 0 8px 24px rgb(24 32 26 / 15%); }
.language-options > :is(a, span) { display: flex; min-height: 44px; padding-inline: 12px; align-items: center; justify-content: space-between; gap: 12px; border-radius: 10px; font: 500 15px/1.6 Manrope, sans-serif; }
.language-options > [lang=fa] { font-family: Vazirmatn, sans-serif; }
.language-options a:hover { background: var(--soft); }
.language-options > [aria-current] { background: var(--selected); }
.language-options .icon { width: 16px; height: 16px; color: var(--green); }
html[dir="rtl"] .language-options .icon { transform: none; }

.menu-drawer { padding: 18px 20px 28px; background: var(--bg); }
.menu-drawer .menu-top { padding: 0 0 12px; border-bottom: 1px solid var(--shell-divider); }
.menu-drawer .menu-top .menu-close { border: 1px solid var(--shell-divider); background: var(--surface); }
.menu-drawer .drawer-quick a { background: var(--surface); }
.menu-drawer .drawer-shortcuts { margin-block: 14px 4px; }
.menu-drawer .drawer-quick .icon { width: 18px; }
.menu-drawer > a:not(.button) { border-bottom: 0; min-height: 44px; }
.drawer-families { margin-bottom: 12px; padding-bottom: 12px; border-bottom: 1px solid var(--shell-divider); }
.drawer-families details { margin-block: 6px; background: var(--soft); border-radius: 16px; }
.drawer-families summary { padding: 10px 14px; align-items: center; }
.drawer-families summary span { min-width: 0; }
.drawer-families summary small { display: block; margin-top: 2px; font-size: 13px; font-weight: 400; line-height: 1.55; color: var(--muted); }
.drawer-families details > div { padding: 0 12px 8px; }
.drawer-families details > div > a { min-height: 44px; padding-inline-start: 28px; }
.drawer-integrated a { display: flex; align-items: center; gap: 10px; min-height: 48px; border-radius: 12px; padding: 8px 14px; background: var(--selected); }
.drawer-integrated .icon { color: var(--green); width: 20px; }
.menu-drawer > .button { min-height: 48px; margin-top: 10px; justify-content: space-between; border-radius: 12px; }

.site-footer { background: var(--soft); padding-top: clamp(32px, 4vw, 56px); }
.site-footer .footer-grid { grid-template-columns: 1.25fr 1fr .8fr 1.05fr; gap: clamp(20px, 3.8vw, 56px); }
.site-footer .footer-grid h3 { font-size: 17px; letter-spacing: -.02em; margin-bottom: 12px; }
.site-footer .footer-grid .footer-intro p { font-size: 15px; max-width: 31ch; }
.site-footer .footer-intro .footer-slogan { color: var(--ink); margin-top: 14px; }
.site-footer .footer-grid > div > a:not(.brand),
.site-footer .footer-social a { display: inline-flex; align-items: center; gap: 9px; width: fit-content; min-height: 36px; padding-block: 5px; color: var(--muted); font-size: 14px; }
.site-footer .footer-grid > div > a:not(.brand) { display: flex; }
.site-footer .footer-social { display: grid; grid-template-columns: 1fr; gap: 0; }
.site-footer .footer-social a { background: transparent; border: 0; border-radius: 0; padding-inline: 0; }
.site-footer .footer-social a .icon, .site-footer .footer-grid > div > a > .icon { width: 17px; height: 17px; color: var(--green); }
.site-footer .footer-grid > div > a:hover, .site-footer .footer-social a:hover,
.site-footer .footer-bottom a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: .24em; }
.site-footer .footer-bottom { margin-top: 28px; padding-block: 12px; }
.site-footer .footer-bottom a, .site-footer .footer-bottom small, .site-footer .footer-contact > p { font-size: 13px; }
html[dir="rtl"] .footer-social .icon, html[dir="rtl"] .footer-contact > a .icon { transform: none; }

.quick-estimate .quick-layout > .panel,
.brief-page .brief-layout .panel,
.auth-layout .auth-panel,
.portal .portal-nav,
.portal .portal-content .panel { box-shadow: var(--shell-raised); border-radius: 20px; }
.quick-estimate .quick-preview, .brief-page .estimate-panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-block-start: 4px solid var(--accent);
}
.quick-estimate .quick-amount, .brief-page .estimate-total strong { color: var(--green); font-variant-numeric: tabular-nums; }
.quick-estimate .quick-layout > .form-panel, .brief-page .brief-layout .panel, .auth-layout .auth-panel { border-color: var(--line); }
.brief-page .brief-layout .estimate-panel { border-block-start-color: var(--accent); }
.quick-estimate .quick-layout label, .brief-page .brief-layout label, .portal-content .form-panel label { font-size: 15px; }
.quick-estimate .form-panel :is(input:not([type=checkbox]):not([type=radio]), select, textarea),
.brief-page .brief-layout :is(input:not([type=radio]):not([type=checkbox]), select, textarea),
.auth-layout .auth-panel input,
.portal-content .form-panel :is(input:not([type=file]):not([type=checkbox]):not([type=radio]), select, textarea) {
  background: var(--bg); border-radius: 12px; color: var(--ink);
}
:is(.quick-estimate,.brief-page,.auth-layout,.portal) :is(input,select,textarea):focus-visible {
  outline: 2px solid var(--shell-focus);
  outline-offset: 2px;
  box-shadow: 0 0 0 4px var(--selected);
}
.portal .workspace-header { padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.portal .portal-nav nav > a[aria-current] { box-shadow: inset 3px 0 var(--accent); color: var(--ink); }
html[dir="rtl"] .portal .portal-nav nav > a[aria-current] { box-shadow: inset -3px 0 var(--accent); }
.portal .workspace-welcome { background: var(--soft); }
.portal .stat-card .stat-icon { color: var(--green); }
:is(.quick-estimate,.brief-page,.auth-layout,.portal) .button { min-height: 44px; border-radius: 12px; }

@media (min-width: 1300px) {
  .site-header .header-actions .account-link { width: auto; padding-inline: 9px; }
  .site-header .account-link span { display: inline; }
}
@media (max-width: 820px) {
  .site-footer .footer-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .site-footer .footer-grid > div { grid-column: auto; }
}
@media screen and (max-width: 660px) {
  .site-header .header-inner { width: calc(100% - 32px); height: 64px; gap: 8px; }
  .site-header .header-actions { gap: 1px; }
  .site-header .header-actions .icon-button, .site-header .language-picker > summary { width: 42px; min-width: 42px; height: 44px; }
  .site-header .language-picker > summary { padding: 5px; }
  .site-header .language-picker .icon { display: none; }
  .site-header .header-cta { display: none; }
  .site-header .menu-toggle { border-color: transparent; }
  .site-header .menu-toggle[aria-expanded="true"] { border-block-end-color: var(--green); }
  .menu-drawer { padding-inline: 16px; }
  .site-footer {
    --ink: #fcfcf8; --muted: #d1d8cb; --line: #465247; --green: #d1e6b2; --selected: #34432e;
    background: #202823; color: var(--ink); border-color: #202823; padding-top: 32px;
  }
  .site-footer .footer-grid { grid-template-columns: 1fr 1fr; gap: 24px 14px; }
  .site-footer .footer-grid .footer-intro { grid-column: 1/-1; }
  .site-footer .footer-grid .footer-intro { padding-bottom: 20px; border-bottom: 1px solid var(--line); }
  .site-footer .footer-grid .footer-intro p { font-size: 16px; }
  .site-footer .footer-grid .footer-contact { order: 1; grid-column: 1/-1; }
  .site-footer .footer-grid .footer-services { order: 2; }
  .site-footer .footer-grid .footer-studio { order: 3; }
  .site-footer .footer-grid h3 { font-size: 18px; margin-bottom: 8px; }
  .site-footer .footer-grid > div > a:not(.brand), .site-footer .footer-social a { min-height: 44px; font-size: 15px; }
  .site-footer .footer-bottom { width: calc(100% - 40px); flex-wrap: wrap; gap: 2px; }
  .site-footer .footer-bottom > div { column-gap: 15px; row-gap: 0; }
  .site-footer a:focus-visible { outline-color: var(--green); }
  .portal .workspace-header { margin-bottom: 18px; }
}
@media screen and (max-width: 380px) {
  .site-header .header-inner { width: calc(100% - 24px); }
  .site-header .header-actions .account-link { display: none; }
}
/* The account welcome illustration is part of the studio's private workspace identity. */
.portal .client-welcome {
  grid-template-columns: minmax(0,1.08fr) minmax(0,1fr);
  align-items: center;
  position: relative;
  background: linear-gradient(110deg,var(--surface),var(--soft));
  padding: 16px clamp(18px,3vw,36px);
}
.portal .client-welcome > div { z-index: 1; min-width: 0; }
.portal .client-welcome h2 { font-size: clamp(25px,3vw,38px); margin: 0; overflow-wrap: anywhere; }
.portal .client-welcome p { max-width: 37ch; color: var(--muted); font-size: 15px; }
.workspace-mascot { display: block; height: clamp(130px,13vw,182px); }
.workspace-mascot img { width: 100%; height: 100%; object-fit: contain; }
html[dir="ltr"] .workspace-mascot img { transform: scaleX(-1); }
@media (max-width: 640px) {
  .portal .client-welcome { grid-template-columns: minmax(0,1.3fr) minmax(0,1fr); gap: 0; padding: 14px; }
  .portal .client-welcome p { margin-top: 7px; }
  .workspace-mascot { height: 120px; }
}
