/* Custom Confirmation Modal Styles */

.custom-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.2s ease-out;
}

.custom-modal.hidden {
    display: none;
}

.custom-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(2px);
}

.custom-modal-content {
    position: relative;
    background: var(--color-white);
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow: hidden;
    animation: slideIn 0.3s ease-out;
    border: 2px solid var(--color-light);
}

.custom-modal-header {
    padding: 1.5rem 2rem 1rem 2rem;
    border-bottom: 1px solid var(--color-light);
    background: var(--color-light-grey, #f8f9fa);
}

.custom-modal-header h3 {
    margin: 0;
    font-size: 2.08rem; /* 1.6rem * 1.3 = 2.08rem */
    font-weight: 700;
    color: #000;
}

.custom-modal-body {
    padding: 1.5rem 2rem;
}

.custom-modal-body p {
    margin: 0;
    font-size: 1.69rem; /* 1.3rem * 1.3 = 1.69rem */
    line-height: 1.6;
    color: #000;
    font-weight: 600;
}

.custom-modal-footer {
    padding: 1rem 2rem 1.5rem 2rem;
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    border-top: 1px solid var(--color-light);
    background: var(--color-light-grey, #f8f9fa);
}

.custom-modal-footer .btn {
    min-width: 100px;
    padding: 0.8rem 1.5rem;
    font-weight: 600;
    border-radius: 8px;
    transition: all 0.2s ease;
    cursor: pointer;
    border: none;
    font-size: 1rem;
}

.custom-modal-footer .btn:focus {
    outline: 2px solid var(--color-main);
    outline-offset: 2px;
}

.custom-modal-footer .btn--sub {
    background: var(--color-light);
    color: var(--color-text);
    border: 2px solid var(--color-light);
}

.custom-modal-footer .btn--sub:hover {
    background: var(--color-light-grey);
    transform: translateY(-1px);
}

.custom-modal-footer .btn--main {
    background: var(--color-main);
    color: white;
}

.custom-modal-footer .btn--main:hover {
    background: var(--color-main-dark, #0056b3);
    transform: translateY(-1px);
}

.custom-modal-footer .btn--danger {
    background: var(--color-error);
    color: white;
}

.custom-modal-footer .btn--danger:hover {
    background: #d32f2f;
    transform: translateY(-1px);
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .custom-modal-content {
        width: 95%;
        margin: 1rem;
    }

    .custom-modal-header {
        padding: 1rem 1.5rem 0.8rem 1.5rem;
    }

    .custom-modal-header h3 {
        font-size: 1.82rem; /* 1.4rem * 1.3 = 1.82rem */
        color: #000;
    }

    .custom-modal-body {
        padding: 1rem 1.5rem;
    }

    .custom-modal-body p {
        font-size: 1.56rem; /* 1.2rem * 1.3 = 1.56rem */
        color: #000;
        font-weight: 600;
    }

    .custom-modal-footer {
        padding: 0.8rem 1.5rem 1rem 1.5rem;
        flex-direction: column-reverse;
    }

    .custom-modal-footer .btn {
        width: 100%;
        min-width: auto;
        padding: 0.9rem 1rem;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .custom-modal-content {
        background: var(--color-dark-bg, #2d3748);
        border-color: var(--color-dark-border, #4a5568);
    }

    .custom-modal-header,
    .custom-modal-footer {
        background: var(--color-dark-light, #374151);
        border-color: var(--color-dark-border, #4a5568);
    }

    .custom-modal-header h3 {
        color: var(--color-dark-text, #f7fafc);
    }

    .custom-modal-body p {
        color: var(--color-dark-text, #f7fafc);
        font-weight: 600;
    }

    .custom-modal-footer .btn--sub {
        background: var(--color-dark-light, #374151);
        color: var(--color-dark-text, #f7fafc);
        border-color: var(--color-dark-border, #4a5568);
    }

    .custom-modal-footer .btn--sub:hover {
        background: var(--color-dark-hover, #4a5568);
    }
}

/* High contrast mode */
@media (prefers-contrast: high) {
    .custom-modal-content {
        border-width: 3px;
    }

    .custom-modal-footer .btn {
        border-width: 2px;
        font-weight: 700;
    }

    .custom-modal-footer .btn:focus {
        outline-width: 3px;
    }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .custom-modal,
    .custom-modal-content {
        animation: none;
    }

    .custom-modal-footer .btn {
        transition: none;
    }

    .custom-modal-footer .btn:hover {
        transform: none;
    }
}
