/* ===== Noteroom Pricing – Warm Paper Theme ===== */

/* --- Reset & Base --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
    scrollbar-width: none;
}
html::-webkit-scrollbar { display: none; }

body {
    font-family: 'Inter', system-ui, sans-serif;
    color: #433422;
    background: #faf8f2;
    background-image: repeating-linear-gradient(
        transparent,
        transparent 31px,
        rgba(196, 184, 154, 0.18) 31px,
        rgba(196, 184, 154, 0.18) 32px
    );
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* Paper grain overlay */
body::after {
    content: '';
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 9999;
    opacity: 0.28;
    background: repeating-radial-gradient(
        circle at 1px 1px,
        rgba(120, 100, 70, 0.04) 0px,
        transparent 1px
    );
    background-size: 3px 3px;
}

/* Red margin line (desktop) */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 80px;
    width: 2px;
    height: 100vh;
    background: rgba(220, 80, 80, 0.25);
    z-index: 9998;
    pointer-events: none;
}

/* Hide old global grid bg */
.global-grid-bg { display: none !important; }

a { color: #5a4632; }

/* --- Nav --- */
.top-nav {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(250, 248, 242, 0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(196, 184, 154, 0.2);
}

.nav-content {
    max-width: 1100px;
    margin: 0 auto;
    padding: 14px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    gap: 4px;
}

.logo-text {
    font-family: 'Caveat', cursive;
    font-size: 1.55rem;
    font-weight: 700;
    color: #433422;
}

.logo-icon {
    width: 28px;
    height: 28px;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 18px;
}

.nav-link {
    font-family: 'Inter', sans-serif;
    font-size: 0.92rem;
    font-weight: 600;
    color: #5a4632 !important;
    text-decoration: none;
}

.nav-cta {
    font-family: 'Caveat', cursive;
    font-size: 1.1rem;
    padding: 7px 20px;
    border: 2px solid #c4b89a;
    background: rgba(255, 255, 255, 0.65);
    color: #5a4632;
    border-radius: 12px;
    text-decoration: none;
    box-shadow: 2px 3px 0 rgba(196, 184, 154, 0.25);
    transition: background 0.2s, transform 0.15s;
    transform: rotate(-0.5deg);
}

.nav-cta:hover {
    background: rgba(255, 255, 255, 0.9);
    transform: rotate(0deg) translateY(-1px);
}

/* --- Page Wrapper --- */
.page-wrapper {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 24px 60px;
}

/* --- Hero --- */
.pricing-hero {
    text-align: center;
    padding: 64px 0 48px;
}

.pricing-hero h1 {
    font-family: 'Caveat', cursive;
    font-size: 2.8rem;
    font-weight: 700;
    color: #433422;
    margin-bottom: 12px;
    transform: rotate(-0.5deg);
}

.pricing-subtitle {
    font-size: 1.05rem;
    color: #8b7964;
    max-width: 560px;
    margin: 0 auto;
    line-height: 1.7;
}

/* --- Pricing Grid --- */
.pricing-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 40px;
}

/* --- Pricing Card --- */
.pricing-card {
    position: relative;
    background: rgba(255, 255, 255, 0.55);
    border: 1.5px solid #c4b89a;
    border-radius: 4px 4px 10px 10px;
    box-shadow: 2px 3px 0 rgba(196, 184, 154, 0.2);
    padding: 28px 22px 24px;
    display: flex;
    flex-direction: column;
    border-top: 4px solid #c4b89a;
    transition: transform 0.2s, box-shadow 0.2s;
}

.pricing-card:hover {
    transform: translateY(-3px) rotate(-0.3deg);
    box-shadow: 3px 5px 0 rgba(196, 184, 154, 0.25);
}

/* Featured card */
.pricing-card.featured {
    border-top-color: #5a4632;
    background: rgba(255, 255, 255, 0.7);
    box-shadow: 3px 4px 0 rgba(90, 70, 50, 0.18);
    transform: scale(1.03);
}

.pricing-card.featured:hover {
    transform: scale(1.03) translateY(-3px) rotate(-0.3deg);
}

/* Badge */
.pricing-badge {
    position: absolute;
    top: -13px;
    left: 50%;
    transform: translateX(-50%) rotate(-1deg);
    font-family: 'Caveat', cursive;
    font-size: 0.95rem;
    font-weight: 700;
    background: #5a4632;
    color: #faf8f2;
    padding: 2px 16px;
    border-radius: 8px;
    white-space: nowrap;
}

/* Tier name */
.tier-name {
    font-family: 'Caveat', cursive;
    font-size: 1.6rem;
    font-weight: 700;
    color: #433422;
    margin-bottom: 6px;
}

/* Current plan badge */
.current-plan-badge {
    display: inline-block;
    font-family: 'Caveat', cursive;
    font-size: 0.85rem;
    background: rgba(196, 184, 154, 0.25);
    color: #5a4632;
    padding: 1px 10px;
    border-radius: 6px;
    margin-left: 8px;
    vertical-align: middle;
}

/* Tier price */
.tier-price {
    display: flex;
    align-items: baseline;
    gap: 4px;
    margin-bottom: 10px;
}

.price-amount {
    font-family: 'Caveat', cursive;
    font-size: 2.4rem;
    font-weight: 700;
    color: #433422;
    line-height: 1;
}

/* Decimal portion uses Inter for clarity */
.price-decimal {
    font-family: 'Inter', sans-serif;
    vertical-align: super;
}

.price-period {
    font-size: 0.9rem;
    color: #8b7964;
    font-weight: 500;
}

/* Tier description */
.tier-description {
    font-size: 0.88rem;
    color: #8b7964;
    line-height: 1.55;
    margin-bottom: 14px;
}

/* Divider */
.pricing-divider {
    height: 1px;
    background: rgba(196, 184, 154, 0.35);
    margin-bottom: 14px;
}

/* --- Feature List --- */
.feature-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 20px;
    flex: 1;
}

.feature-list li {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 0.85rem;
    color: #433422;
    line-height: 1.45;
}

.feature-list li strong {
    font-weight: 700;
    color: #5a4632;
}

.feature-highlight {
    font-weight: 500;
}

/* Check icon */
.check-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 16px;
    height: 16px;
    margin-top: 1px;
}

.check-icon svg {
    width: 12px;
    height: 12px;
    fill: none;
    stroke: #8b7964;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* --- Buttons --- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: 'Caveat', cursive;
    font-size: 1.15rem;
    font-weight: 700;
    padding: 10px 22px;
    border: 2px solid #c4b89a;
    background: rgba(255, 255, 255, 0.65);
    color: #5a4632;
    border-radius: 12px;
    cursor: pointer;
    text-decoration: none;
    box-shadow: 2px 3px 0 rgba(196, 184, 154, 0.25);
    transition: background 0.2s, transform 0.15s, box-shadow 0.15s;
    transform: rotate(-0.3deg);
    width: 100%;
    margin-top: auto;
}

.btn:hover {
    background: rgba(255, 255, 255, 0.9);
    transform: rotate(0deg) translateY(-1px);
    box-shadow: 2px 4px 0 rgba(196, 184, 154, 0.3);
}

.btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
    transform: none;
}

/* Primary / accent button */
.btn-primary,
.checkout-btn {
    background: #5a4632;
    color: #faf8f2;
    border-color: #5a4632;
}

.btn-primary:hover,
.checkout-btn:hover {
    background: #6d5840;
    color: #faf8f2;
}

/* Featured checkout button */
.btn-animated {
    position: relative;
}

/* Ghost button */
.btn-ghost {
    background: rgba(255, 255, 255, 0.45);
    color: #5a4632;
}

.btn-ghost:hover {
    background: rgba(255, 255, 255, 0.8);
}

/* Current/lower plan states */
.btn-current {
    background: rgba(196, 184, 154, 0.2) !important;
    color: #8b7964 !important;
    border-color: #c4b89a !important;
}

.btn-lower {
    background: transparent !important;
    color: #8b7964 !important;
    border-color: rgba(196, 184, 154, 0.4) !important;
}

.btn-sm {
    font-size: 1rem;
    padding: 6px 16px;
    width: auto;
}

.btn-xl {
    font-size: 1.25rem;
    padding: 14px 28px;
}

.is-current-plan {
    border-color: rgba(196, 184, 154, 0.5);
    opacity: 0.85;
}

.is-lower-plan {
    opacity: 0.6;
}

/* --- Manage sub link --- */
.manage-sub-link {
    margin-top: 16px;
    text-align: center;
}

/* --- Embedded Checkout Section --- */
.embedded-checkout-section {
    max-width: 520px;
    margin: 0 auto 40px;
}

.embedded-checkout-card {
    background: rgba(255, 255, 255, 0.6);
    border: 1.5px solid #c4b89a;
    border-radius: 4px 4px 10px 10px;
    border-top: 4px solid #5a4632;
    box-shadow: 2px 3px 0 rgba(196, 184, 154, 0.2);
    padding: 28px 28px 24px;
}

.embedded-checkout-header {
    margin-bottom: 20px;
}

.embedded-checkout-header h2 {
    font-family: 'Caveat', cursive;
    font-size: 1.6rem;
    color: #433422;
    margin-bottom: 4px;
}

.embedded-checkout-back {
    background: none;
    border: none;
    font-family: 'Inter', sans-serif;
    font-size: 0.88rem;
    color: #8b7964;
    cursor: pointer;
    padding: 0;
    margin-bottom: 12px;
    display: inline-block;
    transition: color 0.15s;
}

.embedded-checkout-back:hover { color: #5a4632; }

.embedded-checkout-price {
    font-family: 'Caveat', cursive;
    font-size: 1.3rem;
    color: #5a4632;
}

.embedded-checkout-legal {
    margin-bottom: 18px;
    font-size: 0.82rem;
    color: #8b7964;
    line-height: 1.5;
}

.embedded-checkout-legal label {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    cursor: pointer;
}

.embedded-checkout-legal input[type="checkbox"] {
    margin-top: 3px;
    accent-color: #5a4632;
}

.embedded-checkout-legal a { color: #5a4632; text-decoration: underline; }

#checkout-payment-element {
    margin-bottom: 18px;
}

.embedded-checkout-error {
    color: #c44;
    font-size: 0.85rem;
    margin-bottom: 12px;
}

/* --- Checkout success banner --- */
.checkout-success-banner {
    margin-top: 20px;
    padding: 14px 20px;
    background: rgba(255, 255, 255, 0.7);
    border: 1.5px solid #c4b89a;
    border-radius: 10px;
    font-size: 0.92rem;
    color: #433422;
    text-align: center;
}

.checkout-success-banner a {
    color: #5a4632;
    font-weight: 600;
    text-decoration: underline;
}

/* --- Cloud Note --- */
.pricing-cloud-note {
    text-align: center;
    padding: 24px 0 32px;
}

.pricing-cloud-note p {
    font-size: 0.88rem;
    color: #8b7964;
    max-width: 640px;
    margin: 0 auto;
    line-height: 1.65;
}

/* --- FAQ --- */
.faq-section {
    max-width: 680px;
    margin: 0 auto 48px;
}

.faq-section > h2 {
    font-family: 'Caveat', cursive;
    font-size: 2rem;
    color: #433422;
    text-align: center;
    margin-bottom: 28px;
    transform: rotate(-0.4deg);
}

.faq-item {
    border-bottom: 1px solid rgba(196, 184, 154, 0.3);
}

.faq-question {
    width: 100%;
    background: none;
    border: none;
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
    font-weight: 600;
    color: #433422;
    text-align: left;
    padding: 16px 0;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    transition: color 0.15s;
}

.faq-question:hover { color: #5a4632; }

.faq-chevron {
    width: 18px;
    height: 18px;
    stroke: #8b7964;
    flex-shrink: 0;
    transition: transform 0.25s;
}

.faq-item.open .faq-chevron {
    transform: rotate(180deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.faq-item.open .faq-answer {
    max-height: 300px;
}

.faq-answer-inner {
    padding: 0 0 16px;
    font-size: 0.88rem;
    color: #8b7964;
    line-height: 1.65;
}

/* --- Footer --- */
.pricing-footer {
    text-align: center;
    padding: 32px 0 16px;
    border-top: 1px solid rgba(196, 184, 154, 0.25);
    font-size: 0.82rem;
    color: #8b7964;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px 16px;
    margin-top: 8px;
}

.footer-links a {
    color: #8b7964;
    text-decoration: none;
    transition: color 0.15s;
}

.footer-links a:hover { color: #5a4632; }

/* --- Auth widget overrides (if present) --- */
.note-auth-widget {
    font-family: 'Inter', sans-serif;
}

/* --- Responsive --- */
@media (max-width: 1024px) {
    .pricing-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    body::before { display: none; } /* hide margin line on tablet */
}

@media (max-width: 680px) {
    .pricing-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

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

    .pricing-card.featured {
        transform: none;
    }
    .pricing-card.featured:hover {
        transform: translateY(-3px);
    }

    .nav-content { padding: 12px 16px; }
    .page-wrapper { padding: 0 16px 40px; }
    .pricing-hero { padding: 40px 0 32px; }

    .embedded-checkout-card { padding: 20px 16px; }
}

@media (max-width: 420px) {
    .pricing-hero h1 { font-size: 1.7rem; }
    .price-amount { font-size: 2rem; }
    .nav-actions { gap: 12px; }
}

/* ====== AUTH WIDGET — Paper Theme Overrides ====== */
:root {
    --accent-color: #5a4632;
    --accent-subtle: rgba(90,70,50,0.08);
    --surface-color: #faf8f2;
    --surface-1: rgba(196,184,154,0.1);
    --text-primary: #433422;
    --text-secondary: #8b7964;
    --text-tertiary: #b0a488;
    --on-accent-color: #faf8f2;
    --grid-color: #c4b89a;
    --shadow-lg: 0 10px 40px rgba(67,52,34,0.15);
}
.aw-modal-overlay {
    background: rgba(67,52,34,0.4) !important;
}
.aw-modal-card {
    background: #faf8f2 !important;
    border: 1.5px solid #c4b89a !important;
    border-radius: 16px !important;
    box-shadow: 4px 6px 0 rgba(196,184,154,0.25), 0 20px 60px rgba(67,52,34,0.15) !important;
}
.aw-modal-close {
    background: rgba(255,255,255,0.6) !important;
    border-color: #c4b89a !important;
    color: #8b7964 !important;
}
.aw-modal-close:hover {
    background: #fff !important;
    border-color: #5a4632 !important;
    color: #5a4632 !important;
}
.aw-auth-header h2 {
    font-family: 'Caveat', cursive !important;
    font-size: 1.5rem !important;
    color: #433422 !important;
}
.aw-auth-tabs {
    border-color: #c4b89a !important;
    border-radius: 10px !important;
}
.aw-auth-tab {
    background: rgba(196,184,154,0.1) !important;
    color: #8b7964 !important;
    font-family: 'Caveat', cursive !important;
    font-size: 1rem !important;
}
.aw-auth-tab.active {
    background: #5a4632 !important;
    color: #faf8f2 !important;
}
.aw-auth-input {
    background: rgba(255,255,255,0.7) !important;
    border: 1.5px solid #c4b89a !important;
    border-radius: 10px !important;
    color: #433422 !important;
}
.aw-auth-input:focus {
    border-color: #5a4632 !important;
    box-shadow: 0 0 0 2px rgba(90,70,50,0.1) !important;
}
.aw-auth-input::placeholder {
    color: #b0a488 !important;
}
.aw-auth-submit {
    background: #5a4632 !important;
    color: #faf8f2 !important;
    border-radius: 12px !important;
    font-family: 'Caveat', cursive !important;
    font-size: 1.1rem !important;
    font-weight: 700 !important;
    box-shadow: 2px 3px 0 rgba(90,70,50,0.2) !important;
}
.aw-auth-submit:hover {
    background: #433422 !important;
}
.aw-auth-google {
    background: rgba(255,255,255,0.7) !important;
    border: 1.5px solid #c4b89a !important;
    border-radius: 12px !important;
    color: #433422 !important;
}
.aw-auth-google:hover {
    border-color: #5a4632 !important;
    background: rgba(255,255,255,0.9) !important;
}
.aw-auth-divider { color: #b0a488 !important; }
.aw-auth-divider::before, .aw-auth-divider::after { background: #c4b89a !important; }
.aw-auth-legal { color: #b0a488 !important; }
.aw-auth-legal a { color: #5a4632 !important; }
.aw-dropdown {
    background: #faf8f2 !important;
    border: 1.5px solid #c4b89a !important;
    border-radius: 12px !important;
    box-shadow: 3px 4px 0 rgba(196,184,154,0.2), 0 10px 30px rgba(67,52,34,0.1) !important;
}
.aw-dropdown-email { color: #8b7964 !important; border-color: rgba(196,184,154,0.3) !important; }
.aw-dropdown-item { color: #433422 !important; border-radius: 8px !important; }
.aw-dropdown-item:hover { background: rgba(196,184,154,0.12) !important; }
.aw-avatar-btn { background: #5a4632 !important; color: #faf8f2 !important; }
.nav-cta {
    font-family: 'Caveat', cursive !important;
    font-size: 1rem !important;
    background: #5a4632 !important;
    color: #faf8f2 !important;
    border-radius: 12px !important;
    padding: 6px 18px !important;
    border: none !important;
    box-shadow: 2px 3px 0 rgba(90,70,50,0.2) !important;
}
.nav-cta:hover { background: #433422 !important; }
.aw-signin-btn {
    font-family: 'Caveat', cursive !important;
    font-size: 1rem !important;
    background: rgba(255,255,255,0.65) !important;
    color: #5a4632 !important;
    border: 2px solid #c4b89a !important;
    border-radius: 12px !important;
    padding: 5px 16px !important;
    box-shadow: 1px 2px 0 rgba(196,184,154,0.2) !important;
}
.aw-signin-btn:hover {
    background: rgba(255,255,255,0.95) !important;
    border-color: #5a4632 !important;
}
