/**
 * ClubSmarter Modal Styles
 * Modernes Popup-System mit Animationen
 */

/* Success Modal */
.success-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.success-modal.active {
    opacity: 1;
    visibility: visible;
    pointer-events: all;
}

.success-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.7);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.success-modal-content {
    position: relative;
    background: var(--color-white);
    border-radius: 24px;
    padding: 48px 40px;
    max-width: 480px;
    width: 90%;
    box-shadow: 0 20px 60px rgba(44, 133, 192, 0.3);
    transform: scale(0.8) translateY(20px);
    opacity: 0;
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.4s ease;
    text-align: center;
}

.success-modal.active .success-modal-content {
    transform: scale(1) translateY(0);
    opacity: 1;
}

.success-modal-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 24px;
    position: relative;
}

.checkmark {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    display: block;
    stroke-width: 3;
    stroke: var(--color-success);
    stroke-miterlimit: 10;
    box-shadow: inset 0px 0px 0px var(--color-success);
    animation: fill 0.4s ease-in-out 0.4s forwards, scale 0.3s ease-in-out 0.9s both;
}

.checkmark-circle {
    stroke-dasharray: 166;
    stroke-dashoffset: 166;
    stroke-width: 3;
    stroke-miterlimit: 10;
    stroke: var(--color-success);
    fill: none;
    animation: stroke 0.6s cubic-bezier(0.65, 0, 0.45, 1) forwards;
}

.checkmark-check {
    transform-origin: 50% 50%;
    stroke-dasharray: 48;
    stroke-dashoffset: 48;
    stroke: var(--color-white);
    stroke-width: 3;
    animation: stroke 0.3s cubic-bezier(0.65, 0, 0.45, 1) 0.8s forwards;
}

@keyframes stroke {
    100% {
        stroke-dashoffset: 0;
    }
}

@keyframes scale {
    0%, 100% {
        transform: none;
    }
    50% {
        transform: scale3d(1.1, 1.1, 1);
    }
}

@keyframes fill {
    100% {
        box-shadow: inset 0px 0px 0px 40px var(--color-success);
    }
}

.success-modal-title {
    font-size: 28px;
    font-weight: 700;
    color: var(--color-black);
    margin: 0 0 12px 0;
    line-height: 1.2;
}

.success-modal-message {
    font-size: 16px;
    color: var(--color-text);
    margin: 0 0 32px 0;
    line-height: 1.6;
}

.success-modal-button {
    background: var(--gradient-primary);
    color: var(--color-white);
    border: none;
    border-radius: 12px;
    padding: 14px 32px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(44, 133, 192, 0.3);
    min-width: 160px;
}

.success-modal-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(44, 133, 192, 0.4);
}

.success-modal-button:active {
    transform: translateY(0);
}

/* Error Modal */
.error-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.error-modal.active {
    opacity: 1;
    visibility: visible;
    pointer-events: all;
}

.error-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.7);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.error-modal-content {
    position: relative;
    background: var(--color-white);
    border-radius: 24px;
    padding: 48px 40px;
    max-width: 480px;
    width: 90%;
    box-shadow: 0 20px 60px rgba(239, 68, 68, 0.2);
    transform: scale(0.8) translateY(20px);
    opacity: 0;
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.4s ease;
    text-align: center;
}

.error-modal.active .error-modal-content {
    transform: scale(1) translateY(0);
    opacity: 1;
}

.error-modal-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 24px;
    color: var(--color-error);
    animation: shake 0.5s ease-in-out;
}

.error-modal-icon svg {
    width: 100%;
    height: 100%;
}

@keyframes shake {
    0%, 100% {
        transform: translateX(0);
    }
    10%, 30%, 50%, 70%, 90% {
        transform: translateX(-5px);
    }
    20%, 40%, 60%, 80% {
        transform: translateX(5px);
    }
}

.error-modal-title {
    font-size: 28px;
    font-weight: 700;
    color: var(--color-black);
    margin: 0 0 12px 0;
    line-height: 1.2;
}

.error-modal-message {
    font-size: 16px;
    color: var(--color-text);
    margin: 0 0 32px 0;
    line-height: 1.6;
}

.error-modal-button {
    background: var(--color-error);
    color: var(--color-white);
    border: none;
    border-radius: 12px;
    padding: 14px 32px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
    min-width: 160px;
}

.error-modal-button:hover {
    background: #DC2626;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(239, 68, 68, 0.4);
}

.error-modal-button:active {
    transform: translateY(0);
}

/* Responsive */
@media (max-width: 640px) {
    .success-modal-content,
    .error-modal-content {
        padding: 36px 24px;
        max-width: 90%;
    }

    .success-modal-title,
    .error-modal-title {
        font-size: 24px;
    }

    .success-modal-message,
    .error-modal-message {
        font-size: 15px;
    }

    .success-modal-icon,
    .error-modal-icon {
        width: 64px;
        height: 64px;
        margin-bottom: 20px;
    }
}

