/**
 * Upgrade Modal Styles
 * Beautiful glassmorphism modal for message limit reached
 * Matches Placidez design system with #7ef8ec gradient
 */

/* Modal Backdrop */
.upgrade-modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0.0, 0.2, 1);
}

.upgrade-modal-backdrop.show {
    opacity: 1;
    visibility: visible;
}

/* Modal Container */
.upgrade-modal {
    background: white;
    border-radius: 20px;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow: hidden;
    box-shadow: 
        0 20px 60px rgba(0, 0, 0, 0.2),
        0 8px 25px rgba(0, 0, 0, 0.1);
    transform: translateY(30px) scale(0.95);
    transition: all 0.3s cubic-bezier(0.4, 0.0, 0.2, 1);
    position: relative;
}

.upgrade-modal-backdrop.show .upgrade-modal {
    transform: translateY(0) scale(1);
}

/* Modal Header */
.upgrade-modal-header {
    background: linear-gradient(135deg, #7ef8ec 0%, #b3e3bc 100%);
    padding: 40px 30px 30px;
    text-align: center;
    color: white;
    position: relative;
}

.upgrade-modal-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(126, 248, 236, 0.9) 0%, rgba(179, 227, 188, 0.9) 100%);
    backdrop-filter: blur(10px);
}

.upgrade-modal-header > * {
    position: relative;
    z-index: 1;
}

.upgrade-modal-icon {
    font-size: 48px;
    margin-bottom: 15px;
    display: block;
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.1));
}

.upgrade-modal-title {
    font-family: 'Inter', sans-serif;
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 8px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.upgrade-modal-subtitle {
    font-family: 'Inter', sans-serif;
    font-size: 16px;
    font-weight: 400;
    opacity: 0.95;
    line-height: 1.5;
}

/* Modal Body */
.upgrade-modal-body {
    padding: 30px;
}

.upgrade-modal-description {
    font-family: 'Inter', sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: #666;
    margin-bottom: 25px;
    text-align: center;
}

/* Benefits List */
.upgrade-benefits {
    list-style: none;
    margin: 25px 0;
    padding: 0;
}

.upgrade-benefits li {
    display: flex;
    align-items: center;
    font-family: 'Inter', sans-serif;
    font-size: 15px;
    color: #444;
    margin-bottom: 12px;
    padding: 8px 0;
}

.upgrade-benefits li::before {
    content: '✓';
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    background: linear-gradient(135deg, #7ef8ec 0%, #b3e3bc 100%);
    color: white;
    border-radius: 50%;
    font-weight: bold;
    font-size: 14px;
    margin-right: 15px;
    flex-shrink: 0;
}

/* Action Buttons */
.upgrade-modal-actions {
    display: flex;
    gap: 12px;
    margin-top: 30px;
}

.upgrade-btn {
    flex: 1;
    padding: 16px 24px;
    border: none;
    border-radius: 12px;
    font-family: 'Inter', sans-serif;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    position: relative;
    overflow: hidden;
}

.upgrade-btn-primary {
    background: linear-gradient(135deg, #7ef8ec 0%, #b3e3bc 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(126, 248, 236, 0.3);
}

.upgrade-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(126, 248, 236, 0.4);
}

.upgrade-btn-primary:active {
    transform: translateY(0);
    box-shadow: 0 2px 10px rgba(126, 248, 236, 0.3);
}

.upgrade-btn-secondary {
    background: transparent;
    color: #666;
    border: 2px solid #e0e0e0;
}

.upgrade-btn-secondary:hover {
    background: #f8f9fa;
    border-color: #d0d0d0;
    color: #555;
}

/* Trust Indicators */
.upgrade-trust-indicators {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #f0f0f0;
}

.trust-indicator {
    display: flex;
    align-items: center;
    gap: 6px;
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    color: #888;
}

.trust-indicator-icon {
    font-size: 16px;
}

/* Close Button */
.upgrade-modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 32px;
    height: 32px;
    border: none;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    z-index: 2;
}

.upgrade-modal-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

/* Mobile Responsive */
@media (max-width: 480px) {
    .upgrade-modal {
        width: 95%;
        margin: 20px;
    }
    
    .upgrade-modal-header {
        padding: 30px 20px 25px;
    }
    
    .upgrade-modal-title {
        font-size: 24px;
    }
    
    .upgrade-modal-body {
        padding: 25px 20px;
    }
    
    .upgrade-modal-actions {
        flex-direction: column;
        gap: 10px;
    }
    
    .upgrade-btn {
        width: 100%;
        padding: 14px 20px;
    }
    
    .upgrade-trust-indicators {
        flex-direction: column;
        gap: 10px;
    }
}

/* Prevent body scroll when modal is open */
body.modal-open {
    overflow: hidden;
    position: fixed;
    width: 100%;
}

/* Animation classes */
@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes modalSlideOut {
    from {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
    to {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }
}

/* Button loading state */
.upgrade-btn.loading {
    pointer-events: none;
    opacity: 0.7;
}

.upgrade-btn.loading::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    border: 2px solid transparent;
    border-top: 2px solid currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Accessibility */
.upgrade-modal:focus {
    outline: 2px solid #7ef8ec;
    outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
    .upgrade-modal-backdrop,
    .upgrade-modal,
    .upgrade-btn {
        transition: none;
    }
    
    .upgrade-btn.loading::after {
        animation: none;
    }
}