/* ========================================
   SHARED MODAL STYLES
   Common base styles for all custom modals
   ======================================== */

/* ==================== 
   MODAL OVERLAY BASE 
   ==================== */

.modal-overlay-base {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(8px);
    cursor: pointer;
}

/* ==================== 
   MODAL TRANSITIONS 
   ==================== */

.modal-fade-in {
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.modal-fade-in.active {
    opacity: 1;
    visibility: visible;
}

.modal-scale-up {
    transform: scale(0.9);
    opacity: 0;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease;
}

.modal-scale-up.active {
    transform: scale(1);
    opacity: 1;
}

.modal-slide-up {
    transform: translateY(100%);
    transition: transform 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.modal-slide-up.active {
    transform: translateY(0);
}

/* ==================== 
   COMMON BUTTON STYLES 
   ==================== */

.modal-btn-base {
    padding: 14px 24px;
    border: none;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.modal-btn-base:hover {
    transform: translateY(-2px);
}

.modal-btn-base:active {
    transform: translateY(0);
}

.modal-btn-primary {
    background: var(--accent-color);
    color: white;
    box-shadow: 0 4px 12px rgba(74, 158, 255, 0.3);
}

.modal-btn-primary:hover {
    background: var(--accent-color-hover);
    box-shadow: 0 6px 16px rgba(74, 158, 255, 0.4);
}

.modal-btn-secondary {
    background: var(--bg-color-3);
    color: var(--text-color);
    border: 2px solid var(--bg-color-5);
}

.modal-btn-secondary:hover {
    background: var(--bg-color-5);
    border-color: var(--bg-color-6);
}

.modal-btn-danger {
    background: #e74c3c;
    color: white;
    box-shadow: 0 4px 12px rgba(231, 76, 60, 0.3);
}

.modal-btn-danger:hover {
    background: #c0392b;
    box-shadow: 0 6px 16px rgba(231, 76, 60, 0.4);
}

/* ==================== 
   COMMON CLOSE BUTTON 
   ==================== */

.modal-close-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: var(--bg-color-3);
    color: var(--text-color-2);
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.modal-close-btn:hover {
    background: var(--bg-color-5);
    color: var(--text-color);
    transform: rotate(90deg);
}

/* ==================== 
   COMMON INPUT STYLES 
   ==================== */

.modal-input-base {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid var(--bg-color-5);
    background: var(--bg-color-2);
    border-radius: 12px;
    font-size: 15px;
    color: var(--text-color);
    transition: all 0.2s ease;
    font-family: inherit;
}

.modal-input-base:focus {
    outline: none;
    border-color: var(--accent-color);
    background: var(--bg-color-3);
    box-shadow: 0 0 0 4px rgba(74, 158, 255, 0.1);
}

.modal-input-base::placeholder {
    color: var(--text-color-3);
}

/* ==================== 
   COMMON LABEL STYLES 
   ==================== */

.modal-label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 8px;
    letter-spacing: -0.01em;
}

/* ==================== 
   DARK THEME ADJUSTMENTS 
   ==================== */

html[data-theme='dark'] .modal-overlay-base {
    background: rgba(0, 0, 0, 0.85);
}

html[data-theme='dark'] .modal-input-base:focus {
    box-shadow: 0 0 0 4px rgba(74, 158, 255, 0.15);
}

/* ==================== 
   RESPONSIVE 
   ==================== */

@media (max-width: 768px) {
    .modal-btn-base {
        padding: 12px 20px;
        font-size: 14px;
    }
    
    .modal-close-btn {
        width: 36px;
        height: 36px;
        font-size: 16px;
    }
}

