/**
 * 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);
}

/* Request Modal */
.request-modal {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    z-index: 99999 !important;
    display: flex !important;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    padding: var(--spacing-md);
    margin: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
}

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

.request-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);
}

.request-modal-content {
    position: relative;
    background: var(--color-white);
    border-radius: 24px;
    padding: 40px;
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    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;
}

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

.request-modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: transparent;
    border: none;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border-radius: 50%;
    color: var(--color-text-light);
    transition: all 0.3s ease;
    z-index: 1;
}

.request-modal-close:hover {
    background: rgba(0, 0, 0, 0.05);
    color: var(--color-black);
}

.request-modal-close svg {
    width: 20px;
    height: 20px;
}

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

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

.request-modal-form {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-lg);
}

.request-modal-form .form-group {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xs);
}

.request-modal-form label {
    font-size: 14px;
    font-weight: 600;
    color: var(--color-black);
}

.request-modal-form input,
.request-modal-form textarea {
    width: 100%;
    padding: var(--spacing-md) var(--spacing-lg);
    border: 2px solid var(--color-border);
    border-radius: var(--radius-lg);
    font-size: var(--font-size-base);
    font-family: var(--font-family-primary);
    outline: none;
    transition: all 0.3s ease;
    background: var(--color-white);
}

.request-modal-form input:focus,
.request-modal-form textarea:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(44, 133, 192, 0.1);
}

.request-modal-form textarea {
    resize: vertical;
    min-height: 100px;
}

.request-modal-submit {
    width: 100%;
    padding: var(--spacing-md) var(--spacing-xl);
    font-size: var(--font-size-base);
    font-weight: var(--font-weight-semibold);
    margin-top: var(--spacing-sm);
}

/* Exit Intent Modal */
.exit-intent-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;
    padding: var(--spacing-md);
}

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

.exit-intent-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.exit-intent-content {
    position: relative;
    background: var(--color-white);
    border-radius: var(--radius-2xl);
    max-width: 500px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.3s ease-out;
}

.exit-intent-modal.active .exit-intent-content {
    animation: slideUp 0.3s ease-out;
}

.exit-intent-close {
    position: absolute;
    top: var(--spacing-md);
    right: var(--spacing-md);
    background: none;
    border: none;
    font-size: var(--font-size-3xl);
    color: var(--color-text-light);
    cursor: pointer;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-full);
    transition: all var(--transition-fast);
    z-index: 1;
    line-height: 1;
    padding: 0;
}

.exit-intent-close:hover {
    background: var(--color-background);
    color: var(--color-text);
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ROI Calculator Styles */
.roi-calculator .calculator-container {
    position: relative;
}

.roi-calculator input[type="number"]::-webkit-inner-spin-button,
.roi-calculator input[type="number"]::-webkit-outer-spin-button {
    opacity: 1;
}

.roi-calculator .calculator-result {
    transition: all 0.3s ease;
}

.roi-calculator .calculator-result:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

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

    .success-modal-title,
    .error-modal-title,
    .request-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;
    }

    .request-modal-subtitle {
        font-size: 14px;
    }

    .request-modal-close {
        top: 16px;
        right: 16px;
        width: 32px;
        height: 32px;
    }

    /* Exit Intent Modal Mobile */
    .exit-intent-content {
        max-width: 85%;
        padding: var(--spacing-lg) var(--spacing-md);
    }

    .exit-intent-close {
        top: var(--spacing-sm);
        right: var(--spacing-sm);
        width: 36px;
        height: 36px;
        font-size: var(--font-size-2xl);
    }

    /* ROI Calculator Mobile */
    .roi-calculator {
        padding: var(--spacing-3xl) var(--spacing-md) !important;
    }

    .roi-calculator .calculator-container {
        padding: var(--spacing-xl) var(--spacing-md);
    }

    .roi-calculator .calculator-inputs {
        gap: var(--spacing-lg) !important;
    }

    .roi-calculator .calculator-result {
        padding: var(--spacing-xl) var(--spacing-md);
    }

    .roi-calculator .calculator-result > div:first-child {
        font-size: var(--font-size-4xl) !important;
    }

    .roi-calculator .calculator-result > div:first-child span:last-child {
        font-size: var(--font-size-xl) !important;
    }

    .roi-calculator .calculator-result > div:last-child {
        grid-template-columns: 1fr !important;
        gap: var(--spacing-md) !important;
    }
}

/* ROI Calculator Tablet */
@media (min-width: 641px) and (max-width: 1024px) {
    .roi-calculator .calculator-result > div:last-child {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

