/* ===== ABXY CORNER CONFIRMATION MODAL STYLES ===== */

/* Modal overlay */
.abxy-corner-confirmation-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100vw;
    height: 100vh;
    background: rgb(0 0 0 / 0%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 15000;
    padding: 20px;
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-sizing: border-box;
}

.abxy-corner-confirmation-modal[style*="flex"] {
    opacity: 1;
}

/* Modern browsers with backdrop-filter support */
@supports (backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px)) {
    .abxy-corner-confirmation-modal {
        background: rgb(0 0 0 / 0%);
        backdrop-filter: blur(1px);
        -webkit-backdrop-filter: blur(1px);
    }
}

/* Modal content container - using performance-modal-content class for consistency */
#abxyCornerConfirmationModal .performance-modal-content {
    background: linear-gradient(145deg,
        rgba(var(--theme-primary-rgb), 0.15),
        rgba(var(--theme-secondary-rgb, 74, 107, 74), 0.25));
    border: 2px solid var(--theme-primary);
    border-radius: 20px;
    padding: 36px;
    max-width: 400px;
    width: 90%;
    text-align: center;
    box-shadow:
        0 20px 60px rgba(0, 0, 0, 0.9),
        0 8px 32px rgba(0, 0, 0, 0.6),
        0 0 0 1px rgba(var(--theme-primary-rgb), 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.15),
        inset 0 -1px 0 rgba(0, 0, 0, 0.2);
    animation: modalSlideIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    backdrop-filter: blur(16px) saturate(150%);
    -webkit-backdrop-filter: blur(16px) saturate(150%);
}

/* Modal title */
.abxy-corner-modal-title {
    color: var(--theme-text-light);
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 0 24px 0;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    letter-spacing: 0.5px;
}

/* Modal buttons container */
.abxy-corner-modal-buttons {
    display: flex;
    gap: 16px;
    justify-content: center;
    margin: 24px 0;
}

/* Modal buttons - matching performance modal close button style */
.abxy-corner-cancel-btn,
.abxy-corner-close-btn {
    background: linear-gradient(145deg, var(--theme-secondary), var(--theme-secondary-dark));
    border: 2px solid var(--theme-primary);
    border-radius: 8px;
    color: var(--theme-text-light);
    padding: 12px 24px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    min-width: 100px;
    position: relative;
    overflow: hidden;
    opacity: 0;
    transform: translateY(20px);
}

/* Button visibility animation - matching performance modal */
.performance-modal.visible .abxy-corner-cancel-btn,
.performance-modal.visible .abxy-corner-close-btn {
    opacity: 1;
    transform: translateY(0);
    transition-delay: 0.3s;
}

/* Selected button state */
.abxy-corner-cancel-btn.selected,
.abxy-corner-close-btn.selected {
    background: linear-gradient(145deg, var(--theme-primary), var(--theme-primary-dark));
    transform: translateY(-2px);
    box-shadow: 
        0 6px 16px rgba(var(--theme-primary-rgb), 0.4),
        0 2px 8px rgba(0, 0, 0, 0.3);
}

/* Close button specific styling */
.abxy-corner-close-btn {
    background: linear-gradient(145deg, #dc3545, #c82333);
    border-color: #dc3545;
}

.abxy-corner-close-btn.selected {
    background: linear-gradient(145deg, #e74c3c, #c0392b);
    border-color: #e74c3c;
    box-shadow: 
        0 6px 16px rgba(231, 76, 60, 0.4),
        0 2px 8px rgba(0, 0, 0, 0.3);
}

/* Button hover effects */
.abxy-corner-cancel-btn:hover,
.abxy-corner-close-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(var(--theme-primary-rgb), 0.4);
}

.abxy-corner-close-btn:hover {
    box-shadow: 0 6px 16px rgba(231, 76, 60, 0.4);
}

/* Button pressed state */
.abxy-corner-cancel-btn:active,
.abxy-corner-close-btn:active {
    transform: scale(0.95) translateY(1px);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
}

/* Hint text */
.abxy-corner-modal-hint {
    color: #adb5bd;
    font-size: 0.85rem;
    margin: 0;
    opacity: 0.8;
}

/* Modal animation */
@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: scale(0.8) translateY(-40px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* Theme variations - Updated to match actual theme system and correct class names */
.theme-grape .performance-modal-content {
    background: linear-gradient(145deg,
        rgba(147, 112, 219, 0.1),
        rgba(93, 78, 117, 0.2));
}

.theme-berry .performance-modal-content {
    background: linear-gradient(145deg,
        rgba(220, 20, 60, 0.1),
        rgba(139, 38, 53, 0.2));
}

.theme-teal .performance-modal-content {
    background: linear-gradient(145deg,
        rgba(32, 178, 170, 0.1),
        rgba(47, 95, 95, 0.2));
}

.theme-dandelion .performance-modal-content {
    background: linear-gradient(145deg,
        rgba(255, 215, 0, 0.1),
        rgba(184, 134, 11, 0.2));
}

.theme-atomic .performance-modal-content {
    background: linear-gradient(145deg,
        rgba(106, 76, 147, 0.1),
        rgba(61, 42, 92, 0.2));
}

/* Responsive design */
@media (max-width: 480px) {
    #abxyCornerConfirmationModal .performance-modal-content {
        width: 95%;
        padding: 24px 20px;
        border-radius: 16px;
    }

    .abxy-corner-modal-title {
        font-size: 1.3rem;
        margin-bottom: 20px;
    }

    .abxy-corner-modal-buttons {
        flex-direction: column;
        gap: 12px;
    }

    .abxy-corner-cancel-btn,
    .abxy-corner-close-btn {
        width: 100%;
        padding: 14px 20px;
        font-size: 0.85rem;
    }

    .abxy-corner-modal-hint {
        font-size: 0.8rem;
    }
}

/* Very small screens */
@media (max-width: 320px) {
    .abxy-corner-confirmation-modal {
        padding: 12px;
    }

    #abxyCornerConfirmationModal .performance-modal-content {
        width: 98%;
        padding: 20px 16px;
        border-radius: 12px;
    }

    .abxy-corner-modal-title {
        font-size: 1.2rem;
        margin-bottom: 16px;
    }

    .abxy-corner-cancel-btn,
    .abxy-corner-close-btn {
        font-size: 0.8rem;
        padding: 12px 16px;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    #abxyCornerConfirmationModal .performance-modal-content {
        border-width: 3px;
        background: rgba(0, 0, 0, 0.95);
    }

    .abxy-corner-cancel-btn,
    .abxy-corner-close-btn {
        border-width: 3px;
    }
}
