/* assets/css/components/modal.css */
/* Confirmation Modal Component */

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: var(--light-color, #ffffff);
    color: var(--dark-color, #333);
    padding: 40px 30px 30px;
    /* Increment top padding for the X button */
    border-radius: calc(var(--border-radius) * 2.5);
    /* 20px if radius is 8px */
    text-align: center;
    max-width: 400px;
    width: 90%;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    transform: translateY(20px);
    transition: transform 0.3s ease;
    position: relative;
    /* Essential for absolute X button */
}

/* Close 'X' Button */
.modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    font-size: 24px;
    font-weight: bold;
    color: var(--dark-color);
    cursor: pointer;
    line-height: 1;
    z-index: 10100;
    /* Above regular content */
    opacity: 0.6;
    transition: opacity 0.2s, transform 0.2s;
    user-select: none;
}

.modal-close:hover {
    opacity: 1;
    transform: scale(1.1);
}

.modal-subtitle {
    font-size: 1.1rem;
    font-weight: 500;
    margin-top: -5px;
    margin-bottom: 15px;
    color: var(--secondary-color);
}

.modal-overlay.active .modal-content {
    transform: translateY(0);
}

.modal-icon {
    font-size: 50px;
    margin-bottom: 20px;
}

.modal-title {
    font-size: 1.5rem;
    font-weight: bold;
    margin-bottom: 10px;
    color: var(--primary-color);
}

.modal-text {
    font-size: 1rem;
    margin-bottom: 25px;
    line-height: 1.5;
}

.modal-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
}

.btn-modal {
    padding: 12px 24px;
    border-radius: 50px;
    border: none;
    font-weight: bold;
    cursor: pointer;
    transition: transform 0.2s, background-color 0.2s;
    font-size: 1rem;
}

.btn-modal:hover {
    transform: translateY(-2px);
}

.btn-confirm {
    background: var(--primary-color);
    color: white;
    box-shadow: 0 4px 10px rgba(106, 17, 203, 0.3);
    /* Uses primary color shadow */
}

.btn-cancel {
    background: var(--danger-color, #f44336);
    color: white;
}

/* Theme Awareness */
[data-theme="dark"] .modal-content {
    background: #1a1a1a;
    color: #ffffff;
}

[data-theme="dark"] .modal-text {
    color: #cccccc;
}

[data-theme="dark"] .btn-cancel {
    opacity: 0.9;
}