/* ========================================
   CONTACT MODAL STYLING
   ======================================== */

/* Modal Overlay */
#contact-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(8px);
    z-index: 10000;
    animation: fadeIn 0.3s ease;
    overflow-y: auto;
    padding: 2rem;
}

#contact-modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Modal Container */
.contact-modal-container {
    background: white;
    border-radius: 25px;
    max-width: 600px;
    width: 100%;
    position: relative;
    box-shadow: 0 20px 80px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    overflow: hidden;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
}

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

/* Modal Header */
.contact-modal-header {
    background: linear-gradient(135deg, var(--primary-green), var(--primary-blue));
    padding: 2.5rem 2rem;
    position: relative;
    color: white;
}

.contact-modal-header h2 {
    font-size: 2rem;
    margin: 0;
    color: white;
    font-weight: 900;
    letter-spacing: -1px;
}

.contact-modal-header p {
    margin: 0.5rem 0 0 0;
    opacity: 0.95;
    font-size: 1.05rem;
}

.contact-modal-close {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
}

.contact-modal-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

/* Modal Body */
.contact-modal-body {
    padding: 2.5rem 2rem;
    overflow-y: auto;
    flex: 1;
}

/* Form Styling */
.contact-form-group {
    margin-bottom: 1.8rem;
}

.contact-form-group label {
    display: block;
    margin-bottom: 0.6rem;
    color: var(--dark-gray);
    font-weight: 700;
    font-size: 0.95rem;
}

.contact-form-group label .required {
    color: #e74c3c;
    margin-left: 0.2rem;
}

.contact-form-input,
.contact-form-textarea {
    width: 100%;
    padding: 1rem 1.2rem;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.3s ease;
    background: #fafafa;
}

.contact-form-input:focus,
.contact-form-textarea:focus {
    outline: none;
    border-color: var(--primary-green);
    background: white;
    box-shadow: 0 0 0 3px rgba(53, 118, 89, 0.1);
}

.contact-form-textarea {
    min-height: 150px;
    resize: vertical;
    line-height: 1.6;
}

/* Privacy Checkbox */
.contact-privacy-group {
    margin: 2rem 0;
    padding: 1.5rem;
    background: rgba(53, 118, 89, 0.05);
    border-radius: 12px;
    border: 2px solid rgba(53, 118, 89, 0.2);
}

.contact-checkbox-wrapper {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    cursor: pointer;
}

.contact-checkbox-wrapper input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
    margin-top: 0.2rem;
    flex-shrink: 0;
    accent-color: var(--primary-green);
}

.contact-privacy-text {
    font-size: 0.95rem;
    color: #444;
    line-height: 1.6;
}

.contact-privacy-text strong {
    color: var(--primary-green);
    font-weight: 700;
}

/* Error Messages */
.contact-error-message {
    color: #e74c3c;
    font-size: 0.875rem;
    margin-top: 0.5rem;
    display: none;
    font-weight: 600;
}

.contact-form-group.error .contact-form-input,
.contact-form-group.error .contact-form-textarea {
    border-color: #e74c3c;
    background: #fff5f5;
}

.contact-form-group.error .contact-error-message {
    display: block;
}

/* Submit Button */
.contact-submit-button {
    width: 100%;
    padding: 1.2rem;
    background: linear-gradient(135deg, var(--primary-green), var(--primary-blue));
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 6px 20px rgba(53, 118, 89, 0.3);
    position: relative;
    overflow: hidden;
}

.contact-submit-button:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(53, 118, 89, 0.4);
}

.contact-submit-button:active:not(:disabled) {
    transform: translateY(0);
}

.contact-submit-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.contact-submit-button .button-text {
    display: inline-block;
    transition: all 0.3s ease;
}

.contact-submit-button.loading .button-text {
    opacity: 0;
}

/* Loading Spinner */
.contact-spinner {
    display: none;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 24px;
    height: 24px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.contact-submit-button.loading .contact-spinner {
    display: block;
}

@keyframes spin {
    to {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

/* Success Message */
.contact-success-message {
    display: none;
    text-align: center;
    padding: 3rem 2rem;
}

.contact-success-message.active {
    display: block;
}

.success-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    background: linear-gradient(135deg, var(--primary-green), var(--primary-blue));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: scaleIn 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes scaleIn {
    from {
        transform: scale(0);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.success-icon svg {
    width: 40px;
    height: 40px;
    stroke: white;
    stroke-width: 3;
}

.contact-success-message h3 {
    font-size: 1.8rem;
    color: var(--dark-gray);
    margin-bottom: 1rem;
    font-weight: 900;
}

.contact-success-message p {
    color: #666;
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 2rem;
}

.contact-close-button {
    padding: 1rem 3rem;
    background: transparent;
    color: var(--primary-green);
    border: 2px solid var(--primary-green);
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
}

.contact-close-button:hover {
    background: var(--primary-green);
    color: white;
    transform: translateY(-2px);
}

/* Footer Link voor Contact Modal */
.footer-contact-link {
    display: inline-block;
    margin-top: 1rem;
    color: var(--primary-green);
    text-decoration: none;
    font-weight: 700;
    font-size: 1rem;
    transition: all 0.3s ease;
    padding: 0.5rem 1rem;
    border-radius: 8px;
}

.footer-contact-link:hover {
    background: rgba(53, 118, 89, 0.1);
    transform: translateX(5px);
}

/* Responsive Design */
@media (max-width: 768px) {
    #contact-modal {
        padding: 1rem;
    }
    
    .contact-modal-container {
        max-height: 95vh;
    }
    
    .contact-modal-header {
        padding: 2rem 1.5rem;
    }
    
    .contact-modal-header h2 {
        font-size: 1.6rem;
    }
    
    .contact-modal-body {
        padding: 2rem 1.5rem;
    }
    
    .contact-form-group {
        margin-bottom: 1.5rem;
    }
    
    .contact-modal-close {
        top: 1rem;
        right: 1rem;
        width: 36px;
        height: 36px;
    }
}

/* Accessibility */
.contact-form-input:focus-visible,
.contact-form-textarea:focus-visible,
.contact-checkbox-wrapper input[type="checkbox"]:focus-visible {
    outline: 2px solid var(--primary-green);
    outline-offset: 2px;
}
