/* Modal backdrop */
.modal {
    display: none; /* hidden by default */
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 9999;

    align-items: center;
    justify-content: center;
}

/* Modal box */
.modal-content {
    background: #ffffff;
    width: 90%;
    max-width: 450px;
    padding: 24px;
    border-radius: 10px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.25);
    animation: modalFadeIn 0.25s ease-out;
}

/* Scrollable terms box */
.terms-box {
    max-height: 180px;
    overflow-y: auto;
    margin: 15px 0;
    padding: 12px;
    border: 1px solid #e5e5e5;
    border-radius: 6px;
    background: #fafafa;
    font-size: 14px;
}

/* Actions */
.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 15px;
}

.modal-actions button {
    padding: 8px 16px;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
}

/* OK button (primary) */
#acceptBtn {
    background: #4564b2;
    color: #fff;
}

#acceptBtn:hover {
    background: #345095;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

/* Cancel button (secondary) */
.modal-actions button:last-child {
    background: #e0e0e0;
    color: #333;
}

.modal-actions button:last-child:hover {
    background: #cfcfcf;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

#acceptBtn:disabled {
    background: #a0a0a0;
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}

#acceptBtn:disabled:hover {
    background: #a0a0a0;
    transform: none;
    box-shadow: none;
}


/* Fade animation */
@keyframes modalFadeIn {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}