/* mbk-frontend-styles.css - Modern Design */

:root {
    --primary: #2563eb;       /* Modernes Royal Blue */
    --primary-hover: #1d4ed8;
    --bg-color: #f8fafc;      /* Sehr helles Grau/Blau */
    --surface: #ffffff;
    --text-main: #1e293b;     /* Fast Schwarz */
    --text-light: #64748b;    /* Grau */
    --success: #10b981;
    --border-radius: 12px;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

/* Container */
#mbk-kalender-wrapper {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    max-width: 900px;
    margin: 40px auto;
    background: var(--surface);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    padding: 40px;
    color: var(--text-main);
    box-sizing: border-box;
}

h2, h3 {
    text-align: center;
    color: var(--text-main);
    margin-bottom: 25px;
    font-weight: 700;
}

h2 { font-size: 24px; letter-spacing: -0.5px; }
h3 { font-size: 18px; color: var(--text-light); font-weight: 500; }

/* --- HEADER (Monat & Pfeile) --- */
#mbk-kalender-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 0 10px;
}

.monat-titel {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-main);
}

#mbk-prev-month, #mbk-next-month {
    background: transparent;
    border: 1px solid #e2e8f0;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-light);
    transition: all 0.2s;
}

#mbk-prev-month:hover, #mbk-next-month:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: #eff6ff;
}

/* --- KALENDER GRID (Das Herzstück) --- */
.mbk-kalender-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr); /* 7 Spalten */
    gap: 8px;
    margin-bottom: 30px;
}

.grid-header {
    text-align: center;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-light);
    padding-bottom: 10px;
    text-transform: uppercase;
}

.grid-cell {
    aspect-ratio: 1; /* Quadratisch */
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 500;
    color: var(--text-main);
    background: var(--bg-color);
    transition: all 0.2s;
    user-select: none;
}

.grid-cell.empty {
    background: transparent;
}

.grid-cell.disabled {
    color: #cbd5e1;
    background: transparent;
    cursor: not-allowed;
}

.grid-cell.buchbar {
    background: #fff;
    border: 1px solid #e2e8f0;
    cursor: pointer;
    font-weight: 600;
}

.grid-cell.buchbar:hover {
    border-color: var(--primary);
    color: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 6px rgba(37, 99, 235, 0.1);
}

.grid-cell.heute {
    color: var(--primary);
    border: 1px solid var(--primary);
}

/* Status: Ausgewählt */
.grid-cell.ausgewaehlt {
    background: var(--primary) !important;
    color: white !important;
    border-color: var(--primary) !important;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

/* --- ZEITFENSTER --- */
#mbk-zeitfenster-liste {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 12px;
    margin-top: 20px;
}

.mbk-zeit-button {
    background: var(--surface);
    border: 1px solid #e2e8f0;
    padding: 12px 5px;
    text-align: center;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 500;
    color: var(--text-main);
    cursor: pointer;
    transition: all 0.2s;
}

.mbk-zeit-button:hover:not(:disabled) {
    border-color: var(--primary);
    color: var(--primary);
    background: #eff6ff;
}

.mbk-zeit-button.ausgewaehlt {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.mbk-zeit-button:disabled {
    background: #f1f5f9;
    color: #cbd5e1;
    cursor: not-allowed;
    text-decoration: line-through;
    border-color: transparent;
}

/* --- FORMULAR --- */
#mbk-buchungsformular-container {
    background: #f8fafc;
    border-radius: 12px;
    padding: 30px;
    margin-top: 40px;
}

#mbk-buchungsformular p {
    margin-bottom: 20px;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    font-size: 14px;
    color: var(--text-main);
}

input[type="text"], input[type="email"], input[type="tel"] {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.2s;
    box-sizing: border-box;
}

input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* Termin Typ Auswahl (Radio als Buttons) */
.mbk-typ-auswahl {
    display: flex;
    gap: 10px;
    margin-bottom: 25px;
}

.mbk-typ-button {
    flex: 1;
    text-align: center;
    padding: 12px;
    background: white;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    font-weight: 500;
}

.mbk-typ-radio:checked + .mbk-typ-button {
    background: var(--text-main);
    color: white;
    border-color: var(--text-main);
}

/* DSGVO Checkbox */
.dsgvo-wrapper {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    font-size: 13px;
    color: var(--text-light);
    line-height: 1.5;
}

#mbk-submit-button {
    background: var(--primary);
    color: white;
    width: 100%;
    padding: 16px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    margin-top: 10px;
    transition: background 0.2s;
    box-shadow: 0 4px 6px rgba(37, 99, 235, 0.2);
}

#mbk-submit-button:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
}

/* --- LOADER --- */
.mbk-loader {
    width: 48px;
    height: 48px;
    border: 5px solid #e2e8f0;
    border-bottom-color: var(--primary);
    border-radius: 50%;
    display: inline-block;
    box-sizing: border-box;
    animation: rotation 1s linear infinite;
    margin: 40px auto;
    display: block;
}

@keyframes rotation {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* --- ALERTS --- */
#mbk-nachricht {
    padding: 20px;
    border-radius: 8px;
    margin-top: 30px;
    text-align: center;
    font-weight: 500;
}

#mbk-nachricht.success {
    background: #dcfce7;
    color: #166534;
}

#mbk-nachricht.error {
    background: #fee2e2;
    color: #991b1b;
}

/* --- RESPONSIVE --- */
@media (max-width: 600px) {
    #mbk-kalender-wrapper {
        padding: 20px;
        margin: 10px;
    }
    
    .grid-cell {
        font-size: 14px;
    }
    
    #mbk-zeitfenster-liste {
        grid-template-columns: repeat(3, 1fr);
    }
}