/* Pricing Page Styles based on App Subscription Page */

:root {
    --color-primary-text: #1c1917;
    --color-secondary-text: #57534e;
}

/* Pricing Section Container */
.pricing-section-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 2rem 8rem 2rem; /* Increased horizontal padding from 1rem to 2rem */
    width: 100%;
}

/* Toggle Switch */
.pricing-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin-bottom: 3rem;
}

/* Diagram Annotation */
.diagram-annotation {
    position: absolute;
    left: 100%; /* Position to the right of the toggle */
    top: 50%;
    transform: translateY(-20%); /* Center vertically relative to toggle */
    display: flex;
    flex-direction: column-reverse; /* Arrow top, text bottom? No, Text top, Arrow bottom looks better usually. Let's try standard flow but adjust positions */
    align-items: flex-start;
    margin-left: 0.5rem;
    pointer-events: none; /* purely decorative */
    width: 140px; 
}

.hand-text {
    font-family: 'Kalamayka', sans-serif;
    color: #ea580c; /* Orange-600 */
    font-size: 1rem;
    line-height: 1.1;
    transform: rotate(-3deg);
    margin-left: 20px; /* Offset text to right of arrow start */
}

.arrow-curve {
    color: #1c1917; /* Black arrow looks cleaner like ink, or keep orange? Let's go black ink style or strict orange theme. User likes orange. */
    color: #ea580c;
    width: 50px;
    height: 30px;
    margin-top: -5px;
}

/* Remove old badge style */
.save-badge {
    display: none;
}


.billing-toggle {
    position: relative;
    display: inline-flex;
    align-items: center; /* Ensure vertical alignment */
    background: #f3f4f6;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    padding: 0.25rem;
}

.toggle-switch {
    display: grid;
    grid-template-columns: 1fr 1fr;
    position: relative;
    border-radius: 0.375rem; /* Matches slider */
    isolation: isolate;
}

.toggle-btn {
    position: relative;
    z-index: 2;
    padding: 0.375rem 1rem;
    background: transparent;
    border: none;
    color: var(--color-secondary-text);
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: color 0.3s ease;
    font-family: inherit;
    white-space: nowrap; /* Prevent breaking */
}

.toggle-btn.active {
    color: var(--color-primary-text);
}

.toggle-slider {
    position: absolute;
    top: 0;
    left: 0;
    width: 50%; /* Strictly 50% of toggle-switch */
    height: 100%;
    background: #ffffff;
    border-radius: 0.375rem;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    z-index: 1; /* Under buttons (z 2) */
}


.show-yearly .toggle-slider {
    transform: translateX(100%);
}

/* Grid Layout - Changed to Flex for fixed width cards */
.pricing-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.5rem;
    width: 100%;
}

/* Grid media queries removed in favor of flex-wrap */

/* Card Structure */
.pricing-card {
    background-color: #ffffff;
    border-radius: 2.5rem;
    width: 285px; /* Fixed width as requested */
    max-width: 100%;
    padding: 0.5rem;
    border: 1px solid rgba(0,0,0,0.05); 
    box-shadow: 0 1px 3px rgba(0,0,0,0.05); /* shadow-sm */
    display: flex;
    flex-direction: column;
    position: relative;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    flex-shrink: 0;
}

.pricing-card:hover {
    box-shadow: 0 10px 30px -10px rgba(0,0,0,0.1);
}

/* Card Header Colors */
.card-header {
    border-radius: 2rem;
    padding: 1.25rem; /* p-5 */
    height: 230px;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
}

.card-header.gray { background-color: #F3F4F6; }
.card-header.green { background-color: #DCFCE7; }
.card-header.blue { background-color: #DCE6F5; }
.card-header.purple { background-color: #F3E8FF; }
.card-header.gold { background-color: #FFEDD5; }

/* Plan Badge */
.plan-badge {
    display: inline-block;
    width: fit-content; /* Ensure it only takes needed width */
    padding: 0.5rem 1rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 2rem; /* mb-8 */
    border: 1px solid rgba(255,255,255,0.6);
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    position: relative;
    z-index: 10;
    color: #111;
}

.card-header.gray .plan-badge { background-color: #F9FAFB; }
.card-header.green .plan-badge { background-color: #F0FDF4; }
.card-header.blue .plan-badge { background-color: #E9EFF9; }
.card-header.purple .plan-badge { background-color: #FAF5FF; }
.card-header.gold .plan-badge { background-color: #FFF7ED; }

/* Images */
.header-img {
    position: absolute;
    top: 0;
    right: 0;
    object-fit: contain;
    opacity: 0.5;
    z-index: 0;
    pointer-events: none;
}
.header-img.basic { width: 8rem; height: 8rem; margin-top: 0.5rem; margin-right: 0.5rem; }
.header-img.premium { width: 11rem; height: 11rem; margin-top: -10px; margin-right: -10px; }
.header-img.ultra { width: 10rem; height: 10rem; margin-top: 1.5rem; margin-right: 0.5rem; }
.header-img.lifetime { width: 10rem; height: 10rem; margin-top: 6px; margin-right: -4px; opacity: 0.4; }

/* Pricing Text */
.header-content {
    flex: 1;
    position: relative;
    z-index: 10;
}

.price-wrapper {
    height: 3rem;
    margin-bottom: 0.25rem;
    position: relative;
}

.price-display {
    display: flex;
    align-items: baseline;
    gap: 0.25rem;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.price-display.hidden {
    opacity: 0;
    pointer-events: none;
    transform: translateY(10px);
}

.price-amount {
    font-size: 3rem; /* text-5xl */
    font-weight: 400;
    letter-spacing: -0.025em;
    color: #111;
    line-height: 1;
}

.price-period {
    font-size: 1.125rem; /* text-lg */
    font-weight: 500;
    color: #111;
}

.plan-subtitle {
    font-size: 0.875rem; /* text-sm */
    font-weight: 600;
    color: rgba(17, 24, 39, 0.8);
    margin-top: 0.5rem;
}

/* Button */
.card-btn {
    display: block;
    width: 100%;
    margin-top: 0.75rem;
    background-color: #111111;
    color: #ffffff;
    border-radius: 9999px;
    padding: 0.625rem;
    font-weight: 600;
    font-size: 0.875rem;
    text-align: center;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: opacity 0.2s;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.card-btn:hover {
    opacity: 0.9;
    color: #fff;
}

.card-btn.disabled {
    background-color: rgba(17,17,17,0.1);
    color: #111;
    cursor: default;
    box-shadow: none;
}
.card-btn.disabled:hover {
    opacity: 1;
}

/* Features */
.card-body {
    padding: 1.25rem;
    flex: 1;
}

.features-ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.feature-li {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    font-size: 0.9375rem; /* 15px */
    font-weight: 500;
    color: #57534e;
}

.flower-icon {
    color: #000;
    font-size: 1.2em;
    line-height: 1;
}

/* Visibility classes for JS toggle */
.price-monthly { display: flex; }
.price-yearly { display: none; }


.show-yearly .price-monthly { display: none; }
.show-yearly .price-yearly { display: flex; }

/* Pricing Page Animation - Fade In Up */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Base state for animated elements */
.pricing-header-animate, 
.pricing-controls,
.pricing-grid .pricing-card {
    opacity: 0;
    animation: fadeInUp 0.6s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

/* Stagger delays */
.pricing-header-animate {
    animation-delay: 0.1s;
}

.pricing-controls {
    animation-delay: 0.2s;
}

/* Stagger each card */
.pricing-grid .pricing-card:nth-child(1) { animation-delay: 0.3s; }
.pricing-grid .pricing-card:nth-child(2) { animation-delay: 0.4s; }
.pricing-grid .pricing-card:nth-child(3) { animation-delay: 0.5s; }
.pricing-grid .pricing-card:nth-child(4) { animation-delay: 0.6s; }
.pricing-grid .pricing-card:nth-child(5) { animation-delay: 0.7s; }



/* Student Annotation */
.student-annotation {
    position: absolute;
    top: -55px; 
    left: -79.167px; /* Specific position requested */
    display: flex;
    flex-direction: column;
    align-items: center;
    pointer-events: none;
    z-index: 20;
    width: 200px;
    opacity: 0;
    animation: fadeInUp 0.6s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
    animation-delay: 0.8s;
}

.student-text {
    font-family: 'Kalamayka', sans-serif;
    color: #ea580c; /* Orange-600 */
    font-size: 1rem;
    line-height: 1.1;
    transform: rotate(-3deg);
    margin-bottom: -5px;
    text-align: center;
}

.arrow-curve-student {
    color: #ea580c;
    width: 40px;
    height: 40px;
    position: absolute;
    bottom: -25px;
    right: 30px;
}

@media (max-width: 768px) {
    .pricing-controls {
        justify-content: flex-start;
    }
    
    .pricing-section-container {
        padding: 1rem;
    }
    
    .student-annotation {
        margin-top: 2rem;
        margin-bottom: 2rem;
        left: -60.167px;
        top: -70px;
    }

    .pricing-grid .pricing-card:nth-child(1) {
        position: relative;
        margin-top: 20px;
    }

    .arrow-curve-student {
        left: 118px;
        transform: rotate(0deg);
        right: auto; /* Reset right property */
    }
}
