/* H24 Hochschwarzwaldkarte - Touch UI with Glassmorphism */
/* CI: Teal (#0d9488) + Lime (#84cc16) */

:root {
    /* H24 Consulting CI Colors */
    --primary: #0d9488;
    --primary-light: #14b8a6;
    --primary-dark: #0f766e;
    --accent: #84cc16;
    --accent-light: #a3e635;
    --accent-dark: #65a30d;

    /* Neutrals */
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;

    /* Semantic */
    --success: #10b981;
    --warning: #f59e0b;
    --error: #ef4444;

    /* Glassmorphism */
    --glass-bg: rgba(255, 255, 255, 0.85);
    --glass-border: rgba(255, 255, 255, 0.3);
    --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    --blur: 20px;

    /* Spacing */
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-2xl: 3rem;

    /* Touch targets */
    --touch-min: 48px;

    /* Radius */
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --radius-full: 9999px;

    /* Transitions */
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, var(--gray-900) 0%, var(--gray-800) 50%, var(--primary-dark) 100%);
    color: var(--gray-900);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

/* Background Pattern */
.bg-pattern {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        radial-gradient(circle at 20% 80%, rgba(13, 148, 136, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(132, 204, 22, 0.2) 0%, transparent 50%),
        radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.05) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

/* Header */
.header {
    padding: var(--space-lg) var(--space-xl);
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(var(--blur));
    -webkit-backdrop-filter: blur(var(--blur));
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
    z-index: 10;
}

.header-content {
    max-width: 600px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: var(--space-lg);
}

.logo {
    height: 40px;
    width: auto;
}

.header-text h1 {
    font-size: 1.5rem;
    font-weight: 700;
    color: white;
    letter-spacing: -0.02em;
}

.header-text p {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.7);
    font-weight: 400;
}

/* Main Content */
.main-content {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-xl);
    position: relative;
    z-index: 1;
}

/* Steps */
.step {
    display: none;
    width: 100%;
    max-width: 500px;
    animation: fadeIn 0.4s ease;
}

.step.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Glass Card */
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(var(--blur));
    -webkit-backdrop-filter: blur(var(--blur));
    border-radius: var(--radius-lg);
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
    padding: var(--space-2xl);
}

/* Step Indicator */
.step-indicator {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    margin-bottom: var(--space-xl);
}

.step-number {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-full);
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: white;
    font-weight: 700;
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.step-label {
    font-size: 0.875rem;
    color: var(--gray-500);
    font-weight: 500;
}

/* Typography */
h2 {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: var(--space-sm);
    letter-spacing: -0.02em;
}

.subtitle {
    font-size: 1rem;
    color: var(--gray-500);
    margin-bottom: var(--space-xl);
}

/* Input Group */
.input-group {
    margin-bottom: var(--space-lg);
}

.input-group label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: var(--space-sm);
}

.input-group input {
    width: 100%;
    height: var(--touch-min);
    padding: 0 var(--space-lg);
    font-size: 1.125rem;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-md);
    background: white;
    color: var(--gray-900);
    transition: var(--transition);
}

.input-group input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(13, 148, 136, 0.15);
}

.input-group input::placeholder {
    color: var(--gray-400);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    min-height: var(--touch-min);
    padding: var(--space-md) var(--space-xl);
    font-size: 1rem;
    font-weight: 600;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    box-shadow: 0 4px 14px rgba(13, 148, 136, 0.4);
}

.btn-primary:hover:not(:disabled) {
    background: linear-gradient(135deg, var(--primary-light), var(--primary));
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(13, 148, 136, 0.5);
}

.btn-primary:active:not(:disabled) {
    transform: translateY(0);
}

.btn-secondary {
    background: var(--gray-100);
    color: var(--gray-700);
}

.btn-secondary:hover:not(:disabled) {
    background: var(--gray-200);
}

.btn-large {
    width: 100%;
    height: 56px;
    font-size: 1.125rem;
}

.btn-group {
    display: flex;
    gap: var(--space-md);
    margin-top: var(--space-xl);
}

.btn-group .btn-secondary {
    flex: 0 0 auto;
}

.btn-group .btn-primary {
    flex: 1;
}

.btn-spinner {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.btn-spinner.hidden,
.hidden {
    display: none !important;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Reservation Card */
.reservation-card {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    border-radius: var(--radius-md);
    padding: var(--space-lg);
    margin-bottom: var(--space-lg);
}

.reservation-card .res-name {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: var(--space-sm);
}

.reservation-card .res-dates {
    display: flex;
    gap: var(--space-lg);
    font-size: 0.875rem;
    opacity: 0.9;
}

.reservation-card .res-dates span {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
}

/* Persons List */
.persons-list {
    margin-bottom: var(--space-lg);
}

.persons-list h3 {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--gray-500);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: var(--space-md);
}

.person-item {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-md);
    background: var(--gray-50);
    border-radius: var(--radius-sm);
    margin-bottom: var(--space-sm);
}

.person-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-full);
    background: var(--gray-200);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gray-500);
}

.person-icon.adult {
    background: var(--primary);
    color: white;
}

.person-icon.youth {
    background: var(--accent);
    color: white;
}

.person-icon.child {
    background: var(--warning);
    color: white;
}

.person-info {
    flex: 1;
}

.person-name {
    font-weight: 600;
    color: var(--gray-900);
}

.person-meta {
    font-size: 0.75rem;
    color: var(--gray-500);
}

/* Output Options */
.output-options {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
    margin-bottom: var(--space-lg);
}

.output-option {
    display: flex;
    align-items: center;
    gap: var(--space-lg);
    padding: var(--space-lg);
    background: white;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition);
    text-align: left;
    width: 100%;
}

.output-option:hover {
    border-color: var(--primary);
    background: rgba(13, 148, 136, 0.05);
}

.output-option.selected {
    border-color: var(--primary);
    background: rgba(13, 148, 136, 0.1);
}

.output-option .option-icon {
    flex-shrink: 0;
    width: 64px;
    height: 64px;
    border-radius: var(--radius-md);
    background: var(--gray-100);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gray-400);
    transition: var(--transition);
}

.output-option.selected .option-icon {
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: white;
}

.output-option .option-text {
    flex: 1;
}

.output-option .option-text h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: var(--space-xs);
}

.output-option .option-text p {
    font-size: 0.875rem;
    color: var(--gray-500);
}

.output-option .option-check {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    border-radius: var(--radius-full);
    border: 2px solid var(--gray-300);
    display: flex;
    align-items: center;
    justify-content: center;
    color: transparent;
    transition: var(--transition);
}

.output-option.selected .option-check {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

/* Success Card */
.success-card {
    text-align: center;
}

.success-icon {
    width: 100px;
    height: 100px;
    margin: 0 auto var(--space-xl);
    border-radius: var(--radius-full);
    background: linear-gradient(135deg, var(--success), var(--accent));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    animation: scaleIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes scaleIn {
    from {
        transform: scale(0);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.success-details {
    background: var(--gray-50);
    border-radius: var(--radius-md);
    padding: var(--space-lg);
    margin: var(--space-xl) 0;
    text-align: left;
}

.success-details p {
    display: flex;
    justify-content: space-between;
    padding: var(--space-sm) 0;
    border-bottom: 1px solid var(--gray-200);
}

.success-details p:last-child {
    border-bottom: none;
}

.success-details .label {
    color: var(--gray-500);
}

.success-details .value {
    font-weight: 600;
    color: var(--gray-900);
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.loading-content {
    background: white;
    border-radius: var(--radius-lg);
    padding: var(--space-2xl);
    text-align: center;
    max-width: 300px;
}

.loading-spinner {
    width: 60px;
    height: 60px;
    margin: 0 auto var(--space-lg);
    border: 4px solid var(--gray-200);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.loading-content p {
    font-size: 1rem;
    color: var(--gray-600);
}

/* Toast */
.toast {
    position: fixed;
    bottom: var(--space-xl);
    left: 50%;
    transform: translateX(-50%);
    background: var(--error);
    color: white;
    padding: var(--space-md) var(--space-xl);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    z-index: 1001;
    animation: slideUp 0.3s ease;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

@keyframes slideUp {
    from {
        transform: translate(-50%, 100%);
        opacity: 0;
    }
    to {
        transform: translate(-50%, 0);
        opacity: 1;
    }
}

/* Footer */
.footer {
    padding: var(--space-lg) var(--space-xl);
    text-align: center;
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.75rem;
    position: relative;
    z-index: 1;
}

.footer p {
    margin-bottom: var(--space-sm);
}

.partner-logo {
    height: 24px;
    opacity: 0.5;
}

/* Tablet & Desktop */
@media (min-width: 768px) {
    .glass-card {
        padding: var(--space-2xl) 3rem;
    }

    h2 {
        font-size: 2rem;
    }

    .output-options {
        flex-direction: row;
    }

    .output-option {
        flex: 1;
        flex-direction: column;
        text-align: center;
        padding: var(--space-xl);
    }

    .output-option .option-icon {
        width: 80px;
        height: 80px;
        margin-bottom: var(--space-md);
    }

    .output-option .option-check {
        position: absolute;
        top: var(--space-md);
        right: var(--space-md);
    }

    .output-option {
        position: relative;
    }
}

/* Large Touch Screens */
@media (min-width: 1024px) {
    html {
        font-size: 18px;
    }

    .main-content {
        padding: var(--space-2xl) 4rem;
    }

    .step {
        max-width: 600px;
    }
}

/* Landscape Mode on Tablets */
@media (max-height: 600px) and (orientation: landscape) {
    .header {
        padding: var(--space-md) var(--space-xl);
    }

    .main-content {
        padding: var(--space-md) var(--space-xl);
        align-items: flex-start;
    }

    .glass-card {
        padding: var(--space-lg);
    }

    .step-indicator {
        margin-bottom: var(--space-md);
    }

    h2 {
        font-size: 1.25rem;
    }

    .subtitle {
        margin-bottom: var(--space-md);
    }
}

/* Extra small screens */
@media (max-width: 380px) {
    html {
        font-size: 14px;
    }

    .glass-card {
        padding: var(--space-lg);
    }

    .btn-group {
        flex-direction: column;
    }

    .btn-group .btn-secondary {
        order: 2;
    }
}
