/**
 * Newsletter Page CSS - Newsletter Anmeldung und Bestätigung
 * Für Alka-Go B2B Website
 */

/* Newsletter Page Specific Styles */
.newsletter-page {
    background: var(--light-gray);
    min-height: 100vh;
}

.page-header {
    text-align: center;
    padding: 2rem 0;
    background: linear-gradient(135deg, var(--primary-white), var(--light-gray));
}

.page-title {
    font-size: var(--font-size-4xl);
    font-weight: 700;
    color: var(--dark-gray);
    margin-bottom: 1rem;
    position: relative;
}

.page-title::after {
    content: '';
    position: absolute;
    bottom: -0.5rem;
    left: 50%;
    transform: translateX(-50%);
    width: 120px;
    height: 3px;
    background: linear-gradient(90deg, var(--accent-red), var(--accent-neon));
    border-radius: 2px;
}

.page-subtitle {
    font-size: var(--font-size-xl);
    color: var(--medium-gray);
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

/* Newsletter Form Container */
.newsletter-form-container {
    max-width: 700px;
    margin: 0 auto;
    background: var(--primary-white);
    border-radius: var(--border-radius-large);
    box-shadow: var(--shadow-heavy);
    overflow: hidden;
    border: 1px solid var(--border-color);
    position: relative;
}

.newsletter-form-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(90deg, var(--accent-red), var(--accent-neon));
}

/* Newsletter Form */
.newsletter-form {
    padding: 3rem;
    position: relative;
}

.newsletter-form::before {
    content: '📧';
    position: absolute;
    top: -20px;
    left: 3rem;
    font-size: 2.5rem;
    background: var(--primary-white);
    padding: 0 0.5rem;
    filter: drop-shadow(0 4px 8px rgba(220, 38, 38, 0.2));
}

.form-row {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

.form-group {
    margin-bottom: 2rem;
}

.form-label {
    display: block;
    font-weight: 600;
    color: var(--dark-gray);
    margin-bottom: 0.75rem;
    font-size: var(--font-size-base);
    position: relative;
}

.form-label.required::after {
    content: ' *';
    color: var(--accent-red);
    font-weight: 700;
}

.form-control {
    width: 100%;
    padding: 1rem 1.5rem;
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius-large);
    font-size: var(--font-size-base);
    font-family: var(--font-primary);
    background: var(--primary-white);
    transition: all var(--transition-medium);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.05);
}

.form-control:focus {
    outline: none;
    border-color: var(--accent-red);
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1), inset 0 2px 4px rgba(0, 0, 0, 0.05);
    transform: translateY(-1px);
}

.form-control:valid {
    border-color: var(--accent-neon);
}

.form-error {
    color: var(--accent-red);
    font-size: var(--font-size-sm);
    margin-top: 0.5rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.form-error::before {
    content: '⚠';
    font-size: var(--font-size-base);
}

/* Checkbox Grid */
.checkbox-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.checkbox-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    background: var(--light-gray);
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: all var(--transition-medium);
    font-weight: 500;
    color: var(--medium-gray);
}

.checkbox-item:hover {
    background: var(--primary-white);
    border-color: var(--accent-red);
    color: var(--dark-gray);
    transform: translateY(-1px);
    box-shadow: var(--shadow-light);
}

.checkbox-item input[type="checkbox"] {
    width: 20px;
    height: 20px;
    border: 2px solid var(--border-color);
    border-radius: 4px;
    background: var(--primary-white);
    cursor: pointer;
    position: relative;
    margin: 0;
    flex-shrink: 0;
}

.checkbox-item input[type="checkbox"]:checked {
    background: var(--accent-red);
    border-color: var(--accent-red);
}

.checkbox-item input[type="checkbox"]:checked::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-weight: 700;
    font-size: 14px;
}

.checkbox-item:has(input:checked) {
    background: var(--primary-white);
    border-color: var(--accent-red);
    color: var(--accent-red);
    box-shadow: 0 4px 15px rgba(220, 38, 38, 0.15);
}

/* Submit Button */
.btn-large {
    width: 100%;
    padding: 1.25rem 2rem;
    font-size: var(--font-size-lg);
    font-weight: 600;
    border-radius: var(--border-radius-large);
    background: linear-gradient(135deg, var(--accent-red), #b91c1c);
    border: none;
    color: white;
    cursor: pointer;
    transition: all var(--transition-medium);
    box-shadow: 0 4px 15px rgba(220, 38, 38, 0.3);
    position: relative;
    overflow: hidden;
}

.btn-large::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: var(--transition-medium);
}

.btn-large:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(220, 38, 38, 0.4);
}

.btn-large:hover::before {
    left: 100%;
}

.btn-large:active {
    transform: translateY(0);
}

/* Form Note */
.form-note {
    text-align: center;
    color: var(--medium-gray);
    font-size: var(--font-size-sm);
    line-height: 1.6;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
}

.form-note a {
    color: var(--accent-red);
    text-decoration: none;
    font-weight: 500;
    border-bottom: 1px solid transparent;
    transition: var(--transition-fast);
}

.form-note a:hover {
    border-bottom-color: var(--accent-red);
}

/* Success Card */
.success-card {
    max-width: 600px;
    margin: 4rem auto;
    background: var(--primary-white);
    border-radius: var(--border-radius-large);
    box-shadow: var(--shadow-heavy);
    padding: 3rem;
    text-align: center;
    border: 1px solid var(--border-color);
    position: relative;
    overflow: hidden;
}

.success-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(90deg, var(--accent-neon), #00cc66);
}

.success-icon {
    font-size: 4rem;
    margin-bottom: 2rem;
    animation: bounce 0.6s ease-in-out;
    filter: drop-shadow(0 4px 15px rgba(0, 255, 136, 0.3));
}

.success-card h1 {
    font-size: var(--font-size-3xl);
    font-weight: 700;
    color: var(--dark-gray);
    margin-bottom: 1.5rem;
}

.success-card p {
    font-size: var(--font-size-lg);
    color: var(--medium-gray);
    line-height: 1.6;
    margin-bottom: 0;
}

/* Animations */
@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}

.newsletter-form-container {
    animation: slideInUp 0.6s ease-out;
}

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

/* Loading State */
.btn-large.loading {
    color: transparent;
    pointer-events: none;
}

.btn-large.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 20px;
    border: 2px solid transparent;
    border-top: 2px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Flash Messages */
.flash-message {
    max-width: 700px;
    margin: 0 auto 2rem;
    padding: 1rem 1.5rem;
    border-radius: var(--border-radius);
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.flash-message.success {
    background: rgba(0, 255, 136, 0.1);
    border: 1px solid var(--accent-neon);
    color: #006b3d;
}

.flash-message.success::before {
    content: '✓';
    background: var(--accent-neon);
    color: white;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--font-size-sm);
    font-weight: 700;
    flex-shrink: 0;
}

.flash-message.error {
    background: rgba(220, 38, 38, 0.1);
    border: 1px solid var(--accent-red);
    color: #7f1d1d;
}

.flash-message.error::before {
    content: '!';
    background: var(--accent-red);
    color: white;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--font-size-sm);
    font-weight: 700;
    flex-shrink: 0;
}

/* Responsive Design */
@media (max-width: 768px) {
    .newsletter-form-container {
        margin: 1rem;
        border-radius: var(--border-radius);
    }
    
    .newsletter-form {
        padding: 2rem 1.5rem;
    }
    
    .newsletter-form::before {
        left: 1.5rem;
        font-size: 2rem;
    }
    
    .form-row {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .page-title {
        font-size: var(--font-size-3xl);
    }
    
    .page-subtitle {
        font-size: var(--font-size-lg);
        padding: 0 1rem;
    }
    
    .checkbox-grid {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
    
    .checkbox-item {
        padding: 0.75rem;
    }
    
    .success-card {
        margin: 2rem 1rem;
        padding: 2rem 1.5rem;
        border-radius: var(--border-radius);
    }
    
    .success-card h1 {
        font-size: var(--font-size-2xl);
    }
    
    .success-card p {
        font-size: var(--font-size-base);
    }
    
    .success-icon {
        font-size: 3rem;
        margin-bottom: 1.5rem;
    }
}

@media (max-width: 480px) {
    .newsletter-form {
        padding: 1.5rem 1rem;
    }
    
    .form-group {
        margin-bottom: 1.5rem;
    }
    
    .form-control {
        padding: 0.875rem 1.25rem;
    }
    
    .page-title {
        font-size: var(--font-size-2xl);
    }
    
    .checkbox-item {
        padding: 0.625rem;
        font-size: var(--font-size-sm);
    }
    
    .checkbox-item input[type="checkbox"] {
        width: 18px;
        height: 18px;
    }
    
    .btn-large {
        padding: 1rem 1.5rem;
        font-size: var(--font-size-base);
    }
    
    .success-card {
        padding: 1.5rem 1rem;
    }
    
    .success-card h1 {
        font-size: var(--font-size-xl);
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .form-control {
        border-width: 3px;
    }
    
    .checkbox-item {
        border-width: 3px;
    }
    
    .checkbox-item input[type="checkbox"] {
        border-width: 3px;
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    .newsletter-form-container {
        animation: none;
    }
    
    .success-icon {
        animation: none;
    }
    
    .btn-large::before {
        display: none;
    }
    
    .form-control:focus {
        transform: none;
    }
    
    .checkbox-item:hover {
        transform: none;
    }
    
    .btn-large:hover {
        transform: none;
    }
}