/* ========================================================================
   CUSTOM MODAL SYSTEM - macOS Tahoe-style black glass modals
   ======================================================================== */

#customModalContainer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 100000;
}

.custom-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: auto;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.custom-modal-overlay.visible {
    opacity: 1;
}

.custom-modal {
    min-width: 280px;
    max-width: 400px;
    border-radius: 14px;
    overflow: hidden;
    transform: scale(0.95);
    transition: transform 0.2s ease;
    backdrop-filter: blur(40px);
    -webkit-backdrop-filter: blur(40px);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.custom-modal-overlay.visible .custom-modal {
    transform: scale(1);
}

.custom-modal-header {
    padding: 16px 20px 8px;
    font-size: 15px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.95);
    text-align: center;
    background: rgba(30, 30, 32, 0.85);
}

.custom-modal-body {
    padding: 16px 20px;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.8);
    text-align: center;
    line-height: 1.5;
    background: rgba(28, 28, 30, 0.65);
}

.custom-modal-body p {
    margin: 0 0 12px 0;
}

.custom-modal-body p:last-child {
    margin-bottom: 0;
}

.custom-modal-input {
    width: 100%;
    padding: 10px 12px;
    margin-top: 8px;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.95);
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    outline: none;
    transition: border-color 0.2s ease;
}

.custom-modal-input:focus {
    border-color: rgba(255, 255, 255, 0.25);
}

.custom-modal-input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.custom-modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    padding: 12px 20px 16px;
    background: rgba(28, 28, 30, 0.65);
}

.custom-modal-btn {
    padding: 8px 16px;
    font-size: 14px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.85);
    background: transparent;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: color 0.15s ease, background 0.15s ease;
}

.custom-modal-btn:hover {
    color: rgba(255, 255, 255, 1);
    background: rgba(255, 255, 255, 0.08);
}

.custom-modal-btn:active {
    background: rgba(255, 255, 255, 0.12);
}

.custom-modal-btn.destructive {
    color: #ff6b6b;
}

.custom-modal-btn.destructive:hover {
    color: #ff8585;
    background: rgba(255, 107, 107, 0.1);
}

/* Single button centered */
.custom-modal-footer:has(.custom-modal-btn:only-child) {
    justify-content: center;
}
