﻿/* Modal Backdrop */
.modal-backdrop-custom {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(4px);
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0.4s ease;
}

    .modal-backdrop-custom.active {
        opacity: 1;
        visibility: visible;
    }

/* Modal Container */
.modal-container-custom {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, 100%); /* Start from bottom */
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    background-color: var(--color5);
    border: 1px solid var(--color1);
    border-radius: 12px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.5);
    z-index: 2001;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    
    transition: transform 0.5s cubic-bezier(0.19, 1, 0.22, 1), opacity 0.5s cubic-bezier(0.19, 1, 0.22, 1), visibility 0.5s cubic-bezier(0.19, 1, 0.22, 1);

    display: flex;
    flex-direction: column;
}

    /* Active State (Slide Up) */
    .modal-container-custom.active {
        transform: translate(-50%, -50%); /* Center screen */
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
    }

/* Header */
.modal-header-custom {
    padding: 1.5rem;
    border-bottom: 1px solid var(--color4);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255,255,255,0.02);
}

/* Body */
.modal-body-custom {
    padding: 2rem;
    overflow-y: auto;
    color: var(--color3);
    line-height: 1.6;
}

    /* Scrollbar within modal */
    .modal-body-custom::-webkit-scrollbar {
        width: 6px;
    }

    .modal-body-custom::-webkit-scrollbar-thumb {
        background-color: var(--color4);
        border-radius: 4px;
    }

    /* Content Styling */
    .modal-body-custom h4 {
        color: var(--color2);
        margin-top: 1.5rem;
        margin-bottom: 0.5rem;
    }

        .modal-body-custom h4:first-child {
            margin-top: 0;
        }

/* Close Button */
.modal-close-btn {
    background: transparent;
    border: none;
    color: var(--color4);
    font-size: 1.5rem;
    cursor: pointer;
    transition: color 0.3s;
}

    .modal-close-btn:hover {
        color: var(--color1);
    }