/**
 * Gastportal Stylesheet - Modern Design
 * Ferienhaus Waldblick
 */

/* ===== Variables ===== */
:root {
    --primary-green: #4a7c23;
    --primary-green-dark: #3d6a1c;
    --primary-green-light: rgba(74, 124, 35, 0.1);
    --accent-brown: #834400;
    --accent-brown-light: #a05500;
    --text-dark: #1a1a1a;
    --text-medium: #4a4a4a;
    --text-light: #6b7280;
    --text-muted: #9ca3af;
    --bg-light: #ffffff;
    --bg-body: #f8f9fa;
    --bg-card: #ffffff;
    --bg-hover: #f3f4f6;
    --border-color: #e5e7eb;
    --border-light: #f0f0f0;
    --success-color: #10b981;
    --success-bg: #ecfdf5;
    --error-color: #ef4444;
    --error-bg: #fef2f2;
    --warning-color: #f59e0b;
    --warning-bg: #fffbeb;
    --info-color: #3b82f6;
    --info-bg: #eff6ff;
    --sidebar-width: 280px;
    --header-height: 64px;
    --shadow-xs: 0 1px 2px rgba(0,0,0,0.05);
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.04);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.08), 0 2px 4px -1px rgba(0,0,0,0.04);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.08), 0 4px 6px -2px rgba(0,0,0,0.04);
    --shadow-xl: 0 20px 25px -5px rgba(0,0,0,0.08), 0 10px 10px -5px rgba(0,0,0,0.02);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --transition-fast: 0.15s ease;
    --transition-normal: 0.2s ease;
    --transition-slow: 0.3s ease;
}

/* ===== Base ===== */
*, *::before, *::after {
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 15px;
    line-height: 1.6;
    color: var(--text-dark);
    background: var(--bg-body);
    margin: 0;
    padding: 0;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    color: var(--primary-green);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--primary-green-dark);
}

h1, h2, h3, h4, h5, h6 {
    margin: 0 0 1rem;
    line-height: 1.3;
    font-weight: 600;
    color: var(--text-dark);
}

p {
    margin: 0 0 1rem;
}

/* ===== Layout ===== */
.guest-wrapper {
    display: flex;
    min-height: 100vh;
}

/* ===== Sidebar ===== */
.guest-sidebar {
    width: var(--sidebar-width);
    background: var(--bg-card);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 100;
    transition: transform var(--transition-slow);
}

.sidebar-header {
    padding: 24px 24px 20px;
    border-bottom: 1px solid var(--border-color);
}

.sidebar-logo {
    max-width: 160px;
    height: auto;
    display: block;
    margin-bottom: 8px;
}

.sidebar-header .logo-link {
    text-decoration: none;
    display: block;
}

.sidebar-subtitle {
    display: inline-block;
    font-size: 11px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    background: var(--bg-hover);
    padding: 4px 10px;
    border-radius: 20px;
    margin-top: 4px;
}

.sidebar-nav {
    flex: 1;
    padding: 16px 12px;
    overflow-y: auto;
}

.nav-section {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    padding: 20px 12px 8px;
    margin-top: 8px;
}

.nav-item {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    color: var(--text-medium);
    text-decoration: none;
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
    font-weight: 500;
    margin-bottom: 4px;
}

.nav-item:hover {
    background: var(--bg-hover);
    color: var(--text-dark);
    text-decoration: none;
}

.nav-item.active {
    background: var(--primary-green-light);
    color: var(--primary-green);
}

.nav-item.active .nav-icon {
    color: var(--primary-green);
}

.nav-icon {
    margin-right: 12px;
    font-size: 18px;
    width: 24px;
    text-align: center;
    color: var(--text-light);
    transition: color var(--transition-fast);
}

.sidebar-footer {
    padding: 16px;
    border-top: 1px solid var(--border-color);
}

.guest-info {
    padding: 14px 16px;
    background: linear-gradient(135deg, #f8f9fa 0%, #f3f4f6 100%);
    border-radius: var(--radius-md);
    margin-bottom: 12px;
}

.guest-name {
    display: block;
    font-weight: 600;
    font-size: 14px;
    color: var(--text-dark);
}

.guest-email {
    display: block;
    font-size: 12px;
    color: var(--text-light);
    margin-top: 2px;
}

.logout-link {
    color: var(--text-light);
    font-size: 14px;
}

.logout-link:hover {
    color: var(--error-color);
}

/* ===== Main Content ===== */
.guest-main {
    flex: 1;
    margin-left: var(--sidebar-width);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background: var(--bg-body);
}

.guest-header {
    background: var(--bg-card);
    padding: 18px 28px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 50;
    backdrop-filter: blur(8px);
    background: rgba(255, 255, 255, 0.95);
}

.guest-header h2 {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
    color: var(--text-dark);
}

.guest-content {
    flex: 1;
    padding: 28px;
    max-width: 1200px;
}

.guest-footer {
    padding: 20px 28px;
    text-align: center;
    font-size: 13px;
    color: var(--text-muted);
    border-top: 1px solid var(--border-color);
    background: var(--bg-card);
}

.guest-footer a {
    color: var(--text-muted);
}

.guest-footer a:hover {
    color: var(--primary-green);
}

/* ===== Mobile Menu ===== */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    padding: 8px;
    margin-right: 16px;
    cursor: pointer;
    border-radius: var(--radius-sm);
    transition: background var(--transition-fast);
}

.mobile-menu-toggle:hover {
    background: var(--bg-hover);
}

.mobile-menu-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--text-dark);
    margin: 5px 0;
    border-radius: 2px;
    transition: transform var(--transition-normal);
}

.mobile-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(4px);
    z-index: 90;
    opacity: 0;
    transition: opacity var(--transition-slow);
}

.mobile-overlay.active {
    display: block;
    opacity: 1;
}

/* ===== Alerts ===== */
.alert {
    padding: 16px 20px;
    border-radius: var(--radius-md);
    margin: 0 28px 20px;
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 12px;
}

.alert::before {
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    font-size: 16px;
}

.alert-success {
    background: var(--success-bg);
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.alert-success::before {
    content: '\f00c';
    color: var(--success-color);
}

.alert-error {
    background: var(--error-bg);
    color: #991b1b;
    border: 1px solid #fecaca;
}

.alert-error::before {
    content: '\f06a';
    color: var(--error-color);
}

.alert-info {
    background: var(--info-bg);
    color: #1e40af;
    border: 1px solid #bfdbfe;
}

.alert-info::before {
    content: '\f05a';
    color: var(--info-color);
}

.alert-warning {
    background: var(--warning-bg);
    color: #92400e;
    border: 1px solid #fde68a;
}

.alert-warning::before {
    content: '\f071';
    color: var(--warning-color);
}

/* ===== Buttons ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border: none;
    border-radius: var(--radius-md);
    font-size: 14px;
    font-weight: 600;
    font-family: inherit;
    text-decoration: none;
    cursor: pointer;
    transition: all var(--transition-normal);
    box-shadow: var(--shadow-sm);
}

.btn:hover {
    text-decoration: none;
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn:active {
    transform: translateY(0);
    box-shadow: var(--shadow-sm);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-green) 0%, var(--primary-green-dark) 100%);
    color: #fff;
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-green-dark) 0%, #2d5a10 100%);
    color: #fff;
}

.btn-secondary {
    background: var(--bg-card);
    color: var(--text-medium);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: var(--bg-hover);
    color: var(--text-dark);
}

.btn-accent {
    background: linear-gradient(135deg, var(--accent-brown) 0%, var(--accent-brown-light) 100%);
    color: #fff;
}

.btn-accent:hover {
    background: linear-gradient(135deg, #6b3800 0%, var(--accent-brown) 100%);
    color: #fff;
}

.btn-small {
    padding: 8px 16px;
    font-size: 13px;
}

.btn i {
    font-size: 14px;
}

/* ===== Cards ===== */
.dashboard-card, .booking-card, .info-section, .profile-section {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    margin-bottom: 24px;
    overflow: hidden;
    border: 1px solid var(--border-light);
    transition: box-shadow var(--transition-normal);
}

.dashboard-card:hover {
    box-shadow: var(--shadow-md);
}

.dashboard-card.highlight {
    border: 2px solid var(--primary-green);
    box-shadow: 0 0 0 4px var(--primary-green-light);
}

.card-header {
    padding: 18px 24px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, #fafbfc 0%, #f8f9fa 100%);
}

.card-header h4 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: var(--text-dark);
}

.card-body {
    padding: 24px;
}

.card-actions {
    padding-top: 20px;
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

/* ===== Dashboard Welcome ===== */
.dashboard-welcome {
    background: linear-gradient(135deg, var(--accent-brown) 0%, var(--accent-brown-light) 100%);
    color: #fff;
    padding: 28px 32px;
    border-radius: var(--radius-lg);
    margin-bottom: 28px;
    box-shadow: var(--shadow-lg);
}

.dashboard-welcome h3 {
    color: #fff;
    margin-bottom: 8px;
    font-size: 24px;
}

.dashboard-welcome p {
    margin: 0;
    opacity: 0.9;
    font-size: 15px;
}

/* ===== Booking Dates ===== */
.booking-dates {
    display: flex;
    align-items: center;
    gap: 24px;
    margin-bottom: 20px;
}

.date-block {
    text-align: center;
    flex: 1;
}

.date-label {
    display: block;
    font-size: 11px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.date-value {
    display: block;
    font-size: 22px;
    font-weight: 700;
    color: var(--primary-green);
}

.date-weekday {
    display: block;
    font-size: 13px;
    color: var(--text-light);
    margin-top: 2px;
}

.date-arrow {
    font-size: 24px;
    color: var(--text-muted);
}

/* ===== Countdown ===== */
.countdown-box {
    background: linear-gradient(135deg, #f8fdf5 0%, #f0f9eb 100%);
    padding: 24px;
    border-radius: var(--radius-md);
    text-align: center;
    margin: 20px 0;
    border: 1px solid #d4edbc;
}

.countdown-number {
    display: block;
    font-size: 56px;
    font-weight: 700;
    color: var(--primary-green);
    line-height: 1;
}

.countdown-text {
    font-size: 14px;
    color: var(--text-light);
    margin-top: 8px;
}

/* ===== Quick Links Grid ===== */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 28px;
}

.quick-link-card {
    background: var(--bg-card);
    padding: 24px 20px;
    border-radius: var(--radius-lg);
    text-align: center;
    box-shadow: var(--shadow-sm);
    text-decoration: none;
    color: var(--text-dark);
    transition: all var(--transition-normal);
    border: 1px solid var(--border-light);
}

.quick-link-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    text-decoration: none;
    border-color: var(--primary-green-light);
}

.quick-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    margin: 0 auto 14px;
    background: linear-gradient(135deg, var(--primary-green-light) 0%, rgba(74, 124, 35, 0.15) 100%);
    border-radius: var(--radius-md);
    font-size: 24px;
    color: var(--primary-green);
}

.quick-title {
    display: block;
    font-weight: 600;
    font-size: 15px;
    margin-bottom: 4px;
}

.quick-desc {
    font-size: 13px;
    color: var(--text-light);
}

/* ===== Status Badges ===== */
.booking-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.status-inquiry {
    background: #fef3c7;
    color: #92400e;
}

.status-confirmed {
    background: #dbeafe;
    color: #1e40af;
}

.status-contract_sent {
    background: #e5e7eb;
    color: #374151;
}

.status-signed {
    background: #cffafe;
    color: #0e7490;
}

.status-paid, .status-completed {
    background: #d1fae5;
    color: #065f46;
}

.status-cancelled {
    background: #fee2e2;
    color: #991b1b;
}

/* ===== Forms ===== */
.form-group {
    margin-bottom: 24px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    font-size: 14px;
    color: var(--text-dark);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 15px;
    font-family: inherit;
    transition: all var(--transition-fast);
    background: var(--bg-card);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-green);
    box-shadow: 0 0 0 4px var(--primary-green-light);
}

.form-group input:disabled {
    background: var(--bg-hover);
    color: var(--text-light);
}

.form-hint {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 6px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

/* ===== Empty State ===== */
.empty-state {
    text-align: center;
    padding: 60px 32px;
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

.empty-state i {
    font-size: 48px;
    color: var(--text-muted);
    margin-bottom: 16px;
}

.empty-state p {
    color: var(--text-light);
    margin-bottom: 24px;
    font-size: 15px;
}

/* ===== Info Pages ===== */
.info-page {
    max-width: 800px;
}

.info-section {
    padding: 28px;
}

.info-section h3 {
    color: var(--primary-green);
    margin-bottom: 20px;
    font-size: 18px;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.info-card {
    background: linear-gradient(135deg, #fafbfc 0%, #f8f9fa 100%);
    padding: 20px;
    border-radius: var(--radius-md);
    text-align: center;
    border: 1px solid var(--border-color);
}

.info-card h4 {
    margin-bottom: 8px;
    font-size: 14px;
    color: var(--text-medium);
}

.highlight-time {
    display: block;
    font-size: 28px;
    font-weight: 700;
    color: var(--primary-green);
    margin-bottom: 4px;
}

/* ===== FAQ ===== */
.faq-list {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    border: 1px solid var(--border-light);
}

.faq-item {
    border-bottom: 1px solid var(--border-color);
}

.faq-item:last-child {
    border-bottom: none;
}

.faq-question {
    padding: 20px 24px;
    margin: 0;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
    color: var(--text-dark);
    transition: background var(--transition-fast);
}

.faq-question:hover {
    background: var(--bg-hover);
}

.faq-question::after {
    content: "\f078";
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    font-size: 14px;
    color: var(--text-muted);
    transition: transform var(--transition-normal);
}

.faq-item.open .faq-question::after {
    transform: rotate(180deg);
}

.faq-answer {
    padding: 0 24px 20px;
    color: var(--text-medium);
    line-height: 1.7;
}

/* ===== Contact ===== */
.contact-form {
    background: var(--bg-card);
    padding: 32px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-light);
}

.contact-methods {
    display: grid;
    gap: 16px;
    margin-top: 24px;
}

.contact-method {
    display: flex;
    gap: 16px;
    padding: 20px;
    background: linear-gradient(135deg, #fafbfc 0%, #f8f9fa 100%);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
}

.method-icon {
    font-size: 24px;
    color: var(--primary-green);
}

.method-content strong {
    display: block;
    margin-bottom: 4px;
    color: var(--text-dark);
}

.method-content p {
    margin: 0;
    font-size: 14px;
    color: var(--text-light);
}

/* ===== Profile ===== */
.profile-page {
    max-width: 640px;
}

.profile-section {
    padding: 28px;
}

.profile-section h3 {
    margin-bottom: 24px;
    color: var(--text-dark);
    font-size: 18px;
}

/* ===== Utilities ===== */
.text-muted {
    color: var(--text-muted);
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
    .guest-sidebar {
        transform: translateX(-100%);
        width: 300px;
        max-width: 85vw;
        box-shadow: var(--shadow-xl);
    }

    .guest-sidebar.open {
        transform: translateX(0);
    }

    .guest-main {
        margin-left: 0;
    }

    .mobile-menu-toggle {
        display: block;
    }

    .guest-content {
        padding: 20px;
    }

    .alert {
        margin: 0 20px 16px;
    }

    .guest-header {
        padding: 14px 20px;
    }

    .guest-header h2 {
        font-size: 18px;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .booking-dates {
        flex-direction: column;
        text-align: center;
        gap: 16px;
    }

    .date-arrow {
        transform: rotate(90deg);
    }

    .dashboard-grid {
        grid-template-columns: 1fr 1fr;
    }

    .nav-item {
        padding: 14px 20px;
        min-height: 48px;
    }

    .btn {
        min-height: 48px;
        padding: 14px 24px;
    }
}

@media (max-width: 480px) {
    .guest-sidebar {
        width: 100%;
        max-width: 100%;
    }

    .guest-content {
        padding: 16px;
    }

    .alert {
        margin: 0 16px 16px;
        padding: 14px 16px;
    }

    .dashboard-welcome {
        padding: 24px 20px;
    }

    .dashboard-welcome h3 {
        font-size: 20px;
    }

    .dashboard-grid {
        grid-template-columns: 1fr;
    }

    .card-header {
        padding: 16px 20px;
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .card-body {
        padding: 20px;
    }

    .countdown-number {
        font-size: 42px;
    }

    .card-actions {
        flex-direction: column;
    }

    .card-actions .btn {
        width: 100%;
    }

    .quick-link-card {
        padding: 20px 16px;
    }

    .quick-icon {
        width: 48px;
        height: 48px;
        font-size: 20px;
    }
}

/* Touch optimizations */
@media (hover: none) and (pointer: coarse) {
    .nav-item:hover,
    .btn:hover,
    .quick-link-card:hover {
        transform: none;
        box-shadow: var(--shadow-sm);
    }

    .nav-item:active,
    .btn:active,
    .quick-link-card:active {
        transform: scale(0.98);
    }
}

/* iPhone Safe Area */
@supports (padding: env(safe-area-inset-bottom)) {
    .guest-sidebar {
        padding-bottom: env(safe-area-inset-bottom);
    }

    .guest-footer {
        padding-bottom: calc(20px + env(safe-area-inset-bottom));
    }

    .sidebar-footer {
        padding-bottom: calc(16px + env(safe-area-inset-bottom));
    }
}

/* Smooth scrolling */
.sidebar-nav,
.guest-content {
    -webkit-overflow-scrolling: touch;
}
