/* Silver/Grey modern theme - edit these variables to restyle quickly */
:root {
    --bg: #f6f7f9;
    --card: #ffffff;
    --muted: #6b7280;
    --text: #0f172a;
    --primary: #6b7280;
    --accent: #9ca3af;
    --radius: 10px;
    --container: 1100px;
    --shadow: 0 10px 30px rgba(2, 6, 23, 0.06);
}

/* Base */
* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;
    color: var(--text);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
}

.container {
    max-width: var(--container);
    margin: 0 auto;
    padding: 1rem;
}

/* Header */
.site-header {
    background: var(--card);
    border-bottom: 1px solid rgba(75, 85, 99, 0.06);
    box-shadow: var(--shadow);
}

.header-inner {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem 0;
}

.brand {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

.brand-title {
    font-weight: 700;
    font-size: 1.05rem;
}

.brand-sub {
    font-size: 0.85rem;
    color: var(--muted);
}

.top-nav {
    overflow: auto;
    width: 100%;
}

.top-nav a {
    float: right;
    color: var(--muted);
    text-decoration: none;
    /* Removes underlines from links */
    align-items: center;
    display: flex;
    /* Use flexbox for the link container */
    flex-direction: column;
    /* Stacks children (icon and text) vertically */
    padding-left: 3rem;
}

/* Style the icon */
.top-nav a img {
    height: 7rem;
    /* Adjust icon size */
    margin-bottom: 1.5rem;
    /* Adds space between the icon and the text */
}

/* Style the text */
.top-nav a span {
    font-size: 2.0rem;
    /* Adjust text size */
    font-weight: bolder;
    font-family: "Amatic SC", sans-serif;
    color: DarkSlateGrey;
}

.top-nav a:hover {
    filter: drop-shadow(7px 7px 0px rgb(227, 224, 210)) drop-shadow(0px 0px 1px darkslategray);
    /* Optional: add a smooth transition for the effect border(1px solid darkslategray) */
    transition: filter 0.3s ease-in-out;
}

@media screen and (max-width:500px) {
    .top-nav {
        float: none;
        display: block;
    }
}

/* Hero */
.card {
    background: var(--card);
    border-radius: var(--radius);
    padding: 1.25rem;
    margin: 1rem 0;
    box-shadow: var(--shadow);
}

.hero {
    text-align: center;
}

.hero h1 {
    margin: 0;
    color: var(--primary);
    font-size: 1.6rem;
}

.lead {
    color: var(--muted);
    margin-top: 0.4rem;
}

.btn-primary {
    font-size: 1em;
    background: var(--primary);
    color: #fff;
    padding: 0.6rem 0.9rem;
    border-radius: 6px;
    cursor: pointer;
    text-decoration: none;
    justify-content: center;
    /* Centers horizontally */
    align-items: center;
    /* Centers vertically */
}

.btn-primary:hover {
    background-color: #dfecec;
    color: darkslategray;
    border: 1px darkslategray;
}

.btn:not(.btn-primary):not(.btn-ghost):not(.btn-cancl):not(.btn-secondary) {
    background: yellowgreen;
    color: white;
    border-radius: 6px;
    padding: 0.6rem 0.9rem;
    cursor: pointer;
}

.btn-ghost {
    background: transparent;
    border: solid 1px darkslategray;
    font-size: 1em;
    padding: 0.6rem 0.9rem;
    border-radius: 6px;
}

.btn-ghost:hover {
    background-color: #dfecec;
    color: darkslategray;
    border: 1px darkslategray;
}

/* GOOGLE FONTS */
.amaRG {
    font-family: "Amatic SC", sans-serif;
    font-weight: 600;
    font-style: normal;
}

.amaBD {
    font-family: "Amatic SC", sans-serif;

    font-style: normal;
}

.poiret-one-regular {
    font-family: "Poiret One", sans-serif;
    font-weight: 400;
    font-style: normal;
}

.pompiere-regular {
    font-family: "Pompiere", sans-serif;
    font-weight: 400;
    font-style: normal;
}

.zen-kaku {
    font-family: "Zen Kaku Gothic New", sans-serif;
    font-weight: 600;
    font-style: normal;
}

.klee-one-regular {
    font-family: "Klee One", cursive;
    font-weight: 400;
    font-style: normal;
}

/* Layout */
.grid-2 {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.map-column {
    flex: 1;
}

.summary-column {
    width: 360px;
}

/* Map */
.map {
    height: 380px;
    border-radius: 8px;
    border: 1px solid rgba(75, 85, 99, 0.06);
    background: linear-gradient(180deg, #f8fafc, #fff);
}

/* Controls */
.controls {
    margin-top: 0.8rem;
}

.input {
    width: 100%;
    padding: 0.6rem;
    border-radius: 8px;
    border: 1px solid #e6e9ee;
    margin-bottom: 0.6rem;
}

/* Summary */
.summary-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.summary-list li {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    border-bottom: 1px dashed #f1f5f9;
}

.total-row {
    font-weight: 700;
    color: var(--primary);
    padding-top: 0.5rem;
}

/* Stops list */
.stops-list {
    margin-top: 0.75rem;
}

.stop {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem;
    background: #dfecec;
    border-radius: 6px;
    margin-bottom: 0.5rem;
}

/* Loading spinner for button */
.spinner {
    display: inline-block;
    width: 12px;
    height: 12px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
    margin-left: 8px;
}

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

/* Loading overlay for summary */
.loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 10;
    border-radius: var(--radius);
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 15px;
}

.loading-overlay p {
    color: var(--muted);
    font-size: 0.9rem;
    margin: 0;
}

/* Make summary column relative for positioning */
.summary-column {
    position: relative;
}

/* Vehicle */
.vehicle-grid {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.vehicle-photo img {
    width: 220px;
    border-radius: 8px;
    object-fit: cover;
}

/* Footer */
.site-footer {
    padding: 1rem 0;
    text-align: center;
    color: var(--muted);
}

/* Responsive */
@media (max-width:900px) {
    .grid-2 {
        flex-direction: column;
    }

    .summary-column {
        width: 100%;
    }

    .vehicle-grid {
        flex-direction: column;
    }
}

/* ========== CALENDAR STYLES - MINIMAL ========== */

.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 20px 0;
    padding: 15px;
    background: white;
    border-radius: 0px;
    border: 4px solid #0000;
}

.month-year {
    font-size: 2.5em;
    font-weight: bold;
    font-family: "Zen Kaku Gothic New", sans-serif;
    color: darkslategray;
    font-variant: small-caps;
}

.nav-btn {
    background: white;
    color: darkslategray;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 20px;
    align-items: center;
}

.nav-btn:hover {
    background: ghostwhite;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 8px;
    margin: 20px 0;
    min-height: 300px;
    background: #fff;
    padding: 15px;
    border-radius: 0px;
    border: 2px solid black;
}

.day-name {
    text-align: center;
    padding: 10px;
    color: darkslategray;
    background: #f8f9fa;
    border-radius: 8px;
    font-size: 1.5em;
    font-family: "Zen Kaku Gothic New", sans-serif;
    font-weight: 700;
    font-style: normal;
    font-variant: small-caps;
}

.day {
    text-align: center;
    padding: 15px 5px;
    background: white;
    border: 1.5px solid black;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1.5em;
    min-height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    font-family: "Zen Kaku Gothic New", sans-serif;
    font-weight: 600;
    font-style: normal
}

.day:hover:not(.booked):not(.past):not(.empty) {
    background: #dfecec;
    border-color: #2f4f4f;
}

.day.selected {
    background: darkslategray !important;
    color: white !important;
    border-color: darkslategray !important;
    font-weight: bold;
}

.day.booked {
    background: tomato;
    color: white;
    cursor: not-allowed;
    position: relative;
    opacity: 0.7;

}

.day.booked::after {
    content: "✗";
    position: absolute;
    top: 5px;
    right: 5px;
    font-size: 12px;
    font-weight: bold;
}

.day.past {
    background: #f8f9fa;
    color: darkslategray;
    cursor: not-allowed;
    border-color: gold;
}

.day.today {
    background: gold;
    border-color: gold;
    color: darkslategray;
    font-weight: bold;
}

.day.empty {
    background: transparent;
    border: none;
    cursor: default;
}

.selected-date-display {
    margin: 20px 0;
    padding: 15px;
    background: #ffffff;
    border-radius: 4px;
    border: 1px solid #dee2e6;
}

.selected-date-display p {
    margin: 0 0 10px 0;
    color: darkslategray;
    font-size: 1.5em;
    margin-block: 0.67em;
    font-variant: small-caps;
    font-weight: bold;
}

#selected-date-text {
    font-size: 1.1em;
    font-weight: bold;
    color: darkslategray;
    min-height: 1.2em;
    margin-block: 0.67em;
    font-family: "Zen Kaku Gothic New", sans-serif;
}

.action-buttons {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1em;
    font-weight: 600;
    flex: 1;
    font-family: "Zen Kaku Gothic New", sans-serif;
}

.btn-primary {
    background: darkslategray;
    color: white;
}

.btn-primary:hover:not(:disabled) {
    background: #dfecec;
    color: darkslatecolor;
}

.btn-primary:disabled {
    background: transparent;
    cursor: not-allowed;
    border-color: darkslategray;
    color: darkslategray;
    border: 1.5px solid
}

.btn-secondary {
    background: darkslategray;
    color: white;
}

.btn-secondary:hover {
    background: #dfecec;
    color: darkslategray;
}

.btn-cancl {
    background: #dfecec;
    border-color: darkslategray;
    color: darkslategray;
    border: 1.5px solid
}

.btn-cancl:hover {
    background: white;
    border-color: #dfecec;
    color: darkslategray;
    border: 1.5px solid
}

/* Test with system fonts first */
body,
button,
input,
select,
textarea {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI',
        Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

/* Optional: Add Open Sans via CDN for testing */
@import url('https://fonts.googleapis.com/css2?family=Open+Sans:wght@400;600;700&display=swap');

body.with-google-font {
    font-family: 'Open Sans', -apple-system, sans-serif;
}