/* Global Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color:#ccc;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Header Styles */
.header {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.header h1 {
    margin-bottom: 10px;
}


/* Logo above title, left-aligned to the inner left edge of the header box */
.header .logo {
    max-height: 80px;
    height: auto;
    display: block;
}

.page-title {
    margin-left: auto;
}

/* Button Styles */
.btn {
    display: inline-block;
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    text-decoration: none;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    text-align: center;
    transition: all 0.3s ease;
}

.btn-primary {
    background-color: #3498db; 
    color: white;
}

.btn-primary:hover {
    background-color: #2980b9;
}

.btn-secondary {
    background-color: #95a5a6;
    color: white;
}

.btn-secondary:hover {
    background-color: #7f8c8d;
}

.btn-large {
    padding: 15px 30px;
    font-size: 16px;
}

/* Full-width buttons inside login/reset forms */
.login-form .btn,
.login-form .btn-large {
    width: 100%;
    display: block;
}

/* Explicit utility class for full-width buttons */
.btn-full {
    width: 100%;
    display: block;
}

/* Form Styles */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
}

/* Ensure lists inside form groups align with the paragraph text
   (used for the 'Satzung und Gebührenordnung' bullet list) */
.form-group ul {
    margin: 0.4em 0 0 0; /* small vertical spacing */
    padding-left: 1.2em; /* align bullets with paragraph text */
}

.form-group input, 
.form-group select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.form-group select {
    background-color: #fff;
    color: #333;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

.form-group input:focus, 
.form-group select:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
}

/* Global top margin for all div elements as requested */
div { margin-top: 4px; }

/* Divider used in forms (matches visual style above submit button) */
.form-divider {
    border: 0;
    height: 1px;
    background-color: #e6e6e6;
    margin: 18px 0;
}

/* Info box used for E-Mail PIN instructions */
.info-box {
    background: #FFFFE0;
    border: 1px solid #e6e6e6;
    padding: 16px;
    border-radius: 6px;
    margin-bottom: 18px;
}

.info-box h3 {
    margin-bottom: 8px;
    color: #2c3e50;
    font-size: 16px;
}

.info-box p {
    color: #555;
    font-size: 14px;
    margin-bottom: 8px;
}

/* Child fields box with blue styling */
.child-box {
    background: #fff;
    border: 1px solid #cfe2ff;
    color: #0b66c3;
    padding: 12px;
    border-radius: 6px;
    margin: 12px 0;
}

.child-box .form-row {
    display: flex;
    gap: 12px;
    align-items: end;
}

.child-box label {
    color: #0b66c3;
    font-weight: 600;
}

.child-box input,
.child-box select {
    color: #0b66c3;
    border-color: #0b66c3;
    box-shadow: none;
}

.child-box input:focus, .child-box select:focus {
    box-shadow: 0 0 0 3px rgba(11,102,195,0.12);
}

/* Gruppe field styling (match Vorname_Kind color) */
.gruppe label {
    color: #0b66c3;
    font-weight: 600;
}
.gruppe select,
.gruppe input {
    color: #0b66c3;
    border-color: #0b66c3;
    box-shadow: none;
}
.gruppe select:focus, .gruppe input:focus {
    box-shadow: 0 0 0 3px rgba(11,102,195,0.12);
}
.gruppe.disabled label { color: #ffffff; }
.gruppe.disabled select { border-color: #ffffff; color: #ffffff;  }

.form-row {
    display: flex;
    gap: 15px;
    align-items: end;
}

.form-row .form-group {
    flex: 1;
}

.admin-link {
    text-align: center;
    margin-top: 20px;
}

.admin-link a {
    color: #3498db;
    text-decoration: none;
    font-size: 14px;
}

.admin-link a:hover {
    text-decoration: underline;
}

/* Alert Messages */
.success, .error {
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 4px;
    font-weight: 500;
}

.success {
    border: 1px solid #32CD32;
    background-color: #d4edda;
    color: #155724;
    padding: 12px 16px;
    border-radius: 6px;
    margin: 14px 0;
}

.error, .error-box {
    border: 1px solid #e74c3c;
    background-color: #fdecea;
    color: #721c24;
    padding: 12px 16px;
    border-radius: 6px;
    margin: 14px 0;
}

    .error-box ul {
    margin: 8px 0 0 18px;
}

/* Field error state */
.field-error {
    border-color: #e74c3c !important;
    background-color: #fdecea !important;
}

input[type="checkbox"].field-error {
    outline: 1px solid #e74c3c;
    outline-offset: 3px;
    box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.25);
}

/* Order Form */
.order-form {
    background: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.order-actions {
    text-align: center;
    margin-top: 30px;
    padding-top: 30px;
    border-top: 1px solid #eee;
}

/* Confirmation styles moved into includes/confirmation_renderer.php as inline CSS
   (used for email generation and to keep page rendering identical). */

/* Consent checkbox groups used in forms */
.consent_checkbox {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    margin-bottom: 12px;
}
.consent_checkbox > div:first-child {
    flex: 0 0 auto;
}
.consent_checkbox > div:last-child {
    flex: 1 1 auto;
}
.consent_checkbox label {
    font-weight: 600;
    display: block;
    margin: 0;
}
.consent-text {
    margin-top: 6px;

}

.consent_checkbox .consent-text {
    margin-top: 6px;
}

.consent-version {
    font-size: 10px;
    color: #666;
    margin-top: 6px;
}

.consent-status {
    margin-top: 6px;
}

/* Ensure paragraphs inside consent texts have the same small gap */
.consent-text p {
    margin: 6px 0 0 0;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }

    .header {
        flex-direction: column;
        text-align: center;
    }

    .form-row {
        flex-direction: column;
        align-items: flex-start;
    }

    .info-box .form-row {
        flex-direction: column !important;
        align-items: flex-start !important;
    }

    .child-box .form-row {
        flex-direction: column;
        align-items: flex-start;
    }

    .order-form {
        text-align: left;
    }

    .order-actions {
        text-align: left;
    }
}

@media (max-width: 480px) {
    .btn {
        width: 100%;
        margin-bottom: 10px;
    }

    .form-group {
        text-align: left;
    }

    .form-group label {
        text-align: left;
    }

    .info-box {
        text-align: left;
    }

    .child-box {
        text-align: left;
    }
}
