/**
 * WC Wizard Modal Styles
 * Premium modal component with glassmorphism effects
 */

/* Modal Overlay */
.wc-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 999999;
    opacity: 0;
    animation: wc-modal-fade-in 0.3s ease-out forwards;
}

@keyframes wc-modal-fade-in {
    to {
        opacity: 1;
    }
}

@keyframes wc-modal-scale-in {
    to {
        transform: scale(1);
    }
}

.wc-modal-closing .wc-modal-container {
    animation: wc-modal-scale-out 0.2s ease-in forwards;
}

@keyframes wc-modal-scale-out {
    to {
        transform: scale(0.8);
    }
}

@keyframes wc-modal-fade-out {
    to {
        opacity: 0;
    }
}

/* Modal Container */
.wc-modal-container {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: var(--wc-wizard-modal-radius, 20px);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3),
        0 0 0 1px rgba(255, 255, 255, 0.1);
    max-width: var(--wc-wizard-modal-width, 600px);
    width: 90%;
    padding: 0;
    position: relative;
    transform: scale(0.8);
    animation: wc-modal-scale-in 0.3s ease-out forwards;
}

/* Modal Close Button */
.wc-modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.05);
    border: none;
    font-size: 20px;
    line-height: 1;
    color: #666;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    z-index: 10;
}

.wc-modal-close:hover {
    background: rgba(0, 0, 0, 0.1);
    color: #333;
    transform: rotate(90deg);
}

/* Modal Header & Icon */
.wc-modal-header {
    padding: 40px 30px 20px;
    text-align: center;
    border-radius: var(--wc-wizard-modal-radius, 20px) var(--wc-wizard-modal-radius, 20px) 0 0;
}

.wc-modal-icon {
    width: 72px;
    height: 72px;
    margin: 0 auto 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    background: rgba(99, 102, 241, 0.1);
    color: var(--wc-wizard-primary, #6366f1);
    animation: wc-modal-icon-bounce 0.5s ease-out;
}

@keyframes wc-modal-icon-bounce {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.1);
    }
}

/* Modal Type Variations */
/* Modal Type Variations */
.wc-modal-warning .wc-modal-header {
    background: linear-gradient(135deg, rgba(255, 193, 7, 0.1) 0%, rgba(255, 152, 0, 0.1) 100%);
}

.wc-modal-warning .wc-modal-icon {
    background: linear-gradient(135deg, #ffc107 0%, #ff9800 100%);
    box-shadow: 0 4px 15px rgba(255, 152, 0, 0.3);
    color: #fff;
}

.wc-modal-success .wc-modal-header {
    background: linear-gradient(135deg, rgba(76, 175, 80, 0.1) 0%, rgba(56, 142, 60, 0.1) 100%);
}

.wc-modal-success .wc-modal-icon {
    background: linear-gradient(135deg, #4caf50 0%, #388e3c 100%);
    box-shadow: 0 4px 15px rgba(76, 175, 80, 0.3);
    color: #fff;
}

.wc-modal-error .wc-modal-header {
    background: linear-gradient(135deg, rgba(244, 67, 54, 0.1) 0%, rgba(211, 47, 47, 0.1) 100%);
}

.wc-modal-error .wc-modal-icon {
    background: linear-gradient(135deg, #f44336 0%, #d32f2f 100%);
    box-shadow: 0 4px 15px rgba(244, 67, 54, 0.3);
    color: #fff;
}

.wc-modal-info .wc-modal-header {
    background: linear-gradient(135deg, rgba(33, 150, 243, 0.1) 0%, rgba(25, 118, 210, 0.1) 100%);
}

.wc-modal-info .wc-modal-icon {
    background: linear-gradient(135deg, #2196f3 0%, #1976d2 100%);
    box-shadow: 0 4px 15px rgba(33, 150, 243, 0.3);
    color: #fff;
}

/* Modal Body */
.wc-modal-body {
    padding: 0 30px 30px;
    text-align: center;
}

.wc-modal-title {
    font-size: var(--wc-wizard-modal-title-size, 26px);
    font-weight: 700;
    color: #333;
    margin: 0 0 10px;
    line-height: 1.3;
}

.wc-modal-message {
    font-size: var(--wc-wizard-modal-text-size, 16px);
    color: #666;
    line-height: 1.6;
    margin: 0 0 25px;
}

/* Modal Footer */
.wc-modal-footer {
    padding: 0 30px 30px;
    display: flex;
    gap: 10px;
    justify-content: center;
}

/* Modal Buttons */
.wc-modal-btn {
    padding: var(--wc-wizard-modal-btn-padding-y, 15px) var(--wc-wizard-modal-btn-padding-x, 35px);
    border: none;
    border-radius: var(--wc-wizard-modal-btn-radius, 10px);
    font-size: var(--wc-wizard-modal-btn-font-size, 16px);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 120px;
    position: relative;
    overflow: hidden;
}

.wc-modal-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.4s ease, height 0.4s ease;
}

.wc-modal-btn:hover::before {
    width: 300px;
    height: 300px;
}

.wc-modal-btn-primary {
    background: linear-gradient(135deg, #7b2cbf 0%, #5a189a 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(123, 44, 191, 0.3);
}

.wc-modal-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(123, 44, 191, 0.4);
}

.wc-modal-btn-primary:active {
    transform: translateY(0);
}

.wc-modal-btn-secondary {
    background: rgba(0, 0, 0, 0.05);
    color: #666;
}

.wc-modal-btn-secondary:hover {
    background: rgba(0, 0, 0, 0.1);
    color: #333;
}

/* Responsive */
@media (max-width: 600px) {
    .wc-modal-container {
        width: 95%;
        max-width: 100%;
        margin: 20px;
    }

    .wc-modal-header {
        padding: 30px 20px 15px;
    }

    .wc-modal-icon {
        width: 60px;
        height: 60px;
        font-size: 30px;
    }

    .wc-modal-body {
        padding: 0 20px 20px;
    }

    .wc-modal-footer {
        padding: 0 20px 20px;
        flex-direction: column;
    }

    .wc-modal-btn {
        width: 100%;
    }

    .wc-modal-title {
        font-size: 20px;
    }

    .wc-modal-message {
        font-size: 14px;
    }
}

/* Dark theme support */
@media (prefers-color-scheme: dark) {
    .wc-modal-container {
        background: rgba(30, 30, 30, 0.95);
        box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6),
            0 0 0 1px rgba(255, 255, 255, 0.05);
    }

    .wc-modal-title {
        color: #fff;
    }

    .wc-modal-message {
        color: #ccc;
    }

    .wc-modal-close {
        background: rgba(255, 255, 255, 0.1);
        color: #ccc;
    }

    .wc-modal-close:hover {
        background: rgba(255, 255, 255, 0.15);
        color: #fff;
    }

    .wc-modal-btn-secondary {
        background: rgba(255, 255, 255, 0.1);
        color: #ccc;
    }

    .wc-modal-btn-secondary:hover {
        background: rgba(255, 255, 255, 0.15);
        color: #fff;
    }
}