/* Shared look of the customer calculators — same visual identity as the company site (radma.co/price-calc) */
:root {
    --radma-primary: #1e40af;
    --radma-primary-dark: #1e3a8a;
    --radma-accent: #2563eb;
    --radma-success: #16a34a;
    --radma-whatsapp: #25D366;
    --radma-whatsapp-dark: #128C7E;
    --radma-danger: #dc2626;
    --radma-bg: #f1f5f9;
    --radma-card-bg: #ffffff;
    --radma-border: #e2e8f0;
    --radma-text: #1e293b;
    --radma-text-muted: #64748b;
    --radma-radius: 16px;
    --radma-radius-sm: 10px;
    --radma-shadow: 0 6px 20px -6px rgba(30, 58, 138, 0.12);
}
* { font-family: 'Tajawal', sans-serif; box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
    margin: 0; min-height: 100vh; display: flex; flex-direction: column; color: var(--radma-text);
    background: radial-gradient(800px 300px at 90% -5%, rgba(37, 99, 235, 0.06), transparent 60%), var(--radma-bg);
    -webkit-font-smoothing: antialiased;
}
::selection { background: #1d4ed8; color: #fff; }
[hidden] { display: none !important; }

/* Embedded in another site (iframe): the host page provides header and footer */
html.embedded body { background: transparent; min-height: 0; }
html.embedded .site-header, html.embedded .site-footer, html.embedded .calc-switch { display: none; }
html.embedded .site-main { padding: 0; max-width: none; }
html.embedded .calc-container { box-shadow: none; }

/* ---------- Header ---------- */
.site-header {
    position: sticky; top: 0; z-index: 50; padding: 12px 16px;
    background: rgba(255, 255, 255, 0.9); border-bottom: 1px solid var(--radma-border);
    -webkit-backdrop-filter: blur(12px) saturate(160%); backdrop-filter: blur(12px) saturate(160%);
    box-shadow: 0 1px 0 rgba(15, 23, 42, 0.05);
}
.header-inner { max-width: 960px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--radma-text); min-height: 48px; }
.brand img { height: 48px; width: auto; }
.brand-name { font-size: 1.05rem; font-weight: 700; line-height: 1.3; }
.site-link { color: var(--radma-accent); text-decoration: none; font-weight: 700; font-size: 0.9rem; padding: 10px 8px; }
.site-link:hover { text-decoration: underline; }

/* ---------- Content ---------- */
.site-main { flex: 1; width: 100%; max-width: 960px; margin: 0 auto; padding: 20px 16px 40px; }
.calc-container {
    max-width: 800px; margin: 0 auto; background: var(--radma-card-bg); padding: 30px;
    border-radius: var(--radma-radius); box-shadow: var(--radma-shadow); border: 1px solid rgba(15, 23, 42, 0.05);
}
@media (max-width: 480px) { .calc-container { padding: 20px 16px; } }
.calc-header { text-align: center; margin-bottom: 30px; }
.calc-header img { max-width: 150px; height: auto; margin-bottom: 15px; }
.calc-header h1 { font-size: 1.5rem; margin: 0 0 8px; color: var(--radma-primary); }
.calc-header p { color: var(--radma-text-muted); margin: 0 0 8px; }
.color-offer { color: var(--radma-danger); font-weight: bold; }

.section {
    margin-bottom: 30px; padding: 20px; border: 1px solid var(--radma-border);
    border-radius: var(--radma-radius-sm); background: #fff; transition: box-shadow .25s ease;
}
.section:focus-within { box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.08); }
.section h2 { font-size: 1.15rem; margin: 0 0 15px; color: var(--radma-primary); }
.icon { margin-left: 8px; }
.input-group { margin-bottom: 15px; }
label { display: block; margin-bottom: 5px; color: var(--radma-text); font-weight: 700; }
input, select, textarea {
    width: 100%; padding: 12px; border: 1px solid #cfd8e0; border-radius: var(--radma-radius-sm);
    margin-bottom: 10px; font-size: 16px; background: #fff; color: var(--radma-text);
    transition: border-color .2s ease, box-shadow .2s ease;
}
input:focus-visible, select:focus-visible, textarea:focus-visible {
    outline: none; border-color: var(--radma-accent); box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}
select:disabled { background: #f8fafc; color: var(--radma-text-muted); }
.row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
@media (max-width: 480px) { .row-2 { grid-template-columns: 1fr; } }
.description { color: #666; font-size: 14px; margin-top: -2px; margin-bottom: 12px; line-height: 1.7; }
.dimension-note { font-size: 13px; color: var(--radma-text-muted); margin-top: -4px; margin-bottom: 10px; font-style: italic; }
.color-dot { display: inline-block; width: 14px; height: 14px; border-radius: 50%; border: 1px solid #cfd8e0; vertical-align: -2px; margin-left: 6px; }

.acc-item { padding-bottom: 6px; margin-bottom: 12px; border-bottom: 1px dashed var(--radma-border); }
.acc-item:last-child { border-bottom: none; margin-bottom: 0; }
.acc-item .acc-price { float: left; color: var(--radma-success); font-weight: 700; font-size: 14px; }

button {
    background: var(--radma-primary); color: white; border: none; padding: 14px 25px;
    border-radius: var(--radma-radius-sm); cursor: pointer; font-size: 16px; font-weight: 700;
    display: block; margin: 20px auto; min-height: 48px;
    box-shadow: 0 10px 24px -10px rgba(30, 64, 175, 0.5);
    transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
}
button:hover { background: var(--radma-primary-dark); transform: translateY(-2px); }
button:active { transform: translateY(0); }
button:focus-visible { outline: 3px solid var(--radma-accent); outline-offset: 2px; }
button:disabled { background: #90a0af; cursor: not-allowed; box-shadow: none; transform: none; }
.whatsapp-btn {
    background: var(--radma-whatsapp); display: flex; align-items: center; justify-content: center; gap: 10px;
    box-shadow: 0 10px 24px -10px rgba(18, 140, 126, 0.55);
}
.whatsapp-btn:hover { background: var(--radma-whatsapp-dark); }
a.link-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px;
    padding: 14px 25px; border-radius: var(--radma-radius-sm); font-weight: 700; font-size: 16px;
    text-decoration: none; color: #fff; background: var(--radma-primary);
    box-shadow: 0 10px 24px -10px rgba(30, 64, 175, 0.5); transition: transform .2s ease, background .2s ease;
}
a.link-btn:hover { background: var(--radma-primary-dark); transform: translateY(-2px); }
a.link-btn.whatsapp-btn { background: var(--radma-whatsapp); box-shadow: 0 10px 24px -10px rgba(18, 140, 126, 0.55); }
a.link-btn.whatsapp-btn:hover { background: var(--radma-whatsapp-dark); }

.result { text-align: center; font-size: 24px; color: var(--radma-success); font-weight: bold; margin: 20px 0 10px; }
.breakdown {
    max-width: 560px; margin: 0 auto 10px; font-size: 14px; border: 1px solid var(--radma-border);
    border-radius: var(--radma-radius-sm); overflow: hidden;
}
.breakdown div { display: flex; justify-content: space-between; gap: 12px; padding: 8px 14px; }
.breakdown div:nth-child(even) { background: #f8fafc; }
.breakdown div span:first-child { color: var(--radma-text-muted); }
.breakdown .total-row { background: #eef4ff !important; font-weight: 700; }
.breakdown .total-row span:first-child { color: var(--radma-primary); }
.fees-note { text-align: center; color: var(--radma-text-muted); font-size: 13px; margin-bottom: 6px; }

.notes { color: var(--radma-text-muted); font-size: 14px; margin-top: 20px; text-align: center; line-height: 1.8; }
.submit-status { text-align: center; font-weight: 700; border-radius: var(--radma-radius-sm); margin: 15px auto; max-width: 600px; line-height: 1.8; }
.submit-status:not(:empty) { padding: 14px 16px; }
.status-pending { background: #eaf2fb; color: #1f5d8f; }
.status-success { background: #e8f8ef; color: #1d7a43; }
.status-error { background: #fdecea; color: #a93226; }
.success-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.success-actions a, .success-actions button { margin: 0; }
.quote-ref { direction: ltr; display: inline-block; font-size: 1.3em; }

/* ---------- Footer ---------- */
.site-footer { background: linear-gradient(135deg, #172554 0%, #1e3a8a 100%); color: #ecf0f1; margin-top: 40px; padding: 26px 16px; }
.footer-inner {
    max-width: 960px; margin: 0 auto; display: flex; flex-wrap: wrap; gap: 10px 30px;
    align-items: center; justify-content: center; text-align: center; line-height: 1.9;
}
.footer-brand { font-weight: 700; font-size: 1.05rem; width: 100%; }
.site-footer a { color: #aed6f1; text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.copyright { width: 100%; font-size: 0.85rem; color: #bdc3c7; margin-top: 6px; }

/* ---------- Switch between the calculators ---------- */
.calc-switch {
    max-width: 800px; margin: 0 auto 16px; display: flex; gap: 6px; padding: 5px;
    background: #fff; border: 1px solid var(--radma-border); border-radius: 999px; box-shadow: var(--radma-shadow);
}
.calc-switch a {
    flex: 1; text-align: center; padding: 10px 12px; border-radius: 999px; font-weight: 700;
    color: var(--radma-primary); text-decoration: none; min-height: 44px; transition: background .2s ease;
}
.calc-switch a:hover { background: #eef4ff; }
.calc-switch a[aria-current="page"] { background: var(--radma-primary); color: #fff; }

/* Customer discount (promotion) */
.promo-banner { margin-top: 10px; background: #e8f8ef; color: #146c43; border: 1px solid #b7e4c7; border-radius: 10px; padding: 8px 12px; font-weight: 700; font-size: 0.95rem; }
.promo-row { color: #146c43; font-weight: 700; }
