﻿:root {
    --f7-font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* Optional safety (recommended for mobile apps) */
*,
*::before,
*::after {
    box-sizing: border-box;
}

/* Fallback for non-F7 pages (like index.html) */
html, body, #app {
    height: 100%;
    width: 100%;
    margin: 0;
    padding: 0;
    overflow: hidden;
}

body {
    height: 100dvh;
}

/* tighten headings to match F7 look */
h1, h2, h3, h4 {
    font-weight: 600;
    letter-spacing: -0.01em;
}

/* --- NAV ICON SYSTEM (Petzio) --- */
/*
    .nav-action-btn (circle background)
        └── icon-wrapper (relative)
                ├── main svg
                └── badge svg (absolute corner) for +/-
*/

/* Main icon inside Framework7 circle button */

/* MAIN CIRCLE BUTTON */
.nav-icon-wrapper {
    position: relative;
    width: 20px;
    height: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: inherit; /* inherit button color */
}

    /* Ensure SVG fills wrapper */
    .nav-icon-wrapper svg {
        width: 100%;
        height: 100%;
        display: block;
    }

/* MAIN ICON BUTTON */
.nav-icon {
    width: 20px;
    height: 20px;
    display: inline-block;
    vertical-align: middle;
    color: #0f62fe; /* theme blue */
}

/* BADGE OVERLAY (+ / − / edit etc.) */
.nav-badge,
.nav-badge-right,
.nav-badge-left {
    position: absolute;
    bottom: -4px;
    width: 12px;
    height: 12px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 1px 2px rgba(0,0,0,0.25);
}

    /* Badge icon */
    .nav-badge svg {
        width: 9px;
        height: 9px;
    }

/* Right badge */
.nav-badge-right {
    right: -4px;
}

/* Left badge (mirror of right) */
.nav-badge-left {
    left: -4px;
}

    /* Flip arrow only */
    .nav-badge-left svg {
        transform: scaleX(-1);
    }

/* OPTIONAL SIZE VARIANTS */

.nav-icon-sm {
    width: 16px;
    height: 16px;
}

.nav-icon-lg {
    width: 24px;
    height: 24px;
}

/* --- Page row header/input + Button --- */

/*.page-button {
    flex: 0 0 auto;
    width: 34px;
    height: 34px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    margin-right: 4px;
    border: none;
    cursor: pointer;
    background-color: buttonface;
}*/


/* header */

.item-header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}

/* your reusable icon button */
.item-button {
    flex: 0 0 auto;
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    margin-right: 4px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    background-color: buttonface;
}

/* input */

.item-input-row {
    display: flex;
    align-items: center;
    gap: 6px;
    width: 100%;
}

.item-input {
    flex: 1;
    min-width: 0;
    padding: 8px;
    font-size: 14px;
}








/* --- Petzio Dialog --- */

.petzio-dialog-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 5000;
}

.petzio-dialog {
    width: 320px;
    max-width: 90%;
    background: white;
    border-radius: 14px;
    padding: 18px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.25);
    animation: petzioDialogIn 0.18s ease;
    /*background-image: url('/images/paw.svg');*/
    /*background-image: url('/images/paw-64x64-grey.png');
    paw-64x64-grey.png background-repeat: no-repeat;
    background-position: bottom right;
    background-size: 60px;*/
}

@keyframes petzioDialogIn {
    from {
        transform: scale(0.92);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

.petzio-dialog-header {
    display: flex;
    align-items: center;
    font-weight: 600;
    font-size: 18px;
    margin-bottom: 10px;
}

.petzio-dialog-icon {
    margin-right: 8px;
    font-size: 20px;
}

.petzio-dialog-message {
    font-size: 15px;
    line-height: 1.4;
    margin-bottom: 18px;
}

.petzio-dialog-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.petzio-dialog-btn {
    border: none;
    border-radius: 8px;
    padding: 8px 14px;
    font-size: 14px;
    cursor: pointer;
}

    .petzio-dialog-btn.cancel {
        background: #eee;
    }

    .petzio-dialog-btn.confirm {
        background: #ff7a18;
        color: white;
    }

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .petzio-dialog {
        background: #222;
        color: white;
    }

    .petzio-dialog-btn.cancel {
        background: #555;
        color: #ddd;
    }
}

/* --Petzio title styling-- */
.petzio-title {
    font-size: 32px;
    font-weight: 600;
    letter-spacing: 1px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

/* Paw container */
.paw-group {
    position: relative;
    width: 40px;
    height: 36px;
    opacity: 0;
    transition: opacity 1.2s ease-in;
}

    /* Fade-in trigger */
    .paw-group.visible {
        opacity: 1 !important;
    }

    /* Paw image styling (PNG) */
    .paw-group img {
        position: absolute;
        /* scale relative to title font size */
        width: 0.5em;
        height: 0.5em;
        object-fit: contain;
        opacity: 0.75;
        /* subtle UI polish */
        filter: grayscale(100%);
        pointer-events: none;
    }

/* Front paw */
.paw-front {
    left: 0;
    top: 3px;
    transform: rotate(-8deg);
}

/* Back paw */
.paw-back {
    left: 18px;
    top: 20px;
    transform: rotate(7deg);
}

/*-- Action btn theme --*/

.nav-action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    flex: 0 0 36px;
    border-radius: 50%;
    background: rgba(0,0,0,0.08);
    font-size: 18px;
    line-height: 1;
    text-decoration: none;
    user-select: none;
}

    .nav-action-btn:active {
        background: rgba(0,0,0,0.18);
    }

/* Navbar right container spacing */
.navbar-right {
    display: flex;
    align-items: center;
    height: 100%;
    gap: 8px; /* space between buttons */
    margin-right: 8px; /* space from screen edge */
}

/*----*/

/*  .page-content is inserted by Framework7
viewport
 → .view-main (100vh)
   → .page (100%)
     → .page-content (100%)
       → #topic-content (flex)
         → calendar
*/

.view-main {
    height: 100dvh; /*avoids Android/iOS address bar resize bugs*/
    display: flex;
    flex-direction: column; /* for completeness */
}

.page {
    display: flex;
    flex-direction: column; /* navbar + page-content stacked vertically */
    height: 100%; /* fill .view-main */
}


/*-- Navbar layout --*/

/* Adjust Framework7 navbar height - (56px default + 30px context banner)*/

:root {
    --f7-navbar-height: 86px;
    --f7-page-navbar-offset: var(--f7-navbar-height);
    --f7-safe-area-top: 0px;
}

.navbar-inner {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    height: auto;
}

/* Top row behaves like normal F7 navbar */

.navbar-inner-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    --f7-navbar-height: 56px; /* 🔥 override locally */
    overflow: hidden;
}

/* Context banner row */

.navbar-inner-bottom {
    height: 30px;
    display: flex;
    align-items: center;
    z-index: 20;
}

/*-- Banner container --*/

/* Context Banner Wrapper */
.context-banner-row {
    width: 100%;
    padding: 0 12px;
}

/* Context Banner */
.context-banner {
    display: flex;
    align-items: center;
    width: 100%; /* 🔹 ensures full width */
    font-size: 13px;
    gap: 6px;
    padding: 6px 10px;
    background: #f6f8fb;
    border-bottom: 1px solid #ddd;
    box-sizing: border-box; /* 🔹 prevents overflow issues */
}

    /* Chips (general) */
    .context-banner .item {
        display: inline-flex;
        align-items: center;
    }

/* Root Icons (📅 👨‍👩‍👦 ⚙️) */
.ctx-root {
    font-size: 17px;
    color: #0f62fe;
    cursor: pointer;
    opacity: 0.9;
}

    .ctx-root:active {
        transform: scale(0.95);
    }

/* Eye Toggle (👁️) */
#contextBanner .ctx-toggle-eye {
    /*margin-left: auto;*/ /* 🔹 pushes to far right */
    cursor: pointer;
    font-size: 16px;
    opacity: 0.6;
    transition: opacity 0.2s ease, transform 0.1s ease;
}

    #contextBanner .ctx-toggle-eye:hover {
        opacity: 1;
    }

    #contextBanner .ctx-toggle-eye:active {
        transform: scale(0.9);
    }

    /* Optional: dimmed state */
    #contextBanner .ctx-toggle-eye.off {
        opacity: 0.4;
    }

.ctx-left {
    display: flex;
    align-items: center;
    gap: 6px;
}

.ctx-right {
    margin-left: auto; /* ✅ THIS is the key */
    display: flex;
    align-items: center;
}

/* Separator (•) */
.sep {
    margin: 0 4px;
    color: #999;
    font-weight: 500;
}

/*-- Page content layout --*/

.page-content {
    position: absolute;
    top: 86px; /* start BELOW navbar */
    left: 0;
    right: 0;
    bottom: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding-top: 0 !important;
}

/* shell page topic content container */
/* Ensure topic content fills page-content */
#topic-content {
    display: flex;
    flex-direction: column;
    padding-bottom: 120px;
}

.panel {
    width: 250px;
}

    /* Push menu item text slightly right */
    .panel .list .item-title {
        padding-left: 12px; /* adjust as needed */
    }

.button-fit {
    width: auto;
    min-width: 0;
    padding: 0 10px;
    display: inline-flex;
}

/*--- Map page layout ---*/
.map-page {
    display: flex;
    flex-direction: column;
    flex: 1; /* fill #topic-content */
}

/* Top booking info bar */
.map-params {
    padding: 8px 12px;
    background: #1b1b1b;
    color: #eee;
    font-size: 14px;
    border-bottom: 1px solid #333;
}

/*-------*/

.packageText::placeholder {
    color: #999;
    opacity: 1; /* ensures consistent grey across browsers */
}

/*-- list highlight  --*/

.is-past {
    opacity: 0.6;
}

    .is-past .item-title {
        color: #999;
    }

.is-future .item-title {
    font-weight: 500;
}

/*--- Persistent Map Layer --- */

#map-layer {
    position: absolute;
    top: 86px; /* sit below navbar */
    left: 0;
    right: 0;
    bottom: 0;
    background: white;
    z-index: 50;
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform 0.3s ease;
}

    /* Visible state (slide in) */
    #map-layer.visible {
        transform: translateX(0);
    }


/*--- Booking info bar ---*/

#map-booking-info {
    padding: 8px 12px;
    background: #1b1b1b;
    color: #eee;
    font-size: 14px;
    border-bottom: 1px solid #333;
}


/*--- Map container ---*/

#map-container {
    flex: 1;
    min-height: 0;
    height: 100%; /* important for Leaflet */
}

/*--- Map marker tooltip ---*/

.custom-tooltip {
    border-radius: 8px;
    padding: 6px 10px;
    background: #333;
    color: #fff;
    border: none;
    box-shadow: 0 2px 6px rgba(0,0,0,0.25);
    font-size: 12px;
}

/*=== StreetView layer ===*/

#streetview-layer {
    position: absolute;
    top: 86px; /* align with map-layer */
    left: 0;
    right: 0;
    bottom: 0;
    background: black;
    z-index: 5000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
}

    /* visible state */
    #streetview-layer.visible {
        opacity: 1;
        pointer-events: auto;
    }

/*--- StreetView container ---*/

#streetview-container {
    width: 100%;
    height: 100%;
}

/*--- StreetView close button ---*/

#close-streetview {
    position: absolute;
    top: 10px;
    right: 80px;
    width: auto;
    background-color: #ff4d4d;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 6px 12px;
    cursor: pointer;
    z-index: 6000;
}

    #close-streetview:hover {
        background-color: #ff3333;
    }

/*-- F7 buttons force all inner elements to ignore pointer events --*/

.viewPetBtn *,
.viewDebriefBtn * {
    pointer-events: none;
}

/*--- Pet Photo ---*/

.photo-hero {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
}

/*.photo-hero-img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    filter: blur(1px) brightness(0.8);
}*/

.photo-placeholder {
    width: 100%;
    height: 200px; /* or whatever your pane height is */
    object-fit: contain;
    background: #f5f5f5; /* optional for empty space */
}

.photo-placeholder-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.photo-placeholder-text {
    color: white;
    font-size: 18px;
    opacity: 0.9;
}

.photo-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
}

.photo-tile {
    position: relative;
    border-radius: 10px;
    overflow: hidden;
}

.photo-img {
    width: 100%;
    height: 110px;
    object-fit: cover;
}

.photo-delete {
    position: absolute;
    top: 4px;
    right: 6px;
    background: rgba(0,0,0,0.5);
    color: white;
    font-size: 12px;
    padding: 2px 6px;
    border-radius: 6px;
}





