/* Contact Form Popup Overlay */
.contact-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 999;
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 200ms ease;
    pointer-events: auto;
}

.contact-overlay.show {
    display: flex;
    opacity: 1;
}

/* Contact Popup Container */
.contact-popup {
    background-color: var(--color-surface-primary);
    border: 1px solid var(--color-border);
    border-radius: 8px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    max-width: 520px;
    width: 90%;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform: scale(0.9);
    transition: transform 200ms ease;
}

.contact-overlay.show .contact-popup {
    transform: scale(1);
}

/* Contact Header */
.contact-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid var(--color-border);
    background-color: var(--color-surface-secondary);
}

.contact-title {
    font-size: 20px;
    font-weight: 600;
    color: var(--color-text-primary);
    margin: 0;
}

.contact-close {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background-color: transparent;
    border-radius: 4px;
    color: var(--color-text-secondary);
}

.contact-close:hover {
    background-color: var(--color-interactive-hover);
    color: var(--color-text-primary);
}

.contact-close-icon {
    width: 20px;
    height: 20px;
    font-size: 20px;
}

/* Contact Content */
.contact-content {
    padding: 24px;
    overflow-y: auto;
    flex: 1;
}

/* Email validation indicator (mirrors .password-toggle pattern) */
.contact-input-wrapper {
    position: relative;
}

.contact-input-wrapper .form-input {
    padding-right: 36px;
}

.contact-validation-icon {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 16px;
    line-height: 1;
    pointer-events: none;
}

.contact-validation-icon.valid {
    color: #16a34a;
}

.contact-validation-icon.invalid {
    color: #dc2626;
}

/* Textarea height override for message field */
.contact-content textarea.form-input {
    height: auto;
    min-height: 100px;
    resize: vertical;
}

/* Honeypot anti-spam field - invisible to users */
.contact-hp-field {
    position: absolute;
    left: -9999px;
    top: -9999px;
    opacity: 0;
    height: 0;
    width: 0;
    overflow: hidden;
    pointer-events: none;
}

/* Required field indicator */
.contact-required {
    color: #dc2626;
    margin-left: 2px;
}

/* Success message */
.contact-success-message {
    text-align: center;
    padding: 32px 16px;
}

.contact-success-check {
    font-size: 48px;
    color: #16a34a;
    display: block;
    margin-bottom: 16px;
}

.contact-success-text {
    font-size: 16px;
    color: var(--color-text-primary);
    line-height: 1.6;
}

/* Mobile Optimierung */
@media (max-width: 640px) {
    .contact-popup {
        width: 95%;
        max-height: 90vh;
    }

    .contact-header {
        padding: 16px 20px;
    }

    .contact-title {
        font-size: 18px;
    }

    .contact-content {
        padding: 20px;
    }

    /* Larger tap targets on mobile */
    .contact-content .btn-primary {
        min-height: 48px;
    }
}

@media (max-width: 1023px) {
    .contact-overlay {
        position: fixed !important;
        inset: 0 !important;
    }
}
