.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    padding: 20px;
    overflow: hidden;
}

.modal-overlay.show {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: 20px;
    width: 100%;
    max-width: 600px;
    position: relative;
    animation: modalSlideIn 0.3s ease-out;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    padding: 4px 24px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-title {
    font-size: 18px;
    font-weight: 700;
    color: #2c3e50;
}

.modal-close {
    background: none;
    border: none;
    font-size: 32px;
    color: #95a5a6;
    cursor: pointer;
    padding: 0;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.modal-close:hover {
    background-color: #f8f9fa;
    color: #7f8c8d;
}

.plan-selector {
    padding: 8px 24px 12px;
    overflow-y: auto;
    flex: 1;
}

.plan-options {
    display: flex;
    gap: 4px;
    margin-bottom: 6px;
}

.plan-option {
    flex: 1;
    padding: 6px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    background: white;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    text-align: center;
    font-weight: 600;
    color: #2c3e50;
    font-size: 13px;
}

.plan-option:hover {
    border-color: #3498db;
    transform: translateY(-2px);
}

.plan-option.active {
    border-color: #3498db;
    background-color: #f8f9fa;
}

.plan-badge {
    position: absolute;
    top: -8px;
    right: -6px;
    background: linear-gradient(135deg, #3498db, #2ecc71);
    color: white;
    padding: 2px 6px;
    border-radius: 10px;
    font-size: 10px;
    font-weight: 700;
}

.plan-details {
    text-align: center;
    margin: 12px 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.plan-price {
    font-size: 32px;
    font-weight: 700;
    color: #2c3e50;
    line-height: 0.8;
    display: flex;
    align-items: baseline;
    justify-content: center;
}

.plan-price-main {
    font-size: 32px;
}

.plan-price-decimal {
    font-size: 16px;
}

.plan-currency {
    font-size: 16px;
    margin-left: 2px;
}

.plan-period {
    color: #7f8c8d;
    font-size: 11px;
    line-height: 1;
    margin-top: 0;
}

.plan-savings {
    color: #2ecc71;
    font-weight: 600;
    font-size: 10px;
    line-height: 1;
    margin-top: 0;
    padding: 3px 8px;
    border-radius: 6px;
    background-color: rgba(46, 204, 113, 0.1);
    display: inline-block;
}

.features-list {
    margin: 8px 0;
}

.features-title {
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 4px;
    font-size: 13px;
}

.feature-item {
    display: flex;
    gap: 8px;
    margin-bottom: 3px;
    align-items: flex-start;
    color: #2c3e50;
    font-size: 15px;
    line-height: 1.4;
    padding-right: 4px;
}

.feature-item span {
    color: #34495e;
    font-weight: 500;
}

.feature-icon {
    color: #2ecc71;
    font-weight: 700;
    flex-shrink: 0;
    font-size: 15px;
    margin-top: 2px;
    text-shadow: 0 0 1px rgba(46, 204, 113, 0.2);
}

/* Add styles for the em dash to make it more visible */
.feature-item span em {
    color: #95a5a6;
    font-style: normal;
    padding: 0 2px;
}

.buy-premium-button {
    width: 100%;
    padding: 8px;
    background: linear-gradient(135deg, #3498db, #2ecc71);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-top: 4px;
}

.buy-premium-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.3);
}

/* Desktop-specific styles */
@media screen and (min-width: 769px) {
    .modal-content {
        max-height: none;
        height: auto;
    }

    .modal-header {
        padding: 4px 24px;
    }

    .plan-selector {
        overflow-y: visible;
        padding: 4px 24px 8px;
    }

    .plan-option {
        padding: 4px;
    }

    .plan-details {
        margin: 2px 0;
    }

    .features-list {
        margin: 4px 0;
    }

    .feature-item {
        letter-spacing: 0.15px;
        margin-bottom: 1px;
    }

    .feature-icon {
        margin-top: 2px;
    }
}

/* Mobile Styles */
@media (max-width: 768px) {
    .modal-overlay {
        padding: 0;
        align-items: flex-end;
        height: 100%;
        position: fixed;
        top: 0;
    }

    .modal-content {
        height: 85dvh;
        max-height: none;
        border-radius: 20px 20px 0 0;
        animation: modalSlideUp 0.3s ease-out;
        position: relative;
        margin-bottom: 0;
        /* Remove shadowy borders on mobile */
        box-shadow: none;
        border: none;
    }

    .modal-header {
        position: sticky;
        top: 0;
        background: white;
        z-index: 10;
        /* Remove shadowy borders on mobile */
        box-shadow: none;
        border-bottom: 1px solid #eee;
    }

    .modal-close {
        /* Remove shadowy borders on mobile */
        box-shadow: none;
    }

    .modal-close:hover {
        /* Remove shadowy borders on mobile */
        box-shadow: none;
        background-color: #f8f9fa;
        color: #7f8c8d;
    }

    .plan-selector {
        padding-bottom: env(safe-area-inset-bottom, 20px);
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        overscroll-behavior: contain;
    }

    .buy-premium-button {
        margin-bottom: env(safe-area-inset-bottom, 20px);
    }

    .modal-title {
        font-size: 22px;
    }

    .plan-selector {
        padding: 24px;
    }

    .plan-options {
        flex-direction: column;
        gap: 10px;
    }

    .plan-option {
        padding: 14px;
        /* Remove shadowy borders on mobile */
        box-shadow: none;
        border: 1px solid #e0e0e0;
        font-size: 15px;
    }

    /* Remove hover effects on mobile that create shadowy borders */
    .plan-option:hover {
        transform: none;
        box-shadow: none;
    }

    .plan-option.active {
        border-color: #3498db;
        background-color: #f8f9fa;
        box-shadow: none;
    }

    .plan-price {
        font-size: 40px;
    }

    .plan-price-main {
        font-size: 40px;
    }

    .plan-price-decimal {
        font-size: 24px;
    }

    .plan-currency {
        font-size: 24px;
    }

    .features-title {
        font-size: 18px;
        margin-bottom: 8px;
    }

    .feature-item {
        font-size: 16px;
        margin-bottom: 6px;
        line-height: 1.5;
    }

    .feature-icon {
        font-size: 16px;
    }

    .buy-premium-button {
        padding: 16px;
        font-size: 18px;
        /* Remove shadowy borders on mobile */
        box-shadow: none;
    }

    /* Remove hover effects on mobile that create shadowy borders */
    .buy-premium-button:hover {
        transform: none;
        box-shadow: none;
    }
}

/* Small Mobile Styles */
@media (max-width: 480px) {
    .modal-content {
        height: 90dvh;
        /* Remove shadowy borders on small mobile */
        box-shadow: none;
        border: none;
    }

    .modal-header {
        padding: 16px 18px;
        /* Remove shadowy borders on small mobile */
        box-shadow: none;
        border-bottom: 1px solid #eee;
    }

    .modal-close {
        /* Remove shadowy borders on small mobile */
        box-shadow: none;
    }

    .modal-close:hover {
        /* Remove shadowy borders on small mobile */
        box-shadow: none;
        background-color: #f8f9fa;
        color: #7f8c8d;
    }

    .modal-title {
        font-size: 20px;
    }

    .plan-selector {
        padding: 18px;
    }

    .plan-price {
        font-size: 36px;
    }

    .plan-price-main {
        font-size: 36px;
    }

    .plan-price-decimal {
        font-size: 20px;
    }

    .plan-currency {
        font-size: 20px;
    }

    .features-title {
        font-size: 16px;
        margin-bottom: 6px;
    }

    .feature-item {
        font-size: 14px;
        gap: 10px;
        margin-bottom: 5px;
        line-height: 1.5;
    }

    .feature-icon {
        font-size: 14px;
    }

    .buy-premium-button {
        padding: 14px;
        font-size: 16px;
        /* Remove shadowy borders on small mobile */
        box-shadow: none;
    }

    /* Remove hover effects on small mobile that create shadowy borders */
    .buy-premium-button:hover {
        transform: none;
        box-shadow: none;
    }
}

/* Prevent body scroll when modal is open */
body.no-scroll {
    overflow: hidden;
    /* Removed position: fixed as it causes scroll to jump to top */
    /* position: fixed; */
    /* width: 100%; */
} 