/* ============================================================
   Billing & Pricing Styles
   Shared across public pricing and authenticated billing pages
   ============================================================ */

/* --- Pricing Section Layout --- */
.pricing-section {
    padding: 0;
}

.pricing-header {
    text-align: center;
    margin-bottom: 32px;
}

.pricing-header h2 {
    font-size: 1.75rem;
    font-weight: 700;
    color: #444;
    margin-bottom: 8px;
}

.pricing-header p {
    color: #666;
    font-size: 0.95rem;
    margin-bottom: 0;
}

/* --- Billing Cycle Toggle --- */
.billing-toggle {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    background: #f5f5f5;
    border-radius: 50px;
    padding: 4px;
    margin-bottom: 32px;
}

.billing-toggle-btn {
    padding: 8px 24px;
    border-radius: 50px;
    border: none;
    background: transparent;
    font-size: 0.875rem;
    font-weight: 600;
    color: #666;
    cursor: pointer;
    transition: all 0.25s ease;
    position: relative;
}

.billing-toggle-btn.active {
    background: #fff;
    color: #444;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
}

.billing-toggle-save {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 700;
    color: #2e7d32;
    background: #e8f5e9;
    padding: 2px 8px;
    border-radius: 10px;
    margin-left: 4px;
    vertical-align: middle;
}

/* --- Plan Cards Grid --- */
.plan-cards-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    max-width: 1100px;
    margin: 0 auto;
}

@media (max-width: 991.98px) {
    .plan-cards-row {
        grid-template-columns: 1fr;
        max-width: 480px;
    }
}

@media (min-width: 992px) and (max-width: 1199.98px) {
    .plan-cards-row {
        gap: 16px;
    }
}

/* --- Individual Plan Card --- */
.plan-card {
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 12px;
    padding: 32px 28px;
    display: flex;
    flex-direction: column;
    position: relative;
    transition: box-shadow 0.25s ease, border-color 0.25s ease;
}

.plan-card:hover {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border-color: #d0d0d0;
}

.plan-card.plan-recommended {
    border-color: var(--appraisepoint-color, #a8914f);
    border-width: 2px;
}

.plan-card.plan-current {
    border-color: #2e7d32;
    border-width: 2px;
    background: #fcfdf9;
}

/* Recommended ribbon */
.plan-ribbon {
    position: absolute;
    top: -1px;
    right: 24px;
    background: var(--appraisepoint-color, #a8914f);
    color: #fff;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    padding: 6px 14px;
    border-radius: 0 0 8px 8px;
}

/* Current plan badge */
.plan-current-badge {
    position: absolute;
    top: -1px;
    left: 24px;
    background: #2e7d32;
    color: #fff;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    padding: 6px 14px;
    border-radius: 0 0 8px 8px;
}

/* Plan icon */
.plan-icon-wrap {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    margin-bottom: 16px;
}

.plan-icon-professional {
    background: #f0ebe3;
    color: var(--appraisepoint-color, #a8914f);
}

.plan-icon-business {
    background: #e8edf4;
    color: #3a5a8c;
}

.plan-icon-enterprise {
    background: #ede8f0;
    color: #6b4c7a;
}

/* Plan name */
.plan-name {
    font-size: 1.35rem;
    font-weight: 700;
    color: #444;
    margin-bottom: 4px;
}

/* Pricing display */
.plan-price {
    margin-bottom: 4px;
    min-height: 48px;
    display: flex;
    align-items: baseline;
    gap: 4px;
}

.plan-price-amount {
    font-size: 2.25rem;
    font-weight: 800;
    color: #444;
    line-height: 1;
}

.plan-price-currency {
    font-size: 1rem;
    font-weight: 600;
    color: #666;
}

.plan-price-period {
    font-size: 0.875rem;
    color: #888;
}

.plan-price-annual-note {
    font-size: 0.8rem;
    color: #888;
    margin-bottom: 0;
}

.plan-price-coming-soon {
    display: inline-block;
    background: #444;
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    padding: 5px 14px;
    border-radius: 20px;
    margin-bottom: 2px;
}

.plan-price-custom {
    display: inline-block;
    background: #f5f5f5;
    color: #555;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    padding: 5px 14px;
    border-radius: 20px;
    border: 1px solid #ddd;
    margin-bottom: 2px;
}

/* Plan summary (users, appraisals, storage) */
.plan-summary {
    font-size: 0.8rem;
    color: #888;
    margin-bottom: 20px;
    line-height: 1.4;
}

/* Features list */
.plan-features {
    list-style: none;
    padding: 0;
    margin: 0 0 24px 0;
    border-top: 1px solid #f0f0f0;
    padding-top: 20px;
    flex: 1;
}

.plan-features li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 5px 0;
    font-size: 0.85rem;
    color: #444;
    line-height: 1.4;
}

.plan-features li .feature-check {
    color: #2e7d32;
    font-size: 0.8rem;
    flex-shrink: 0;
    margin-top: 2px;
}

.plan-features li:first-child {
    font-weight: 600;
    color: #333;
}

/* Plan CTA */
.plan-cta {
    margin-top: auto;
    text-align: center;
}

.plan-cta .btn-plan {
    display: block;
    width: 100%;
    padding: 12px 20px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    transition: all 0.2s ease;
    border: none;
    cursor: pointer;
}

.btn-plan-primary {
    background: #444;
    color: #fff;
}

.btn-plan-primary:hover {
    background: #555;
    color: #fff;
}

.btn-plan-recommended {
    background: var(--appraisepoint-color, #a8914f);
    color: #fff;
}

.btn-plan-recommended:hover {
    background: #917a3e;
    color: #fff;
}

.btn-plan-outline {
    background: transparent;
    color: #444;
    border: 1.5px solid #ccc;
}

.btn-plan-outline:hover {
    border-color: #999;
    background: #fafafa;
    color: #444;
}

.btn-plan-current {
    background: #e8f5e9;
    color: #2e7d32;
    cursor: default;
    pointer-events: none;
    border: 1px solid #c0dcc0;
}

.btn-plan-enterprise {
    background: #444;
    color: #fff;
    border: 1.5px solid #444;
}

.btn-plan-enterprise:hover {
    background: #555;
    border-color: #555;
    color: #fff;
}

.plan-cta-note {
    font-size: 0.75rem;
    color: #999;
    margin-top: 8px;
    margin-bottom: 0;
}

/* --- Upgrade/Downgrade Labels --- */
.plan-change-label {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 4px;
}

.plan-change-upgrade {
    color: #1565c0;
}

.plan-change-downgrade {
    color: #888;
}

/* --- Plan Guidance Callout --- */
.plan-guidance {
    max-width: 1100px;
    margin: 40px auto 0;
    background: #faf8f3;
    border-left: 4px solid var(--appraisepoint-color, #a8914f);
    border-radius: 0 12px 12px 0;
    padding: 28px 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.plan-guidance h4 {
    font-size: 1.1rem;
    font-weight: 700;
    color: #444;
    margin-bottom: 4px;
}

.plan-guidance p {
    font-size: 0.875rem;
    color: #666;
    margin-bottom: 0;
}

@media (max-width: 767.98px) {
    .plan-guidance {
        flex-direction: column;
        text-align: center;
    }
}

/* --- Trust & Security Section --- */
.trust-section {
    max-width: 1100px;
    margin: 48px auto 0;
    text-align: center;
}

.trust-section h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: #444;
    margin-bottom: 4px;
}

.trust-section > p {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 28px;
}

.trust-item {
    text-align: center;
    padding: 20px;
}

.trust-item-icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    background: #f5f5f5;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    color: #555;
    margin-bottom: 12px;
}

.trust-item h5 {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 4px;
}

.trust-item p {
    font-size: 0.8rem;
    color: #888;
    margin-bottom: 0;
}

/* ============================================================
   Manage Subscription Page
   ============================================================ */

.manage-subscription-header {
    margin-bottom: 28px;
}

.manage-subscription-header h4 {
    font-size: 1.25rem;
    font-weight: 700;
    color: #444;
    margin-bottom: 4px;
}

.manage-subscription-header p {
    font-size: 0.875rem;
    color: #888;
    margin-bottom: 0;
}

/* Subscription info grid */
.sub-info-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

@media (max-width: 767.98px) {
    .sub-info-grid {
        grid-template-columns: 1fr;
    }
}

.sub-info-card {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 10px;
    padding: 16px 20px;
}

.sub-info-label {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #999;
    margin-bottom: 4px;
}

.sub-info-value {
    font-size: 0.95rem;
    font-weight: 600;
    color: #444;
}

/* Plan highlight card (larger, centered) */
.sub-plan-card {
    background: #fff;
    border: 2px solid var(--appraisepoint-color, #a8914f);
    border-radius: 12px;
    padding: 24px;
    text-align: center;
    margin-bottom: 24px;
}

.sub-plan-name {
    font-size: 1.5rem;
    font-weight: 700;
    color: #444;
    margin-bottom: 4px;
}

.sub-plan-price {
    font-size: 1.1rem;
    color: #555;
}

.sub-plan-price strong {
    color: #444;
}

/* Status badges for subscription */
.sub-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: capitalize;
}

.sub-status-active {
    background: #e8f5e9;
    color: #2e7d32;
}

.sub-status-trialing {
    background: #e3f2fd;
    color: #1565c0;
}

.sub-status-past_due,
.sub-status-unpaid {
    background: #fff3e0;
    color: #e65100;
}

.sub-status-canceled {
    background: #f5f5f5;
    color: #888;
}

.sub-status-incomplete {
    background: #fce4ec;
    color: #c62828;
}

/* Trial banner */
.billing-trial-banner {
    background: #e3f2fd;
    border: 1px solid #b0d0f0;
    border-radius: 10px;
    padding: 14px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
}

.billing-trial-banner i {
    font-size: 1.25rem;
    color: #1565c0;
}

.billing-trial-banner .trial-text {
    font-size: 0.875rem;
    color: #444;
}

.billing-trial-banner .trial-text strong {
    color: #1565c0;
}

/* Status alert banners */
.billing-alert-banner {
    border-radius: 10px;
    padding: 14px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
    font-size: 0.875rem;
}

.billing-alert-warning {
    background: #fff3e0;
    border: 1px solid #eed8b0;
    color: #e65100;
}

.billing-alert-info {
    background: #e3f2fd;
    border: 1px solid #b0d0f0;
    color: #1565c0;
}

.billing-alert-neutral {
    background: #f5f5f5;
    border: 1px solid #e0e0e0;
    color: #666;
}

/* --- Plan Hero (Manage page) --- */
.sub-plan-hero {
    background: linear-gradient(135deg, #faf8f3 0%, #f5f2ec 100%);
    border: 1px solid #e8e0d0;
    border-radius: 12px;
    padding: 24px;
}

.sub-plan-hero-icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
    flex-shrink: 0;
}

/* Stats row under plan hero */
.sub-plan-stats {
    display: flex;
    gap: 0;
    margin-top: 20px;
    border-top: 1px solid #e8e0d0;
    padding-top: 16px;
}

.sub-plan-stat {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 16px;
    border-right: 1px solid #e8e0d0;
}

.sub-plan-stat:first-child {
    padding-left: 0;
}

.sub-plan-stat:last-child {
    border-right: none;
}

.sub-plan-stat > i {
    font-size: 1rem;
    color: #999;
}

.sub-plan-stat-value {
    font-size: 1.1rem;
    font-weight: 700;
    color: #444;
    line-height: 1.2;
}

.sub-plan-stat-label {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: #999;
}

@media (max-width: 575.98px) {
    .sub-plan-stats {
        flex-direction: column;
        gap: 12px;
    }

    .sub-plan-stat {
        border-right: none;
        border-bottom: 1px solid #e8e0d0;
        padding: 0 0 12px 0;
    }

    .sub-plan-stat:last-child {
        border-bottom: none;
        padding-bottom: 0;
    }
}

/* --- Subscription Detail List --- */
.sub-detail-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.sub-detail-row {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 0;
    border-bottom: 1px solid #f0f0f0;
}

.sub-detail-row:last-child {
    border-bottom: none;
}

.sub-detail-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: #f5f5f5;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    color: #888;
    flex-shrink: 0;
}

.sub-detail-label {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #999;
    margin-bottom: 1px;
}

.sub-detail-value {
    font-size: 0.9rem;
    font-weight: 600;
    color: #444;
}

/* Action buttons area */
.manage-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.manage-actions .btn {
    border-radius: 8px;
    padding: 10px 24px;
    font-weight: 600;
    font-size: 0.875rem;
}

/* ============================================================
   Checkout Success / Cancel Pages
   ============================================================ */

.checkout-result-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 16px;
}

.checkout-result-icon.success {
    background: #e8f5e9;
    color: #2e7d32;
}

.checkout-result-icon.canceled {
    background: #fff3e0;
    color: #e65100;
}

.checkout-details-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin: 24px 0;
}

@media (max-width: 767.98px) {
    .checkout-details-grid {
        grid-template-columns: 1fr;
    }
}

.checkout-detail-card {
    background: #fafafa;
    border: 1px solid #eee;
    border-radius: 10px;
    padding: 14px 18px;
}

.checkout-detail-label {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #999;
    margin-bottom: 4px;
}

.checkout-detail-value {
    font-size: 0.9rem;
    font-weight: 600;
    color: #444;
}

/* ============================================================
   Public Pricing Page Overrides
   ============================================================ */

.pricing-public-hero {
    padding: 100px 0 32px;
    position: relative;
    background: #fff;
}

.pricing-public-hero__inner {
    max-width: 760px;
    margin: 0 auto;
    text-align: center;
    padding-top: 50px;
}

.pricing-public-hero .pricing-label {
    display: inline-block;
    background: #444;
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 6px 16px;
    border-radius: 20px;
    margin-bottom: 16px;
}

.pricing-public-hero h1 {
    font-size: 2.25rem;
    font-weight: 800;
    color: #444;
    margin-bottom: 8px;
}

.pricing-public-hero p {
    font-size: 1.05rem;
    color: #666;
    max-width: 560px;
    margin: 0 auto;
}

@media (max-width: 767.98px) {
    .pricing-public-hero {
        padding-top: 88px;
    }

    .pricing-public-hero__inner {
        padding-top: 36px;
    }

    .pricing-public-hero h1 {
        font-size: 1.6rem;
    }
}
