/* Limit Popup Styles */
.limit-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 10000;
    display: flex;
    justify-content: center;
    align-items: center;
    animation: fadeIn 0.3s ease-in-out;
    pointer-events: auto;
}

.limit-popup {
    background: #ffffff;
    border-radius: 16px;
    padding: 0;
    max-width: 1200px;
    width: 95%;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    border: 1px solid #e5e7eb;
    animation: slideIn 0.4s ease-out;
    position: relative;
    overflow: hidden;
    max-height: 90vh;
    overflow-y: auto;
}

.popup-header {
    padding: 50px 50px 30px;
    background: #ffffff;
}

.limit-popup-icon {
    font-size: 48px;
    margin-bottom: 16px;
    color: #ef4444;
    display: block;
}

.popup-header h2 {
    color: #111827;
    font-size: 28px;
    margin-bottom: 12px;
    font-weight: 700;
    line-height: 1.2;
}

.popup-header p {
    color: #6b7280;
    font-size: 16px;
    line-height: 1.5;
    margin: 0;
}

.pricing-section {
    padding: 30px 50px 50px;
    background: #f9fafb;
}

.billing-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 40px;
    cursor: pointer;
    pointer-events: auto !important;
    z-index: 10001;
    position: relative;
}

.billing-toggle * {
    pointer-events: auto !important;
}

.toggle-label {
    font-size: 16px;
    font-weight: 500;
    color: #374151;
    transition: all 0.3s ease;
}

.toggle-label.active {
    font-weight: 700;
    color: #111827;
}

.toggle-switch {
    position: relative;
    width: 60px;
    height: 32px;
}

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

.toggle-switch label {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #d1d5db;
    border-radius: 32px;
    transition: 0.3s;
}

.toggle-switch label:before {
    position: absolute;
    content: "";
    height: 24px;
    width: 24px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    border-radius: 50%;
    transition: 0.3s;
}

.toggle-switch input:checked + label {
    background-color: rgb(43, 136, 79);
}

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

/* По умолчанию переключатель в положении Monthly (слева) */
.toggle-switch input:not(:checked) + label {
    background-color: #d1d5db;
}

.toggle-switch input:not(:checked) + label:before {
    transform: translateX(0);
}

.save-badge {
    background: rgb(43, 136, 79);
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.pricing-cards {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 32px;
    margin-bottom: 30px;
    padding: 0 20px;
}

.pricing-card {
    background: #ffffff;
    border-radius: 12px;
    padding: 40px 32px;
    border: 2px solid #e5e7eb;
    position: relative;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.pricing-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.pricing-card.popular {
    border-color: rgb(43, 136, 79);
    background: #ffffff;
    color: #111827;
    transform: scale(1.05);
}

.popular-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: rgb(43, 136, 79);
    color: white;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.card-header h3 {
    font-size: 24px;
    font-weight: 700;
    margin: 0 0 8px 0;
    color: inherit;
}

.card-header p {
    font-size: 14px;
    color: #6b7280;
    margin: 0 0 24px 0;
}

.pricing-card.popular .card-header p {
    color: #6b7280;
}

.pricing {
    margin-bottom: 24px;
}

.price {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 8px;
}

.current-price {
    font-size: 32px;
    font-weight: 700;
    color: #111827;
}

.pricing-card.popular .current-price {
    color: #111827;
}

.old-price {
    font-size: 32px;
    color: #9ca3af;
    text-decoration: none;
}

.period {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.current-period {
    font-size: 14px;
    color: #111827;
}

.old-period {
    font-size: 14px;
    color: #9ca3af;
}

.pricing-card.popular .current-period {
    color: #111827;
}

.pricing-card.popular .old-period {
    color: #9ca3af;
}

.pricing-btn {
    width: 100%;
    padding: 12px 24px;
    border: 2px solid #111827;
    background: transparent;
    color: #111827;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 12px;
}

.pricing-btn:hover {
    background: #111827;
    color: white;
}

.pricing-btn.primary {
    background: rgb(43, 136, 79);
    border-color: rgb(43, 136, 79);
    color: white;
}

.pricing-btn.primary:hover {
    background: #059669;
    border-color: #059669;
}

.pricing-card.popular .pricing-btn {
    background: rgb(43, 136, 79);
    color: white;
    border-color: rgb(43, 136, 79);
}

.pricing-card.popular .pricing-btn:hover {
    background: #059669;
    border-color: #059669;
}

.no-card {
    font-size: 12px;
    color: #9ca3af;
    margin: 0 0 24px 0;
}

.pricing-card.popular .no-card {
    color: #9ca3af;
}

.features {
    text-align: left;
    list-style: none;
    padding: 0;
    margin: 0;
}

.features-title {
    font-weight: 600;
    margin-bottom: 12px;
    color: #111827;
}

.pricing-card.popular .features-title {
    color: #111827;
}

.features li {
    padding: 8px 0;
    color: #374151;
    font-size: 14px;
    position: relative;
    padding-left: 0;
}

.features li:before {
    content: "";
    position: absolute;
    left: 0;
    color: rgb(43, 136, 79);
    font-weight: bold;
}

.pricing-card.popular .features li {
    color: #374151;
}

.enterprise-content {
    margin-bottom: 24px;
}

.enterprise-content .pricing-btn {
    margin-top: 48px;
    position: relative;
    z-index: 10001;
    pointer-events: auto !important;
    cursor: pointer !important;
}

.enterprise-content h4 {
    font-size: 20px;
    font-weight: 700;
    margin: 0 0 16px 0;
    color: #111827;
}

.blocked-message {
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 8px;
    padding: 16px;
    margin: 20px 40px 40px;
}

.blocked-message p {
    color: #dc2626;
    font-size: 16px;
    font-weight: 600;
    margin: 0;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-50px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Mobile Responsive */
@media (max-width: 1200px) {
    .limit-popup {
        max-width: 1000px;
    }
}

@media (max-width: 1024px) {
    .pricing-cards {
        grid-template-columns: 1fr 1fr;
        gap: 24px;
        padding: 0 15px;
    }
    
    .pricing-card.popular {
        transform: none;
    }
    
    .pricing-card {
        padding: 32px 24px;
    }
}

@media (max-width: 768px) {
    .limit-popup {
        margin: 20px;
        width: calc(100% - 40px);
        max-width: none;
    }
    
    .popup-header {
        padding: 30px 20px 15px;
    }
    
    .pricing-section {
        padding: 15px 20px 30px;
    }
    
    .pricing-cards {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .pricing-card.popular {
        transform: none;
    }
    
    .billing-toggle {
        flex-wrap: wrap;
        gap: 8px;
    }
    
    .blocked-message {
        margin: 15px 20px 30px;
    }
}

@media (max-width: 480px) {
    .popup-header h2 {
        font-size: 24px;
    }
    
    .current-price {
        font-size: 28px;
    }
    
    .old-price {
        font-size: 28px;
    }
    
    .pricing-card {
        padding: 24px 16px;
    }
}