/**
 * CockpitOS Light Theme - Contact Widget Styles
 *
 * Verantwortlichkeit: Contact & Map Styling
 *
 * @package CockpitOS_Light_Theme
 * @version 1.0.0
 */

/* ========================================
   Container
   ======================================== */

.cockpit-contact {
    width: 100%;
    background-color: #f8fafc;
    padding: 80px 20px;
}

.cockpit-contact__container {
    max-width: 1200px;
    margin: 0 auto;
}

/* ========================================
   Header (Erweitert gemeinsame Basis-Klassen)
   ======================================== */

/* Nutzt .cockpit-widget-header, .cockpit-widget-eyebrow, etc. als Basis */
/* Widget-spezifische Anpassungen nur wenn nötig */

.cockpit-contact__description {
    max-width: 600px; /* Etwas schmaler als Standard */
}

/* ========================================
   Content Layout
   ======================================== */

.cockpit-contact__content {
    display: grid;
    gap: 40px;
}

/* Side by Side Layout */
.cockpit-contact--side-by-side .cockpit-contact__content {
    grid-template-columns: 1fr 1fr;
    align-items: stretch; /* Beide Kinder gleiche Höhe */
}

/* Side by Side: Info-Box und Map gleiche Höhe */
.cockpit-contact--side-by-side .cockpit-contact__info,
.cockpit-contact--side-by-side .cockpit-contact__map {
    height: 100%; /* Beide füllen die Grid-Row-Höhe */
    display: flex;
    flex-direction: column;
}

/* Stacked Layout */
.cockpit-contact--stacked .cockpit-contact__content {
    grid-template-columns: 1fr;
}

/* Map Only */
.cockpit-contact--map-only .cockpit-contact__content {
    grid-template-columns: 1fr;
}

/* Form Only */
.cockpit-contact--form-only .cockpit-contact__content {
    grid-template-columns: 1fr;
    max-width: 600px;
    margin: 0 auto;
}

/* ========================================
   Contact Info Box
   ======================================== */

.cockpit-contact__info {
    background-color: var(--color-primary);
    color: #ffffff;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.cockpit-contact__info-item {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 24px;
}

.cockpit-contact__info-item:last-child {
    margin-bottom: 0;
}

.cockpit-contact__icon {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    color: #ffffff;
}

.cockpit-contact__info-item a {
    color: #ffffff;
    text-decoration: none;
    font-size: 1rem;
    line-height: 1.5;
    transition: opacity 0.3s ease;
}

.cockpit-contact__info-item a:hover {
    opacity: 0.8;
}

.cockpit-contact__info-item span {
    font-size: 1rem;
    line-height: 1.5;
}

/* ========================================
   Map
   ======================================== */

.cockpit-contact__map {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    height: 100%; /* Flexible Height */
    min-height: 500px; /* Mindesthöhe für Side-by-Side Desktop */
    position: relative; /* Für iframe positioning */
}

.cockpit-contact__map iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

/* ========================================
   Contact Form
   ======================================== */

.cockpit-contact__form {
    margin-top: 32px;
}

.cockpit-contact__default-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.cockpit-contact__form-header {
    margin-bottom: 8px;
}

.cockpit-contact__form-header h3 {
    font-size: 1rem;
    font-weight: 700;
    color: #ffffff;
    margin: 0;
}

.cockpit-contact__form-row {
    display: flex;
    gap: 16px;
}

.cockpit-contact__form-row--half {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.cockpit-contact__form-row input,
.cockpit-contact__form-row textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    background-color: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.3s ease;
}

.cockpit-contact__form-row input::placeholder,
.cockpit-contact__form-row textarea::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.cockpit-contact__form-row input:focus,
.cockpit-contact__form-row textarea:focus {
    outline: none;
    border-color: #ffffff;
    background-color: rgba(255, 255, 255, 0.15);
}

.cockpit-contact__button {
    width: 100%;
    background-color: #ffffff;
    color: var(--color-primary);
}

.cockpit-contact__button:hover {
    background-color: #f9fafb;
    color: var(--color-primary-dark);
}

.cockpit-contact__button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* ========================================
   Form Message
   ======================================== */

.cockpit-contact__form-message {
    padding: 16px;
    border-radius: 8px;
    font-size: 0.9375rem;
    line-height: 1.5;
    margin-top: 16px;
}

.cockpit-contact__form-message--success {
    background-color: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: #059669;
}

.cockpit-contact__form-message--error {
    background-color: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #dc2626;
}

.cockpit-contact__form-message--loading {
    background-color: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.3);
    color: #2563eb;
}

/* ========================================
   Responsive
   ======================================== */

@media (max-width: 1024px) {
    .cockpit-contact--side-by-side .cockpit-contact__content {
        grid-template-columns: 1fr; /* Stack auf Tablet */
    }
    
    /* Tablet: Map etwas niedriger */
    .cockpit-contact__map {
        min-height: 400px;
    }
    
    /* Responsive Styles für Header werden von .cockpit-widget-header gehandhabt */
}

@media (max-width: 768px) {
    .cockpit-contact {
        padding: 60px 20px;
    }
    
    .cockpit-contact__header {
        margin-bottom: 40px;
    }
    
    /* Mobile: Map deutlich niedriger (nicht zu hoch!) */
    .cockpit-contact__map {
        min-height: 300px; /* 300px statt 500px */
        height: 300px; /* Feste Höhe auf Mobile */
    }
    
    /* Responsive Styles für Header werden von .cockpit-widget-header gehandhabt */
    
    .cockpit-contact__info {
        padding: 30px;
    }
    
    .cockpit-contact__form-row--half {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .cockpit-contact {
        padding: 40px 16px;
    }
    
    /* Small Mobile: Map noch niedriger */
    .cockpit-contact__map {
        min-height: 250px;
        height: 250px;
    }
    
    /* Responsive Styles für Header werden von .cockpit-widget-header gehandhabt */
    
    .cockpit-contact__info {
        padding: 24px;
    }
    
    .cockpit-contact__content {
        gap: 24px; /* Kleinerer Gap */
    }
}

