/* ================================
   Dogyworld – Customer Stylesheet
   Nur für Kunden-Seiten
   ================================ */

/* ---- Dashboard: Stat-Boxen ---- */
.stat-box {
    background: #f9f9f9; padding: 20px; border-radius: 10px;
    border-left: 5px solid var(--primary); display: flex;
    align-items: center; gap: 15px; cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}
.stat-box:hover { transform: translateY(-3px); box-shadow: 0 6px 15px rgba(0,0,0,0.1); }
.stat-box i { font-size: 2em; color: var(--primary); }
.stat-box h3 { margin: 0; color: #333; font-size: 1.1em; }
.stat-box p  { margin: 5px 0 0 0; font-size: 1.2em; font-weight: bold; color: #111; }

/* ---- Warnbox (fehlende Dokumente) ---- */
.warning-box {
    background: #fdf3f2; border: 2px solid var(--danger);
    padding: 25px; border-radius: 12px; margin-bottom: 30px;
    box-shadow: 0 4px 15px rgba(231,76,60,0.15);
}
.warning-box h2 { color: var(--danger); margin-top: 0; display: flex; align-items: center; gap: 10px; }
.warning-box ul { margin: 15px 0; padding-left: 20px; }
.warning-box li { font-size: 1.1em; margin-bottom: 5px; font-weight: bold; color: #444; }

/* ---- Booking: Platz-Grid ---- */
.space-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 25px; margin-top: 20px;
}
.space-card {
    background: white; border-radius: 15px; overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08); transition: transform 0.3s;
    cursor: pointer; text-decoration: none; color: inherit;
    display: flex; flex-direction: column;
}
.space-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(199, 5, 253, 0.2);
    border: 2px solid var(--primary);
}
.space-image { width: 100%; height: 200px; object-fit: cover; background: #eee; }
.space-content {
    padding: 20px; flex-grow: 1;
    display: flex; flex-direction: column; justify-content: space-between;
}
.space-title { font-size: 1.3em; margin: 0 0 10px 0; color: var(--dark); }
.space-desc  { color: #666; font-size: 0.9em; line-height: 1.5; margin-bottom: 20px; }
.space-price { font-size: 1.2em; font-weight: bold; color: var(--primary); }

/* ---- Booking: Kalender ---- */
.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 10px; margin-top: 20px;
    max-width: 700px;
}
.day-header { text-align: center; font-weight: bold; color: #666; padding-bottom: 10px; }
.day-cell {
    border: 2px solid #ddd; border-radius: 10px; padding: 8px 4px 6px;
    text-align: center; cursor: pointer; transition: 0.2s;
    font-size: 1.2em; font-weight: bold; color: #333; text-decoration: none;
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
}
.cal-weather { font-size: 1.1em; line-height: 1; display: block; }
.day-cell:hover:not(.disabled) {
    border-color: var(--primary); background: #faf0ff;
    color: var(--primary); transform: translateY(-3px);
}
.day-cell.disabled { background: #f9f9f9; color: #ccc; border-color: #eee; cursor: not-allowed; }
.day-cell.active   { background: var(--primary); color: white; border-color: var(--primary); }

/* ---- Booking: Slide-Out Panel ---- */
.slide-out {
    position: fixed; right: -450px; top: 0; width: 438px; height: 100vh;
    background: white; box-shadow: -5px 0 25px rgba(0,0,0,0.1);
    transition: 0.4s ease-in-out; z-index: 200; display: flex; flex-direction: column;
    /* iOS: dynamische Viewport-Höhe exkl. Browser-Chrome */
    height: 100dvh;
}
.slide-out.open { right: 0; }
.slide-header {
    background: var(--dark); color: white; padding: 25px;
    text-align: center; position: relative;
}
.slide-header .close-btn { position: absolute; top: 15px; left: 15px; color: white; font-size: 1.5em; }
.slide-content { flex: 1; overflow: hidden; display: flex; flex-direction: column; }
.slide-content form { flex: 1; overflow: hidden; display: flex; flex-direction: column; }
.times-container { padding: 0 25px 10px; flex: 1; overflow-y: auto; }
.checkout-footer {
    background: white; padding: 20px;
    /* iOS: Platz für Home-Indicator unterhalb des Contents */
    padding-bottom: max(20px, env(safe-area-inset-bottom));
    border-top: 1px solid #eee; box-shadow: 0 -5px 15px rgba(0,0,0,0.05);
    flex-shrink: 0;
}

/* ---- Booking: Zeitauswahl Checkboxen ---- */
.time-checkbox { display: none; }
.time-label {
    display: block; width: 100%; padding: 15px; margin-bottom: 15px;
    border: 2px solid var(--primary); border-radius: 8px;
    background: white; color: var(--primary);
    font-size: 1.1em; font-weight: bold; cursor: pointer;
    transition: 0.2s; text-align: center; box-sizing: border-box;
}
.time-label:hover { background: #faf0ff; }
/* Tooltip via JS (#dw-tooltip) — kein ::after/:before mehr */
#dw-tooltip {
    position: fixed; z-index: 9999; display: none;
    background: #fff; color: #111;
    font-size: 0.95em; font-weight: 600; line-height: 1.5;
    padding: 10px 14px; border-radius: 8px;
    border: 2px solid var(--primary);
    white-space: pre-wrap; max-width: 260px; text-align: left;
    pointer-events: none;
    box-shadow: 0 4px 16px rgba(212, 0, 255, 0.15);
    transition: opacity 0.2s ease;
}
.time-checkbox:checked + .time-label {
    background: var(--primary); color: white;
    box-shadow: 0 4px 10px rgba(199, 5, 253, 0.3); transform: scale(1.02);
}
.time-checkbox:checked + .time-label small {
    color: rgba(255, 255, 255, 0.85) !important;
}
.btn-checkout {
    background: var(--primary); color: white; padding: 15px;
    width: 100%; border: none; border-radius: 8px;
    font-size: 1.2em; font-weight: bold; cursor: pointer; transition: 0.2s;
}
.btn-checkout:disabled { background: #ccc; cursor: not-allowed; transform: none; box-shadow: none; }

/* ---- Checkout ---- */
.summary-box {
    background: #f9f9f9; border: 1px solid #eee;
    border-radius: 10px; padding: 20px; margin-bottom: 25px;
}
.summary-row {
    display: flex; justify-content: space-between; margin-bottom: 10px;
    padding-bottom: 10px; border-bottom: 1px dashed #ddd; font-size: 1.1em;
}
.summary-row:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }
.time-badge {
    display: inline-block; background: var(--primary); color: white;
    padding: 5px 12px; border-radius: 20px; font-size: 0.9em; margin: 5px 5px 5px 0;
}
.total-row {
    display: flex; justify-content: space-between; align-items: center;
    font-size: 1.5em; font-weight: bold; color: var(--dark);
    background: #faf0ff; padding: 20px; border-radius: 10px;
    border-left: 5px solid var(--primary); margin-bottom: 25px;
}
.terms-box {
    background: #fff8e1; border: 1px solid #ffe082;
    padding: 15px; border-radius: 8px; margin-bottom: 25px;
    display: flex; gap: 15px; align-items: flex-start;
}
.terms-box input[type="checkbox"] { width: 20px; height: 20px; margin-top: 3px; cursor: pointer; }
.btn-pay {
    background: var(--primary); color: white; padding: 18px 30px;
    border: none; border-radius: 8px; font-size: 1.2em; font-weight: bold;
    cursor: pointer; width: 100%; transition: 0.2s;
    display: flex; justify-content: center; align-items: center; gap: 10px;
    box-shadow: 0 4px 15px rgba(199,5,253,0.3);
}
.btn-pay:hover { background: #a800d4; transform: translateY(-2px); box-shadow: 0 6px 20px rgba(199,5,253,0.45); }

/* ---- Profil: Hunde-Karte ---- */
.dog-card {
    background: #fdfdfd; border: 1px solid #eee;
    border-left: 4px solid var(--primary);
    padding: 15px; border-radius: 8px; margin-bottom: 15px; position: relative;
}
.dog-card-delete { position: absolute; top: 15px; right: 15px; color: var(--danger); text-decoration: none; }

/* ---- Profil: Formular-Grid ---- */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.btn-danger {
    background: white; color: var(--danger);
    border: 1px solid var(--danger);
}

/* ---- Login-/Register-Seite ---- */
.auth-body {
    background: var(--dark); display: flex;
    justify-content: center; align-items: center; height: 100vh;
}
.auth-card {
    background: white; padding: 40px; border-radius: 15px;
    width: 100%; max-width: 400px; color: #333;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}
.auth-card h2 { color: var(--primary); text-align: center; margin-bottom: 30px; }
.footer-links { margin-top: 25px; font-size: 0.9em; border-top: 1px solid #eee; padding-top: 15px; text-align: center; }
.footer-links a { color: var(--primary); text-decoration: none; font-weight: bold; }

/* ---- Split-Screen Login ---- */
.login-split {
    position: fixed;
    top: 0; left: 0;
    width: 100vw; height: 100vh;
    overflow: hidden;
}
/* Rechte Hälfte: Bild / Video — 65% des Viewports */
.login-right {
    position: absolute;
    top: 0; right: 0;
    width: 65%; height: 100%;
    background: linear-gradient(135deg, #0d0011 0%, #2d0040 40%, #6600aa 100%);
    z-index: 1;
}
.login-right img,
.login-right video {
    position: absolute;
    inset: 0;
    width: 100%; height: 100%;
    object-fit: cover;
}
/* Formular-Overlay: weißer Hintergrund, 35% links */
.login-form-overlay {
    position: absolute;
    top: 0; left: 0;
    width: 35%; height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
    z-index: 3;
    background: #fff;
    overflow-y: auto;
}
.login-form-overlay .auth-card {
    box-shadow: 0 15px 50px rgba(0,0,0,0.6), 0 0 40px rgba(212,0,255,0.08);
}

/* ===========================
   Responsive / Mobile
   =========================== */

@media (max-width: 768px) {
    /* Platz-Grid: 1 Spalte */
    .space-grid { grid-template-columns: 1fr; gap: 16px; }
    .space-image { height: 180px; }

    /* Buchungskalender: kompakt */
    .calendar-grid { gap: 4px; max-width: 100%; }
    .day-cell { padding: 6px 2px 4px; font-size: 1em; border-radius: 7px; border-width: 1.5px; }
    .cal-weather { font-size: 0.95em; }
    .day-header { font-size: 0.72em; }

    /* Slide-Out Panel: volle Breite, iOS-Höhe */
    .slide-out { width: 100%; right: -100%; height: 100vh; height: 100dvh; }

    /* Profil-Formular: 1 Spalte */
    .form-grid { grid-template-columns: 1fr; }

    /* Checkout */
    .total-row { font-size: 1.2em; padding: 15px; }
    .summary-row { font-size: 0.95em; }

    /* Stat-Boxen Dashboard */
    .stat-box { padding: 14px; }
    .stat-box i { font-size: 1.6em; }

    /* Auth-Seiten */
    .auth-body { align-items: flex-start; padding-top: 40px; }
    .auth-card { padding: 25px 20px; margin: 0 12px; max-width: 100%; box-sizing: border-box; }

    /* Split-Screen Login: auf Mobile nur Formular, scrollbar */
    .login-right { display: none !important; }
    .login-split { position: static; background: #fff; overflow-y: auto; height: auto; min-height: 100vh; }
    .login-form-overlay {
        position: relative;
        width: 100%;
        min-height: 100vh;
        padding: 40px 20px 30px;
        align-items: flex-start;
    }
    .login-form-overlay .auth-card { max-width: 100%; }
}

/* ---- Meine Buchungen: Mobile-Layout ---- */
@media (max-width: 600px) {
    .booking-row {
        flex-wrap: wrap;
        align-items: flex-start !important;
        gap: 10px !important;
    }
    .booking-actions {
        width: 100%;
        flex-direction: row !important;
        flex-wrap: wrap;
        align-items: center !important;
        justify-content: flex-start;
        text-align: left !important;
        gap: 8px !important;
    }
    /* Badge-Breite: auto statt fixer 155px (Inline-Style override) */
    .booking-actions .badge {
        width: auto !important;
        min-width: 0 !important;
    }
}

@media (max-width: 480px) {
    /* Kalender noch kompakter auf kleinen Phones */
    .calendar-grid { gap: 3px; }
    .day-cell { padding: 5px 1px 3px; font-size: 0.9em; }
    .cal-weather { font-size: 0.85em; }
    .day-header { font-size: 0.63em; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
}

/* ---- Login: Querformat (kurze Viewport-Höhe) ---- */
@media (max-height: 500px) {
    .login-right { display: none !important; }
    .login-split { position: static; overflow-y: auto; height: auto; min-height: 100vh; }
    .login-form-overlay {
        position: relative;
        width: 100%;
        min-height: 100%;
        align-items: flex-start;
        padding: 20px;
    }
}
