/* ===================================================================
   Site Theme – shared design tokens, card styles, and animations
   Used by: Home, Pricing, SubscriptionSelector, and future pages
   =================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@400;500;600;700&family=Source+Serif+4:wght@400;600&display=swap');

/* --- Design Tokens --- */
.site-theme {
    --ink: #1a2332;
    --muted: #526277;
    --accent: #00897b;
    --paper: #f6f7fb;
    --card: #ffffff;
    --shadow: 0 18px 40px rgba(15, 23, 42, 0.12);
    color: var(--ink);
    font-family: "Outfit", "Segoe UI", sans-serif;
}

.site-theme h1,
.site-theme h2,
.site-theme h3,
.site-theme h4 {
    color: var(--ink);
    letter-spacing: -0.02em;
}

.site-theme p {
    color: var(--muted);
}

/* --- Cards (feature, info, plan, onprem) --- */
.feature-card,
.info-card {
    background: var(--card);
    border-radius: 18px;
    padding: 2rem 1.75rem;
    box-shadow: var(--shadow);
    height: 100%;
    border: 2px solid transparent;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1),
                box-shadow 0.3s ease,
                border-color 0.3s ease;
}

.feature-card:hover,
.info-card:hover {
    transform: translateY(-6px) rotate(-0.5deg);
    box-shadow: 0 24px 48px rgba(15, 23, 42, 0.16);
    border-color: var(--accent);
}

.feature-card p,
.info-card p {
    margin-bottom: 0;
}

.plan-card {
    background: var(--card);
    border-radius: 18px;
    padding: 2rem 1.75rem;
    box-shadow: var(--shadow);
    height: 100%;
    display: flex;
    flex-direction: column;
    position: relative;
    border: 2px solid transparent;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1),
                box-shadow 0.3s ease,
                border-color 0.3s ease;
}

.plan-card:hover {
    transform: translateY(-6px) rotate(-0.5deg);
    box-shadow: 0 24px 48px rgba(15, 23, 42, 0.16);
    border-color: var(--accent);
}

.plan-card.featured {
    border-color: var(--accent);
}

.plan-card.current {
    border-color: #1565c0;
}

.onprem-card {
    background: var(--card);
    border-radius: 18px;
    padding: 2.5rem;
    box-shadow: var(--shadow);
}

/* --- Plan card internals --- */
.plan-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--accent);
    color: white;
    font-size: 0.8rem;
    font-weight: 600;
    padding: 4px 16px;
    border-radius: 12px;
    white-space: nowrap;
}

.plan-badge.current-badge {
    background: #1565c0;
}

.plan-header {
    text-align: center;
    margin-bottom: 1.5rem;
}

.plan-header h3 {
    margin-bottom: 0.75rem;
}

.plan-price {
    display: flex;
    align-items: baseline;
    justify-content: center;
    flex-wrap: wrap;
}

.plan-price .price {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--ink);
}

.plan-price .period {
    font-size: 1rem;
    color: var(--muted);
    margin-left: 4px;
}

.plan-price .billed-info {
    width: 100%;
    text-align: center;
    font-size: 0.85rem;
    color: var(--accent);
    margin-top: 2px;
}

.plan-features {
    list-style: none;
    padding: 0;
    margin: 0 0 1.5rem 0;
    flex-grow: 1;
}

.plan-features li {
    padding: 6px 0;
    color: var(--muted);
    font-size: 0.95rem;
}

.plan-features li i {
    color: var(--accent);
    margin-right: 8px;
}

.plan-features.compact li {
    padding: 3px 0;
    font-size: 0.9rem;
}

.plan-action {
    text-align: center;
}

.plan-action .btn-block {
    width: 100%;
}

.current-tier-badge {
    display: inline-block;
    background: #e3f2fd;
    color: #1565c0;
    font-size: 0.8rem;
    font-weight: 600;
    padding: 4px 14px;
    border-radius: 12px;
    margin-bottom: 10px;
}

/* --- Icon wrap --- */
.feature-icon-wrap {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(0, 137, 123, 0.12), rgba(0, 137, 123, 0.05));
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    color: var(--accent);
    transition: transform 0.3s ease, background 0.3s ease;
}

.feature-card:hover .feature-icon-wrap {
    transform: scale(1.1) rotate(5deg);
    background: linear-gradient(135deg, rgba(0, 137, 123, 0.2), rgba(0, 137, 123, 0.08));
}

.card-icon {
    color: var(--accent);
    margin-right: 8px;
}

/* --- Toggle switch --- */
.toggle-label {
    color: var(--muted);
    font-weight: 500;
    transition: color 0.2s;
}

.toggle-label.active {
    color: var(--ink);
    font-weight: 600;
}

.toggle-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 26px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: #ccc;
    border-radius: 26px;
    transition: 0.3s;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background: white;
    border-radius: 50%;
    transition: 0.3s;
}

.toggle-switch input:checked + .toggle-slider {
    background: var(--accent);
}

.toggle-switch input:checked + .toggle-slider:before {
    transform: translateX(24px);
}

.save-badge {
    display: inline-block;
    background: #e8f5e9;
    color: #2e7d32;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 12px;
    margin-left: 6px;
}

/* --- Buttons (accent-themed) --- */
.site-theme .btn-primary {
    background-color: var(--accent);
    border-color: var(--accent);
    box-shadow: 0 8px 20px rgba(0, 137, 123, 0.24);
    color: white;
}

.site-theme .btn-primary:hover {
    background-color: #00796b;
    border-color: #00796b;
}

.site-theme .btn-primary:disabled {
    background-color: #b0bec5;
    border-color: #b0bec5;
    box-shadow: none;
}

.site-theme .btn-success {
    background-color: var(--accent);
    border-color: var(--accent);
    box-shadow: 0 14px 30px rgba(0, 137, 123, 0.24);
}

.site-theme .btn-outline-primary {
    color: var(--accent);
    border-color: var(--accent);
}

.site-theme .btn-outline-primary:hover {
    background-color: var(--accent);
    color: white;
}

.site-theme .btn-outline-primary:disabled {
    color: #b0bec5;
    border-color: #b0bec5;
}

.site-theme .btn-outline-light {
    border-width: 2px;
}

.site-theme .btn-outline-light:hover {
    background-color: rgba(255, 255, 255, 0.15);
}

.hero-btn {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.hero-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 36px rgba(0, 137, 123, 0.3);
}

/* --- Empty state (no-data / upgrade CTA) --- */
.empty-state {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 50vh;
    padding: 2rem;
    animation: fade-up 0.6s ease both;
}

.empty-state-card {
    background: var(--card);
    border-radius: 18px;
    padding: 3rem 2.5rem;
    box-shadow: var(--shadow);
    text-align: center;
    max-width: 460px;
    width: 100%;
}

.empty-state-icon {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(0, 137, 123, 0.12), rgba(0, 137, 123, 0.05));
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
}

.empty-state-icon i {
    font-size: 1.75rem;
    color: var(--accent);
}

.empty-state-card h2 {
    margin-bottom: 0.75rem;
    font-size: 1.5rem;
    font-weight: 600;
}

.empty-state-card p {
    font-size: 0.95rem;
    margin-bottom: 1.75rem;
    line-height: 1.6;
}

.empty-state-card .btn {
    padding: 0.6rem 1.5rem;
    border-radius: 8px;
    font-weight: 500;
    transition: transform 0.2s, box-shadow 0.2s;
}

.empty-state-card .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(0, 137, 123, 0.32);
}

@media (max-width: 767px) {
    .empty-state-card {
        padding: 2rem 1.5rem;
    }
}

/* --- Animations --- */
.wobble {
    animation: wobble-in 0.7s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

@keyframes wobble-in {
    0% {
        opacity: 0;
        transform: translateY(30px) rotate(-2deg) scale(0.95);
    }
    60% {
        opacity: 1;
        transform: translateY(-4px) rotate(0.5deg) scale(1.01);
    }
    80% {
        transform: translateY(2px) rotate(-0.3deg) scale(0.995);
    }
    100% {
        opacity: 1;
        transform: translateY(0) rotate(0) scale(1);
    }
}

@keyframes fade-up {
    from {
        opacity: 0;
        transform: translateY(16px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --- Responsive --- */
@media (max-width: 767px) {
    .feature-card,
    .info-card {
        padding: 1.5rem 1.25rem;
    }

    .plan-card {
        padding: 1.5rem 1.25rem;
    }

    .feature-icon-wrap {
        width: 52px;
        height: 52px;
        font-size: 1.3rem;
    }
}
