/* /pricing page styles — moved out of pricing.blade.php so the browser caches them instead of
   every /pricing response carrying ~11 KB of inline CSS (Bing Site Explorer audit, 2026-10-20).
   Linked from the view with a filemtime version, so an edit here reaches visitors at once. */

:root {
    --c-primary: #fa9d26;
    /* Reference Light Orange */
    --c-primary-dark: #f05c1f;
    /* Reference Dark Orange */
    --c-bg-card: #1e293b;
    --c-bg-card-dark: #0f172a;
    --c-border: #334155;
    --c-border-dark: #1e293b;
    --c-text-main: #f8fafc;
    --c-text-main-dark: #ffffff;
    --c-text-muted: #94a3b8;
}

.saas-container {
    max-width: 1000px;
    margin: 0 auto;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    color: var(--c-text-main);
    text-align: left;
    /* Reset text align */
}

/* RTL: the Inter stack + left-align above are LTR-only resets. Inter has
   no Arabic glyphs (the browser silently falls back to Segoe UI), so under
   dir=rtl inherit the global Arabic stack (Tajawal via --font-sans, see
   app.css html[dir="rtl"]) and flip the default alignment. */
html[dir="rtl"] .saas-container {
    font-family: var(--font-sans, 'Tajawal', sans-serif);
    text-align: right;
}

/* Keeps the price and its /mo reading left-to-right as one unit in RTL; flex-end pins it
   to the text edge (right) on RTL cards. */
.plan-price-row {
    display: flex;
    align-items: baseline;
}

html[dir="rtl"] .plan-price-row {
    justify-content: flex-end;
}

/* HEADER */
.saas-header {
    text-align: center;
    margin-bottom: 3.5rem;
    position: relative;
}

.saas-title {
    font-size: 3rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    margin-bottom: 0.75rem;
    color: white;
}

.saas-subtitle {
    font-size: 1.125rem;
    color: var(--c-text-muted);
    max-width: 600px;
    margin: 0 auto;
}

/* TOGGLE */
.plan-toggle {
    display: inline-flex;
    background: #0b0f19;
    padding: 4px;
    border-radius: 9999px;
    position: relative;
    margin-bottom: 3rem;
    border: 1px solid var(--c-border);
    align-items: center;
}

.toggle-opt {
    padding: 8px 24px;
    border-radius: 9999px;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    border: none;
    background: transparent;
    color: var(--c-text-muted);
    transition: color 0.3s ease;
    position: relative;
    z-index: 20;
    outline: none;
}

/* `outline: none` above removed the only focus affordance these two
   buttons had, and nothing replaced it anywhere in this style block — so
   the billing-cycle switch was invisible to keyboard users on the page
   where the purchase decision is made. */
.toggle-opt:focus-visible {
    outline: 2px solid #fcd34d;
    outline-offset: 3px;
}

.toggle-opt.active {
    color: #0f172a;
}

.save-badge {
    position: absolute;
    top: -12px;
    left: -25px;
    background: #ffffff;
    color: #9a3412;
    font-size: 0.7rem;
    font-weight: 900;
    padding: 2px 6px;
    border-radius: 4px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.2);
    white-space: nowrap;
    z-index: 30;
    border: 1px solid rgba(240, 92, 31, 0.15);
}

/* RTL: yearly sits on the right (flex order reverses), so mirror the
   badge to the outward (right) edge of the yearly button. */
html[dir="rtl"] .save-badge {
    left: auto;
    right: -25px;
}

/* GRID */
.pricing-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

@media (min-width: 768px) {
    .pricing-grid {
        grid-template-columns: repeat(2, 1fr);
        align-items: center;
    }
}
@media (min-width: 1024px) {
    .pricing-grid {
        grid-template-columns: repeat(3, 1fr);
        align-items: start;
    }
}

/* CARD COMMON */
.p-card {
    background: var(--c-bg-card);
    border: 1px solid var(--c-border);
    border-radius: 1.5rem;
    padding: 2.5rem;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
    position: relative;
}
.p-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 15px 30px -10px rgba(0, 0, 0, 0.4);
    border-color: rgba(255, 255, 255, 0.15);
}

/* PRO CARD */
.p-card-pro {
    border: 2px solid var(--c-primary);
    box-shadow: 0 20px 40px -10px rgba(245, 158, 11, 0.15);
    background: linear-gradient(to bottom, #1e293b, #0f172a);
    position: relative;
}

.p-card-pro:hover {
    transform: translateY(-6px);
    box-shadow: 0 30px 60px -15px rgba(245, 158, 11, 0.3);
}

.pop-badge {
    position: absolute;
    top: -16px;
    /* Floating higher */
    left: 50%;
    transform: translateX(-50%);
    width: max-content;
    max-width: calc(100% - 1.5rem);
    white-space: nowrap;
    background: linear-gradient(to right, var(--c-primary), var(--c-primary-dark));
    color: #0f172a;
    font-size: 0.8rem;
    font-weight: 800;
    padding: 6px 20px;
    border-radius: 9999px;
    box-shadow: 0 4px 10px rgba(249, 115, 22, 0.4);
}

/* TYPOGRAPHY IN CARD */
.plan-name {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: white;
}

.plan-desc {
    font-size: 0.95rem;
    color: var(--c-text-muted);
    margin-bottom: 2rem;
    line-height: 1.5;
    min-height: 42px;
}

.plan-price {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1;
    letter-spacing: -0.03em;
    margin-bottom: 0.25rem;
    color: white;
    /* A long word price (e.g. "Custom" → German "Benutzerdefiniert")
       must wrap/hyphenate inside the ~232px card, never overflow it. */
    overflow-wrap: break-word;
    hyphens: auto;
}

.plan-period {
    font-size: 1rem;
    color: var(--c-text-muted);
    font-weight: 500;
}

.price-sub {
    font-size: 0.875rem;
    color: var(--c-text-muted);
    margin-top: 0.75rem;
    min-height: 20px;
}

.price-sub-green {
    color: #10b981;
    font-weight: 600;
}

/* BUTTONS */
.btn-action {
    width: 100%;
    padding: 14px;
    border-radius: 0.75rem;
    font-weight: 600;
    font-size: 1rem;
    text-align: center;
    display: block;
    text-decoration: none;
    transition: background-color 0.2s, border-color 0.2s, color 0.2s, box-shadow 0.2s, transform 0.2s;
    margin: 2rem 0;
}

.btn-primary {
    background: linear-gradient(135deg, var(--c-primary), var(--c-primary-dark));
    /* Dark ink on the warm brand: white measured 2.12:1 on the #fa9d26 end
       (1.86:1 once :hover brightened it), against 8.43:1 / 5.32:1 for this. */
    color: #0f172a;
    box-shadow: 0 4px 6px -1px rgba(245, 158, 11, 0.3);
    border: none;
}

.btn-primary:hover {
    filter: brightness(110%);
    box-shadow: 0 8px 12px -2px rgba(245, 158, 11, 0.4);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--c-border);
    color: white;
}

.btn-outline:hover {
    border-color: #94a3b8;
}

/* FEATURES */
.features {
    list-style: none;
    padding: 0;
    margin: 0;
    margin-top: auto;
}

.f-item {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
    font-size: 0.95rem;
    color: #cbd5e1;
    /* Slate 300 */
}

.icon-check {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    color: var(--c-primary);
}

.icon-check-gray {
    color: #64748b;
    /* Slate 500 */
}

.text-strong {
    font-weight: 600;
    color: white;
}

/* Mobile overrides */
@media (max-width: 640px) {
    .saas-title { font-size: 2rem; }
    .plan-price { font-size: 2.75rem; }
    .p-card { padding: 1.75rem; }
    .saas-header { margin-bottom: 2rem; }
}

@media (max-width: 640px) {
    /* Fixed layout + explicit column widths force all four plan columns to fit the
       viewport (content wraps inside each cell) instead of overflowing and hiding the
       upsold Pro / Agency columns behind a horizontal scroll. */
    .pricing-compare { table-layout: fixed; width: 100%; }
    .pricing-compare th,
    .pricing-compare td { padding: 0.5rem 0.38rem; font-size: 0.7rem; line-height: 1.3; overflow-wrap: anywhere; }
    .pricing-compare thead th:first-child { width: 28%; }
    .pricing-compare thead th:not(:first-child) { width: 24%; }
    .pricing-compare td[colspan] { font-size: 0.62rem; }
}
