/* Modal Library CSS - Shared across all pages */
:root {
    --primary-color: #485fc7;
    --primary-light: #eff1fa;
    --primary-dark: #3e4ed0;
    --success-color: #48c78e;
    --warning-color: #ffdd57;
    --danger-color: #f14668;
    --info-color: #3e8ed0;
    --background-light: #f8f9fa;
    --text-dark: #363636;
    --text-light: #6c757d;
    --border-light: #e9ecef;
    --shadow-light: 0 2px 16px rgba(72, 95, 199, 0.1);
    --shadow-medium: 0 4px 24px rgba(72, 95, 199, 0.15);
    --border-radius: 1.5rem;
    --border-radius-sm: 1rem;
    --gradient-primary: linear-gradient(135deg, #485fc7 0%, #3e8ed0 100%);
    --gradient-success: linear-gradient(135deg, #48c78e 0%, #00d1b2 100%);
    --gradient-warning: linear-gradient(135deg, #ffdd57 0%, #ffd83d 100%);
    --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Modal Overlay */
.helik-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition-smooth);
    backdrop-filter: blur(4px);
}

.helik-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Modal Content */
.helik-modal-content {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-medium);
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    transform: scale(0.9) translateY(-20px);
    transition: var(--transition-smooth);
    position: relative;
}

.helik-modal-overlay.active .helik-modal-content {
    transform: scale(1) translateY(0);
}

/* Modal Close Button */
.helik-modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 36px;
    height: 36px;
    border: none;
    background: var(--background-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition-smooth);
    z-index: 10;
    color: var(--text-light);
    font-size: 1.2rem;
}

.helik-modal-close:hover {
    background: var(--border-light);
    color: var(--text-dark);
    transform: rotate(90deg);
}

.helik-modal-close:active {
    transform: rotate(90deg) scale(0.95);
}

/* Modal Header */
.helik-modal-header {
    padding: 2rem 2rem 1rem;
    text-align: center;
    border-bottom: 1px solid var(--border-light);
}

.helik-modal-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1rem;
    background: var(--gradient-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 2rem;
}

.helik-modal-icon.success {
    background: var(--gradient-success);
}

.helik-modal-icon.warning {
    background: var(--gradient-warning);
    color: var(--text-dark);
}

.helik-modal-icon.danger {
    background: linear-gradient(135deg, #f14668 0%, #ff3860 100%);
    color: white;
}

.helik-modal-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

.helik-modal-message {
    font-size: 1rem;
    color: var(--text-light);
    line-height: 1.6;
}

/* Modal Body */
.helik-modal-body {
    padding: 1rem 2rem;
}

/* Modal Footer */
.helik-modal-footer {
    padding: 1rem 2rem 2rem;
    display: flex;
    gap: 1rem;
    justify-content: center;
}

/* Modal Buttons */
.helik-modal-button {
    padding: 0.75rem 2rem;
    border: none;
    border-radius: var(--border-radius-sm);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-smooth);
    min-width: 120px;
}

.helik-modal-button.primary {
    background: var(--gradient-primary);
    color: white;
}

.helik-modal-button.primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(72, 95, 199, 0.3);
}

.helik-modal-button.secondary {
    background: var(--background-light);
    color: var(--text-dark);
    border: 1px solid var(--border-light);
}

.helik-modal-button.secondary:hover {
    background: var(--border-light);
    transform: translateY(-2px);
}

.helik-modal-button.success {
    background: var(--gradient-success);
    color: white;
}

.helik-modal-button.success:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(72, 199, 142, 0.3);
}

.helik-modal-button.danger {
    background: linear-gradient(135deg, #f14668 0%, #ff3860 100%);
    color: white;
}

.helik-modal-button.danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(241, 70, 104, 0.3);
}

.helik-modal-button.warning {
    background: var(--gradient-warning);
    color: var(--text-dark);
}

.helik-modal-button.warning:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(255, 221, 87, 0.3);
}

/* Responsive Design */
@media (max-width: 768px) {
    .helik-modal-content {
        width: 95%;
        margin: 1rem;
    }
    
    .helik-modal-header {
        padding: 1.5rem 1.5rem 1rem;
    }
    
    .helik-modal-body {
        padding: 1rem 1.5rem;
    }
    
    .helik-modal-footer {
        padding: 1rem 1.5rem 1.5rem;
        flex-direction: column;
    }
    
    .helik-modal-button {
        width: 100%;
        min-width: auto;
    }
    
    .helik-modal-icon {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
    }
    
    .helik-modal-title {
        font-size: 1.25rem;
    }
    
    .helik-modal-message {
        font-size: 0.9rem;
    }
}

/* Animation keyframes */
@keyframes helik-modal-fadeIn {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(-20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

@keyframes helik-modal-fadeOut {
    from {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
    to {
        opacity: 0;
        transform: scale(0.9) translateY(-20px);
    }
}