/**
 * Minigolf Reservierungssystem - Mobile-First CSS
 * Responsive ab 320px Breite
 */

/* ============================================
   CSS Variablen von Original-Website
   ============================================ */
:root {
    --hue: 214;
    --template-bg-light: #f0f4fb;
    --template-text-dark: #495057;
    --template-text-light: #ffffff;
    --template-special-color: #001B4C;
    --primary: #010156;
    --body-bg: #fff;
    --body-color: #22262a;
    --link-color: #224faa;
    --link-hover-color: #424077;
    --border-color: #dfe3e7;
    --gray-100: #f9fafb;
    --gray-200: #eaedf0;
    --gray-300: #dfe3e7;
}

/* ============================================
   Reset & Basis
   ============================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--body-color);
    background-image: url('https://schwarzlichtminigolfgraz.at/media/templates/site/cassiopeia/images/backgrounds/bg3.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    background-repeat: no-repeat;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
}

/* ============================================
   Mobile-First Layout (320px+)
   ============================================ */

/* Page Wrapper - Begrenzt die Breite und zeigt Hintergrund */
.page-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    min-height: 100vh;
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.1);
}

.container {
    width: 100%;
    padding: 0 1rem;
    margin: 0 auto;
    color: #fff;
}

.container h2 {
    color: #ccc;
}

/* Header */
header {
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 1.5rem 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    border-radius: 10px;
    margin: 10px;
}

header h1 {
    font-size: 1.5rem;
    font-weight: 600;
    text-align: center;
}

/* Banner */
.banner {
    padding: 1.5rem 1rem;
    text-align: center;
}

.banner h2 {
    font-size: 1.25rem;
    color: #ccc;
    margin-bottom: 0.5rem;
}

.banner p {
    color: #fff;
    font-size: 0.875rem;
}

/* Navigation */
nav {
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid #e5e7eb;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

nav .nav-wrapper {
    display: flex;
    white-space: nowrap;
    padding: 0;
}

nav a {
    display: inline-block;
    padding: 1rem 1.25rem;
    color: #6b7280;
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.3s;
    border-bottom: 2px solid transparent;
}

nav a:hover,
nav a.active {
    color: #001B4C;
    border-bottom-color: #001B4C;
}

/* Main Content */
main {
    background: rgba(0, 0, 0, 0.7);
    flex: 1;
    padding: 1.5rem 0;
    border-radius: 10px;
    margin: 10px;
}

/* Content Sections - transparent */
.step-content,
.booking-form,
.slot-card {
    backdrop-filter: blur(10px);
}

/* Kalender-Ansicht Mobile */
.calendar-container {
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid #e5e7eb;
}

.calendar-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: #1f2937;
}

.calendar-nav {
    display: flex;
    gap: 0.5rem;
}

.calendar-nav button {
    padding: 0.5rem 0.75rem;
    background: #f3f4f6;
    border: none;
    border-radius: 4px;
    color: #4b5563;
    font-size: 0.875rem;
    cursor: pointer;
}

/* Zeitslot-Grid Mobile */
.timeslot-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.75rem;
}

.timeslot-card {
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    padding: 1rem;
    cursor: pointer;
    transition: all 0.3s;
}

.timeslot-card:hover {
    border-color: #001B4C;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.timeslot-time {
    font-size: 1.125rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 0.5rem;
}

.timeslot-availability {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.availability-bar {
    flex: 1;
    height: 8px;
    background: #e5e7eb;
    border-radius: 4px;
    overflow: hidden;
    margin-right: 0.75rem;
}

.availability-fill {
    height: 100%;
    background: #10b981;
    transition: width 0.3s;
}

.availability-fill.warning {
    background: #f59e0b;
}

.availability-fill.full {
    background: #ef4444;
}

.availability-text {
    font-size: 0.75rem;
    color: #6b7280;
    white-space: nowrap;
}

/* Buchungsformular Mobile */
.booking-form {
    border-radius: 8px;
    padding: 1.5rem 1rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #ccc;
    font-size: 0.875rem;
}

.form-group label .required {
    color: #ef4444;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #001B4C;
    box-shadow: 0 0 0 3px rgba(0, 27, 76, 0.1);
}

.form-group .help-text {
    margin-top: 0.25rem;
    font-size: 0.75rem;
    color: #999;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background: #001B4C;
    color: white;
    text-decoration: none;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    text-align: center;
}

.btn:hover {
    background: #002d6d;
    transform: translateY(-1px);
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.btn-block {
    display: block;
    width: 100%;
}

.btn-secondary {
    background: #6b7280;
}

.btn-secondary:hover {
    background: #4b5563;
}

.btn-success {
    background: #10b981;
}

.btn-success:hover {
    background: #059669;
}

.btn-danger {
    background: #ef4444;
}

.btn-danger:hover {
    background: #dc2626;
}

/* Nachrichten */
.message {
    padding: 1rem;
    border-radius: 6px;
    margin-bottom: 1rem;
    font-size: 0.875rem;
}

.message.success {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.message.error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.message.info {
    background: #dbeafe;
    color: #1e40af;
    border: 1px solid #bfdbfe;
}

/* Footer */
footer {
    background: rgba(0, 0, 0, 0.7);
    color: #9ca3af;
    padding: 1.5rem 0;
    text-align: center;
    font-size: 0.875rem;
    border-radius: 10px;
    margin: 10px;
}

footer a {
    color: #d1d5db;
    text-decoration: none;
}

/* Loading Spinner */
.spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #e5e7eb;
    border-top-color: #001B4C;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ============================================
   Tablet (768px+)
   ============================================ */
@media (min-width: 768px) {
    .container {
        max-width: 750px;
        padding: 0 1.5rem;
    }
    
    header h1 {
        font-size: 2rem;
    }
    
    .banner {
        padding: 2rem;
    }
    
    .banner h2 {
        font-size: 1.75rem;
    }
    
    .banner p {
        font-size: 1rem;
    }
    
    nav a {
        font-size: 1rem;
    }
    
    /* Zeitslot-Grid Tablet */
    .timeslot-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
    
    .booking-form {
        padding: 2rem;
    }
    
    /* Zwei-Spalten-Layout für Formulare */
    .form-row {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
}

/* ============================================
   Desktop (1024px+)
   ============================================ */
@media (min-width: 1024px) {
    .container {
        max-width: 1024px;
    }
    
    /* Zeitslot-Grid Desktop */
    .timeslot-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    /* Hauptlayout mit Seitenleiste */
    .main-layout {
        display: grid;
        grid-template-columns: 1fr 3fr;
        gap: 2rem;
    }
    
    .sidebar {
        background: rgba(255, 255, 255, 0.2);
        backdrop-filter: blur(10px);
        border-radius: 8px;
        padding: 1.5rem;
        height: fit-content;
        box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    }
}

/* ============================================
   Große Bildschirme (1280px+)
   ============================================ */
@media (min-width: 1280px) {
    .container {
        max-width: 1200px;
    }
    
    /* Zeitslot-Grid Große Bildschirme */
    .timeslot-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* ============================================
   Slot-Buchung Styles (aus index.php verschoben)
   ============================================ */

.person-selector {
    background: rgba(255, 255, 255, 0.2);
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
}

.date-header {
    background: rgba(255, 255, 255, 0.8);
    padding: 0.75rem 1rem;
    margin: 1rem 0 0.5rem 0;
    border-radius: 6px;
    font-weight: 600;
    color: #333;
}

.slot-grid {
    background: rgba(255, 255, 255, 0.7);
    padding: 1rem;
    border-radius: 6px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.slot-button {
    padding: 0.75rem;
    background: rgba(255, 255, 255, 0.9);
    border: 2px solid #e5e7eb;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s;
    text-align: center;
    text-decoration: none;
    display: block;
    color: #333;
}

.slot-button:hover:not(.disabled) {
    border-color: #001B4C;
    background: rgba(255, 255, 255, 1);
    transform: translateY(-2px);
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.slot-button.disabled {
    background: rgba(249, 250, 251, 0.5);
    color: #9ca3af;
    cursor: not-allowed;
    opacity: 0.6;
}

.slot-time {
    font-weight: 600;
    font-size: 1rem;
    margin-bottom: 0.25rem;
    color: #333;
}

.slot-availability {
    font-size: 0.75rem;
    color: #6b7280;
}

.slot-available {
    color: #10b981;
}

.slot-warning {
    color: #f59e0b;
}

.slot-full {
    color: #ef4444;
}

/* ============================================
   Success & Alert Styles
   ============================================ */

.booking-form-centered {
    max-width: 600px;
    margin: 2rem auto;
    text-align: center;
}

.success-box {
    background: rgba(240, 253, 244, 0.9);
    padding: 2rem;
    border-radius: 8px;
    border: 2px solid #bbf7d0;
}

.success-box p {
    font-size: 1.2rem;
    color: #333;
}

.success-icon {
    font-size: 3rem;
    color: #10b981;
    margin-bottom: 1rem;
}

.success-message {
    background: rgba(209, 250, 229, 0.9);
    color: #065f46;
    padding: 1.5rem;
    border-radius: 8px;
    margin: 1.5rem 0;
}

.next-steps-box {
    background: rgba(243, 244, 246, 0.9);
    padding: 1.5rem;
    border-radius: 8px;
    margin: 1.5rem 0;
    color: #333; /* Dunkle Schrift für bessere Lesbarkeit */
}

.next-steps-box h3 {
    color: #1f2937; /* Dunkle Überschrift */
    margin-bottom: 1rem;
}

.next-steps-box ol {
    color: #374151; /* Dunkle Listen-Items */
}

.next-steps-list {
    text-align: left;
    max-width: 500px;
    margin: 0 auto;
}

.btn-with-margin {
    margin-top: 2rem;
}

/* ============================================
   Booking Info & Form Styles
   ============================================ */

.booking-info {
    background: rgba(240, 249, 255, 0.8);
    padding: 1rem;
    border-radius: 6px;
    margin-bottom: 1.5rem;
    color: #333;
}

.booking-info strong {
    display: block;
    margin-bottom: 0.5rem;
}

.booking-info-detail {
    margin-top: 0.5rem;
}

.form-select-persons {
    width: 100%;
    max-width: 120px;
}

.person-selection {
    display: flex;
    gap: 2rem;
    margin-bottom: 0.5rem;
}

.person-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.person-group label {
    font-weight: 500;
    font-size: 0.9rem;
    min-width: 80px;
}

.form-textarea-notes {
    width: 100%;
    resize: vertical;
}

.person-selector-form {
    display: flex;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
}

.person-selector-label {
    font-weight: 600;
    margin-right: 0.5rem;
}

.person-selector-buttons {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.person-selector-button {
    min-width: 60px;
    padding: 0.5rem;
}

.person-selector-info {
    margin-top: 1rem;
    color: #6b7280;
    font-size: 0.875rem;
}

/* ============================================
   Accessibility & Utilities
   ============================================ */

/* Fokus-Stile für Tastaturnavigation */
*:focus-visible {
    outline: 2px solid #001B4C;
    outline-offset: 2px;
}

/* Screen-Reader only */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Utility-Klassen */
.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

.hidden {
    display: none !important;
}

/* Print-Styles */
@media print {
    header, nav, footer {
        display: none;
    }
    
    .booking-confirmation {
        padding: 2rem;
    }
    
    .btn {
        display: none;
    }
}