/* ========================================
   HelenIT Reservations - Frontend Styles
   Version: 2.7.1
   ======================================== */

/* Container & Basis */
.helenit-reservation-form {
    max-width: 600px;
    margin: 0 auto;
    padding: 30px;
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, sans-serif;
}

.helenit-reservation-form h3 {
    margin-top: 0;
    margin-bottom: 20px;
    color: #333;
    font-size: 24px;
    text-align: center;
    border-bottom: 2px solid #0073aa;
    padding-bottom: 15px;
}

/* Pflichtfeld-Info */
.form-info {
    background: #f0f6fc;
    padding: 12px 15px;
    border-left: 4px solid #0073aa;
    margin-bottom: 25px;
    font-size: 14px;
    color: #555;
}

/* Form Groups */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
    font-size: 15px;
}

/* Pflichtfeld-Stern */
.required {
    color: #d63300;
    font-weight: bold;
    margin-left: 3px;
}

/* Input Fields */
.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="tel"],
.form-group input[type="date"],
.form-group input[type="time"],
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #ddd;
    border-radius: 4px;
    font-size: 15px;
    transition: all 0.3s ease;
    box-sizing: border-box;
    font-family: inherit;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #0073aa;
    box-shadow: 0 0 0 3px rgba(0, 115, 170, 0.1);
}

.form-group input:invalid,
.form-group select:invalid {
    border-color: #d63300;
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
}

/* Form Row (für Datum & Zeit nebeneinander) */
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

@media (max-width: 600px) {
    .form-row {
        grid-template-columns: 1fr;
    }
}

/* Description Text */
.description {
    display: block;
    margin-top: 5px;
    font-size: 13px;
    color: #666;
    font-style: italic;
}

/* Zeichenzähler für Textarea */
.char-counter {
    display: block;
    margin-top: 5px;
    font-size: 12px;
    text-align: right;
}

/* ========================================
   CHECKBOXEN
   ======================================== */

.checkbox-group {
    margin-bottom: 25px;
    padding: 15px;
    background: #f9f9f9;
    border-radius: 4px;
    border: 1px solid #e0e0e0;
}

.checkbox-label {
    display: flex;
    align-items: flex-start;
    cursor: pointer;
    font-size: 14px;
    line-height: 1.6;
    color: #333;
}

.checkbox-label input[type="checkbox"] {
    margin-right: 12px;
    margin-top: 3px;
    width: 18px;
    height: 18px;
    cursor: pointer;
    flex-shrink: 0;
}

.checkbox-label span {
    flex: 1;
}

.checkbox-label a {
    color: #0073aa;
    text-decoration: underline;
}

.checkbox-label a:hover {
    color: #005177;
}

/* Marketing Info unterhalb der Checkbox */
.marketing-info {
    display: block;
    margin-top: 8px;
    margin-left: 30px;
    font-size: 12px;
    color: #777;
}

/* Checkbox Focus State */
.checkbox-label input[type="checkbox"]:focus {
    outline: 2px solid #0073aa;
    outline-offset: 2px;
}

/* Privacy Checkbox hervorgeboben (Pflichtfeld) */
#helenit-privacy + span {
    font-weight: 500;
}

/* ========================================
   SUBMIT BUTTON
   ======================================== */

.helenit-submit-btn {
    width: 100%;
    padding: 15px 30px;
    background: #0073aa;
    color: #ffffff;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 10px;
}

.helenit-submit-btn:hover {
    background: #005177;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 115, 170, 0.3);
}

.helenit-submit-btn:active {
    transform: translateY(0);
}

.helenit-submit-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* ========================================
   NACHRICHTEN (SUCCESS & ERROR)
   ======================================== */

.helenit-message {
    padding: 15px 20px;
    margin: 20px 0;
    border-radius: 4px;
    font-size: 15px;
    line-height: 1.6;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.helenit-message.success {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
}

.helenit-message.error {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}

.helenit-message::before {
    font-weight: bold;
    margin-right: 8px;
}

.helenit-message.success::before {
    content: "✓ ";
}

.helenit-message.error::before {
    content: "⚠ ";
}

/* ========================================
   RESTAURANT INFO
   ======================================== */

.restaurant-info {
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid #e0e0e0;
    text-align: center;
}

.restaurant-info small {
    font-size: 14px;
    color: #666;
}

.restaurant-info strong {
    color: #0073aa;
    font-weight: 600;
}

/* ========================================
   ACCESSIBILITY & FOCUS STATES
   ======================================== */

/* Tastatur-Navigation sichtbar machen */
*:focus {
    outline: 2px solid #0073aa;
    outline-offset: 2px;
}

/* Bessere Kontraste für Screen Reader */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* ========================================
   RESPONSIVE DESIGN
   ======================================== */

@media (max-width: 768px) {
    .helenit-reservation-form {
        padding: 20px;
        margin: 10px;
    }
    
    .helenit-reservation-form h3 {
        font-size: 20px;
    }
    
    .form-group input,
    .form-group select,
    .form-group textarea {
        font-size: 16px; /* Verhindert Auto-Zoom auf iOS */
    }
    
    .helenit-submit-btn {
        font-size: 14px;
        padding: 12px 20px;
    }
}

@media (max-width: 480px) {
    .helenit-reservation-form {
        padding: 15px;
    }
    
    .checkbox-label {
        font-size: 13px;
    }
    
    .marketing-info {
        margin-left: 25px;
        font-size: 11px;
    }
}

/* ========================================
   PRINT STYLES (für Bestätigungen)
   ======================================== */

@media print {
    .helenit-submit-btn,
    .restaurant-info {
        display: none;
    }
    
    .helenit-reservation-form {
        box-shadow: none;
        border: 1px solid #000;
    }
}

/* ========================================
   LOADING STATE
   ======================================== */

.helenit-submit-btn.loading {
    position: relative;
    color: transparent;
}

.helenit-submit-btn.loading::after {
    content: "";
    position: absolute;
    width: 20px;
    height: 20px;
    top: 50%;
    left: 50%;
    margin-left: -10px;
    margin-top: -10px;
    border: 3px solid #ffffff;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spinner 0.6s linear infinite;
}

@keyframes spinner {
    to {
        transform: rotate(360deg);
    }
}

/* ========================================
   DARK MODE UNTERSTÜTZUNG (Optional)
   ======================================== */

@media (prefers-color-scheme: dark) {
    .helenit-reservation-form {
        background: #1e1e1e;
        color: #e0e0e0;
    }
    
    .helenit-reservation-form h3 {
        color: #e0e0e0;
        border-bottom-color: #0096dd;
    }
    
    .form-group label {
        color: #e0e0e0;
    }
    
    .form-group input,
    .form-group select,
    .form-group textarea {
        background: #2a2a2a;
        border-color: #444;
        color: #e0e0e0;
    }
    
    .form-group input:focus,
    .form-group select:focus,
    .form-group textarea:focus {
        border-color: #0096dd;
    }
    
    .checkbox-group {
        background: #2a2a2a;
        border-color: #444;
    }
    
    .description,
    .marketing-info {
        color: #aaa;
    }
    
    .form-info {
        background: #2a3a4a;
        border-left-color: #0096dd;
        color: #ccc;
    }
}