﻿/* ===============================
   MODAL OVERLAY (BACKGROUND)
================================= */
.cert-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1050;
    display: none !important; /* hidden by default */
}

    /* SHOW MODAL (CENTER PERFECTLY) */
    .cert-modal-overlay.show {
        display: flex !important;
        align-items: center;
        justify-content: center;
    }

/* ===============================
   MODAL BOX (RECTANGLE CARD)
================================= */
.cert-modal-box {
    background: #ffffff;
    width: 420px;
    max-width: 90%;
    max-height: 80vh;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
    animation: modalFadeIn 0.25s ease;
}

/* ===============================
   TITLE
================================= */
.cert-modal-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 15px;
    color: #333;
}

/* ===============================
   CERTIFICATE LIST
================================= */
.cert-list {
    max-height: 220px;
    overflow-y: auto;
    margin-bottom: 15px;
    padding-right: 5px;
}

    /* SCROLLBAR (OPTIONAL CLEAN LOOK) */
    .cert-list::-webkit-scrollbar {
        width: 6px;
    }

    .cert-list::-webkit-scrollbar-thumb {
        background: #ccc;
        border-radius: 10px;
    }

/* ===============================
   EACH ITEM
================================= */
.cert-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 4px;
    font-size: 13px;
    color: #333;
    cursor: pointer;
    border-radius: 4px;
    transition: background 0.2s;
}

    .cert-item:hover {
        background: #f5f5f5;
    }

    /* CHECKBOX */
    .cert-item input {
        width: 15px;
        height: 15px;
        cursor: pointer;
    }

/* ===============================
   FOOTER BUTTONS
================================= */
.cert-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

    /* BUTTON BASE */
    .cert-actions button {
        padding: 6px 14px;
        font-size: 12px;
        border-radius: 4px;
        border: none;
        cursor: pointer;
    }

/* CANCEL BUTTON */
.btn-cancel {
    background: #e0e0e0;
    border: 1px solid #ccc;
}

    .btn-cancel:hover {
        background: #d5d5d5;
    }

/* CONFIRM BUTTON */
.btn-confirm {
    background: #1565C0;
    color: #fff;
}

    .btn-confirm:hover {
        background: #0d47a1;
    }

/* ===============================
   ANIMATION
================================= */
@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

.cert-modal-box {
    position: relative;
}

    .cert-modal-box .btn-close {
        position: absolute;
        top: 10px;
        right: 10px;
    }
