/* ============================================
   Custom Modal System CSS
   Replaces JavaScript alert/confirm/prompt
   ============================================ */

/* Modal Overlay */
.modal-overlay-custom {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.modal-overlay-custom.active {
    opacity: 1;
    visibility: visible;
}

/* Modal Container */
.modal-container-custom {
    background: #2c3e50;
    border-radius: 12px;
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.1), 0 8px 32px rgba(0, 0, 0, 0.5), 0 0 80px rgba(227, 145, 57, 0.15);
    width: 100%;
    max-width: 420px;
    transform: scale(0.9) translateY(-20px);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.modal-overlay-custom.active .modal-container-custom {
    transform: scale(1) translateY(0);
}

/* Header */
.modal-header-custom {
    background: linear-gradient(180deg, #34495e 0%, #2c3e50 100%);
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px 12px 0 0;
}

.modal-title-custom {
    margin: 0;
    font-size: 1.125rem;
    font-weight: 600;
    color: #e39139;
}

/* Body */
.modal-body-custom {
    padding: 1.5rem;
}

.modal-message-custom {
    margin: 0;
    font-size: 0.9375rem;
    line-height: 1.6;
    color: #e0e0e0;
}

/* Input */
.modal-input-custom {
    width: 100%;
    padding: 0.875rem 1rem;
    margin-top: 1rem;
    font-size: 1rem;
    color: #e0e0e0;
    background: #1a1a1a;
    border: 2px solid #3a3a3a;
    border-radius: 8px;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    box-sizing: border-box;
}

.modal-input-custom:focus {
    border-color: #e39139;
    box-shadow: 0 0 0 3px rgba(227, 145, 57, 0.2);
}

.modal-input-custom::placeholder {
    color: #666;
}

/* Footer */
.modal-footer-custom {
    padding: 1rem 1.5rem 1.25rem;
    background: linear-gradient(180deg, #2c3e50 0%, #263544 100%);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 0 0 12px 12px;
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
}

.modal-footer-custom.modal-footer-centered {
    justify-content: center;
}

/* Buttons */
.modal-btn {
    padding: 0.75rem 1.5rem;
    font-size: 0.9375rem;
    font-weight: 500;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 90px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.modal-btn:focus {
    outline: 2px solid #e39139;
    outline-offset: 2px;
}

.modal-btn-primary {
    background: linear-gradient(180deg, #3498db 0%, #2980b9 100%);
    color: #ffffff;
}

.modal-btn-primary:hover {
    background: linear-gradient(180deg, #5dade2 0%, #3498db 100%);
}

.modal-btn-primary:active {
    transform: scale(0.98);
}

.modal-btn-cancel {
    background: rgba(255, 255, 255, 0.08);
    color: #b0b0b0;
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.modal-btn-cancel:hover {
    background: rgba(255, 255, 255, 0.12);
    color: #e0e0e0;
}

.modal-btn-cancel:active {
    transform: scale(0.98);
}

.modal-btn-danger {
    background: linear-gradient(180deg, #e74c3c 0%, #c0392b 100%);
    color: #ffffff;
}

.modal-btn-danger:hover {
    background: linear-gradient(180deg, #ec7063 0%, #e74c3c 100%);
}

.modal-btn-danger:active {
    transform: scale(0.98);
}

/* Responsive adjustments */
@media (max-width: 480px) {
    .modal-container-custom {
        max-width: 95%;
        margin: 0 10px;
    }

    .modal-header-custom,
    .modal-body-custom,
    .modal-footer-custom {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .modal-btn {
        padding: 0.625rem 1rem;
        min-width: 70px;
    }
}
