﻿/* Garage page theme */
.garage-theme {
    --bs-body-color: #edf2fb;
    --bs-body-bg: #172232;
    --bs-secondary-color: #a9b6c9;
    --bs-border-color: #344256;
    background: #172232;
    color: #edf2fb;
}

    .garage-theme [hidden] {
        display: none !important;
    }

    .garage-theme > .container {
        max-width: 1440px;
    }

    .garage-theme .navbar {
        background: #101623 !important;
        border-color: #293448 !important;
    }

        .garage-theme .navbar-brand,
        .garage-theme .navbar .nav-link {
            color: #e5ecf8 !important;
        }

    .garage-theme .navbar-toggler {
        background: #d4ddec;
    }

    .garage-theme .footer {
        color: #a9b6c9 !important;
        border-color: #344256 !important;
    }

        .garage-theme .footer a {
            color: #a7bdff;
        }

/* Dashboard shell */
.garage-dashboard {
    margin: 24px auto 40px;
    padding: clamp(18px, 3vw, 32px);
    border: 1px solid #263247;
    border-radius: 24px;
    background: #0e1420;
    box-shadow: 0 24px 70px rgb(0 0 0 / 20%);
    overflow-wrap: anywhere;
}

.garage-heading {
    margin-bottom: 8px;
}

.garage-eyebrow,
.garage-label {
    display: block;
    margin-bottom: 8px;
    color: #a7bdff;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.13em;
}

.garage-heading h1 {
    margin-bottom: 8px;
    font-size: clamp(2rem, 4vw, 2.7rem);
    font-weight: 750;
    letter-spacing: -0.04em;
}

.garage-heading > p:last-child {
    margin-bottom: 0;
    color: #a9b6c9;
}

.garage-workspace {
    display: grid;
    grid-template-columns: 245px minmax(0, 1fr);
    align-items: start;
    gap: 24px;
}

.garage-content {
    display: grid;
    gap: 22px;
    min-width: 0;
}

/* Owner and management panel */
.garage-sidebar {
    display: grid;
    gap: 24px;
    min-width: 0;
    padding: 24px;
    border: 1px solid #345080;
    border-radius: 16px;
    background: linear-gradient(150deg, #1c2d43, #14202d);
    box-shadow: 0 0 25px rgb(46 91 255 / 7%);
}

.garage-member {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.garage-avatar {
    display: grid;
    place-items: center;
    flex: 0 0 46px;
    height: 46px;
    border: 1px solid #657fff;
    border-radius: 14px;
    background: #2949b7;
    color: white;
    font-size: 1.2rem;
    font-weight: 700;
}

.garage-member .garage-label {
    margin-bottom: 4px;
}

.garage-member h2 {
    margin: 0;
    font-size: 1rem;
    font-weight: 650;
}

.garage-membership,
.garage-visibility {
    padding-top: 20px;
    border-top: 1px solid #344256;
}

    .garage-membership p,
    .garage-visibility p {
        margin: 10px 0 0;
        color: #b9c5d5;
        font-size: 0.85rem;
        line-height: 1.6;
    }

.garage-slot {
    display: inline-block;
    margin-top: 12px;
    color: #c6d4ea;
    font-size: 0.8rem;
}

.garage-status {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 5px 11px;
    border: 1px solid #52627a;
    border-radius: 999px;
    background: #263449;
    color: #e2eaf7;
    font-size: 0.8rem;
    font-weight: 600;
}

    .garage-status::before {
        width: 6px;
        height: 6px;
        border-radius: 50%;
        background: #b4c1d7;
        content: "";
    }

    .garage-status.is-public {
        border-color: #287c68;
        background: #153c35;
        color: #a2ead0;
    }

        .garage-status.is-public::before {
            background: #78ddb6;
        }

.garage-actions {
    display: grid;
    gap: 10px;
}

/* Buttons */
.garage-theme .btn {
    min-height: 44px;
    padding: 10px 16px;
    border-radius: 9px;
    font-weight: 600;
}

.garage-theme .btn-primary {
    border-color: #365fff;
    background: #365fff;
    color: #fff;
}

    .garage-theme .btn-primary:hover {
        border-color: #5275ff;
        background: #5275ff;
    }

.garage-theme .btn-outline-primary {
    border-color: #607fe3;
    color: #c2d0ff;
}

    .garage-theme .btn-outline-primary:hover {
        border-color: #365fff;
        background: #365fff;
        color: white;
    }

.garage-theme .btn-outline-danger {
    border-color: #94576a;
    color: #ffb6c6;
}

    .garage-theme .btn-outline-danger:hover {
        background: #922d48;
        color: white;
    }

.garage-theme .btn-outline-secondary {
    border-color: #687991;
    color: #d4dfef;
}

    .garage-theme .btn-outline-secondary:hover {
        background: #344256;
        color: white;
    }

/* Vehicle panels */
.garage-panel {
    min-width: 0;
    border: 1px solid #2c394d;
    border-radius: 16px;
    background: #1c2838;
}

.garage-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) minmax(210px, 1fr);
    overflow: hidden;
}

.garage-hero-media {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 0;
    min-height: 310px;
    background: radial-gradient(ellipse at center, #304258, #172332);
}

    .garage-hero-media #vehiclePhotoContainer {
        width: 100%;
    }

    .garage-hero-media img {
        display: block;
        width: 100%;
        max-height: 420px;
        object-fit: contain;
    }

.garage-photo-placeholder {
    padding: 32px;
    text-align: center;
}

    .garage-photo-placeholder p {
        margin: 12px 0;
        font-size: 1.4rem;
        font-weight: 650;
    }

    .garage-photo-placeholder > span:last-child {
        color: #b9c5d5;
        font-size: 0.85rem;
    }

.garage-hero-details {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 28px;
    border-left: 1px solid #344256;
}

    .garage-hero-details h2 {
        margin: 4px 0 8px;
        font-size: clamp(1.6rem, 3vw, 2.2rem);
        font-weight: 700;
        letter-spacing: -0.03em;
    }

.garage-vehicle-name {
    margin-bottom: 24px;
    color: #b9c5d5;
}

.garage-identity {
    display: grid;
    gap: 15px;
    margin: 0;
}

.garage-dashboard dt {
    margin-bottom: 6px;
    color: #a9b6c9;
    font-size: 0.78rem;
    font-weight: 500;
}

.garage-dashboard dd {
    margin: 0;
    color: #edf2fb;
    font-size: 0.95rem;
    font-weight: 600;
}

/* Specifications and story cards */
.garage-specifications,
.garage-story {
    padding: 24px;
}

    .garage-specifications h2,
    .garage-story h2 {
        margin-bottom: 20px;
        font-size: 1.05rem;
        font-weight: 650;
    }

.garage-spec-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 22px;
    margin: 0;
}

.garage-story-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
}

.garage-story {
    border-top: 2px solid #496ce5;
}

    .garage-story .garage-eyebrow {
        font-size: 0.62rem;
    }

    .garage-story p {
        margin: 0;
        color: #c6d1e0;
        font-size: 0.9rem;
        line-height: 1.8;
        white-space: pre-wrap;
    }

.garage-empty {
    padding: clamp(28px, 5vw, 64px);
}

    .garage-empty h2 {
        margin: 16px 0;
        font-size: clamp(1.6rem, 4vw, 2.2rem);
    }

    .garage-empty p {
        max-width: 480px;
        margin-bottom: 24px;
        color: #b9c5d5;
        line-height: 1.8;
    }

/* Garage modals */
.garage-theme .modal-content {
    border: 1px solid #455775;
    border-radius: 16px;
    background: #172332;
    color: #edf2fb;
    box-shadow: 0 24px 80px rgb(0 0 0 / 40%);
}

.garage-theme .modal-header,
.garage-theme .modal-footer {
    border-color: #344256;
}

.garage-theme .modal-body {
    padding: 24px;
}

    .garage-theme .modal-body fieldset {
        padding-bottom: 24px;
        border-bottom: 1px solid #344256;
    }

.garage-theme .form-control {
    border-color: #4b5c74;
    background: #101b2b;
    color: #edf2fb;
}

    .garage-theme .form-control::placeholder {
        color: #93a3ba;
    }

    .garage-theme .form-control:focus {
        border-color: #7c98ff;
        background: #101b2b;
        color: white;
        box-shadow: 0 0 0 3px rgb(91 127 255 / 25%);
    }

.garage-theme .form-text,
.garage-theme .text-body-secondary {
    color: #a9b6c9 !important;
}

.garage-theme .text-danger {
    color: #ffb2c1 !important;
}

.garage-theme .btn-close {
    filter: invert(1) grayscale(100%) brightness(200%);
}

/* Tablet */
@media (max-width: 1100px) {
    .garage-hero {
        grid-template-columns: 1fr;
    }

    .garage-hero-details {
        border-top: 1px solid #344256;
        border-left: 0;
    }

    .garage-spec-grid,
    .garage-story-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 991.98px) {
    .garage-workspace {
        grid-template-columns: 1fr;
    }

    .garage-sidebar {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .garage-actions {
        grid-column: 1 / -1;
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

/* Phone */
@media (max-width: 575.98px) {
    .garage-dashboard {
        margin-top: 12px;
        padding: 16px;
        border-radius: 18px;
    }

    .garage-workspace,
    .garage-content {
        gap: 16px;
    }

    .garage-sidebar,
    .garage-hero-details,
    .garage-specifications,
    .garage-story {
        padding: 20px;
    }

    .garage-sidebar,
    .garage-actions,
    .garage-story-grid {
        grid-template-columns: 1fr;
    }

    .garage-hero-media {
        min-height: 220px;
    }

    .garage-spec-grid {
        gap: 22px 16px;
    }

    .garage-theme .modal-footer .btn {
        flex: 1;
    }
}

.garage-theme .form-select {
    color-scheme: dark;
    border-color: #4b5c74;
    background-color: #101b2b;
    color: #edf2fb;
    --bs-form-select-bg-img: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%23b9c5d5' viewBox='0 0 16 16'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3E%3C/svg%3E");
}

    .garage-theme .form-select:focus {
        border-color: #7c98ff;
        box-shadow: 0 0 0 3px rgb(91 127 255 / 25%);
    }

.garage-brand-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 16px;
}

    .garage-brand-row .garage-eyebrow {
        margin-bottom: 0;
    }

.garage-brand-logo {
    display: block;
    flex: 0 0 auto;
    width: 160px;
    height: 115px;
    object-fit: contain;
}

@media (max-width: 575.98px) {
    .garage-brand-logo {
        width: 120px;
        height: 90px;
    }
}

/* Responsive garage management panel */
.garage-sidebar {
    display: block;
}

.garage-sidebar-summary {
    position: relative;
    display: grid;
    gap: 24px;
}

.garage-sidebar-toggle {
    display: none;
}

.garage-controls-inner {
    display: grid;
    gap: 20px;
    padding-top: 24px;
}

@media (min-width: 992px) {
    #garageManagement {
        height: auto !important;
        overflow: visible;
    }
}

@media (max-width: 991.98px) {
    .garage-sidebar-summary {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        align-items: center;
        gap: 20px;
        padding-right: 44px;
    }

        .garage-sidebar-summary .garage-membership {
            padding-top: 0;
            border-top: 0;
        }

            .garage-sidebar-summary .garage-membership p {
                margin-top: 6px;
            }

        .garage-sidebar-summary .garage-slot {
            margin-top: 6px;
        }

    .garage-sidebar-toggle {
        position: absolute;
        inset: 0;
        display: block;
        width: 100%;
        min-height: 44px;
        padding: 0;
        border: 0;
        border-radius: 8px;
        background: transparent;
        color: #c2d0ff;
        cursor: pointer;
    }

        .garage-sidebar-toggle:focus-visible {
            outline: 2px solid #8ca6ff;
            outline-offset: 6px;
        }

    .garage-sidebar-chevron {
        position: absolute;
        top: 50%;
        right: 6px;
        width: 11px;
        height: 11px;
        border-right: 2px solid currentColor;
        border-bottom: 2px solid currentColor;
        transform: translateY(-70%) rotate(45deg);
        transition: transform 0.2s ease;
    }

    .garage-sidebar-toggle[aria-expanded="true"]
    .garage-sidebar-chevron {
        transform: translateY(-20%) rotate(225deg);
    }

    .garage-controls-inner {
        margin-top: 20px;
        border-top: 1px solid #344256;
    }

        .garage-controls-inner .garage-visibility {
            padding-top: 0;
            border-top: 0;
        }
}

@media (max-width: 575.98px) {
    .garage-sidebar-summary {
        grid-template-columns: minmax(0, 1fr);
        gap: 14px;
    }

        .garage-sidebar-summary .garage-membership {
            display: flex;
            flex-wrap: wrap;
            align-items: center;
            gap: 6px 12px;
        }

            .garage-sidebar-summary .garage-membership .garage-label,
            .garage-sidebar-summary .garage-slot {
                margin: 0;
            }

            .garage-sidebar-summary .garage-membership p {
                display: none;
            }
}

@media (prefers-reduced-motion: reduce) {
    .garage-sidebar-chevron {
        transition: none;
    }
}

.garage-brand-row {
    align-items: flex-start;
    margin-bottom: 24px;
}

.garage-vehicle-heading {
    flex: 1;
    min-width: 0;
}

    .garage-vehicle-heading h2 {
        margin: 0 0 8px;
    }

    .garage-vehicle-heading .garage-eyebrow {
        margin: 0 0 6px;
    }

    .garage-vehicle-heading .garage-vehicle-name {
        margin: 0;
    }

/* Vehicle heading above the photo at every screen size */
.garage-hero {
    display: flex;
    flex-direction: column;
}

.garage-hero-details {
    padding: 24px 28px;
    border: 0;
}

.garage-hero .garage-brand-row {
    margin-bottom: 0;
}

.garage-hero-media {
    min-height: 0;
    border-top: 1px solid #344256;
}

    .garage-hero-media img {
        max-height: 620px;
    }

.garage-photo-placeholder {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 240px;
}

/* Specifications strip */
.garage-specifications .garage-spec-title {
    margin: 0 0 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid #d65368;
    font-size: clamp(1rem, 2vw, 1.3rem);
    font-weight: 750;
    line-height: 1.4;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.garage-specifications .garage-spec-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 20px;
}

.garage-spec-grid > div {
    min-width: 0;
    padding-left: 12px;
    border-left: 1px solid #4b5c74;
}

.garage-specifications dt {
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.garage-specifications dd {
    font-size: 0.9rem;
    line-height: 1.5;
}

@media (max-width: 1100px) {
    .garage-specifications .garage-spec-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 575.98px) {
    .garage-hero-details {
        padding: 20px;
    }

    .garage-specifications .garage-spec-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 20px 14px;
    }
}

/* Header garage dropdown */
.garage-heading-top {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 16px;
    margin-bottom: 12px;
}

    .garage-heading-top h1 {
        margin: 0;
    }

.garage-workspace {
    display: block;
}

.garage-menu-toggle {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 4px;
    width: 190px;
    min-height: 64px;
    padding: 12px 36px 12px 16px;
    border: 1px solid #45618d;
    border-radius: 12px;
    background: #1b2b40;
    color: #edf2fb;
    text-align: left;
    cursor: pointer;
}

    .garage-menu-toggle:hover,
    .garage-menu-toggle[aria-expanded="true"] {
        border-color: #829cff;
        background: #22364e;
    }

    .garage-menu-toggle:focus-visible {
        outline: 2px solid #a7bdff;
        outline-offset: 3px;
    }

    .garage-menu-toggle::after {
        position: absolute;
        top: 50%;
        right: 15px;
        margin: 0;
    }

.garage-menu-owner {
    display: block;
    max-width: 100%;
    overflow: hidden;
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.garage-menu-summary {
    color: #b9c5d5;
    font-size: 0.75rem;
}

.garage-menu-panel {
    width: min(300px, calc(100vw - 40px));
    max-height: 70vh;
    margin-top: 8px !important;
    padding: 18px;
    overflow-y: auto;
    border: 1px solid #45618d;
    border-radius: 14px;
    background: #172332;
    color: #edf2fb;
    box-shadow: 0 18px 45px rgb(0 0 0 / 35%);
}

.garage-menu-allowance {
    margin-bottom: 16px;
    color: #b9c5d5;
    font-size: 0.8rem;
}

.garage-menu-visibility {
    margin-bottom: 18px;
    padding: 16px 0;
    border-top: 1px solid #344256;
    border-bottom: 1px solid #344256;
}

    .garage-menu-visibility p {
        margin: 10px 0 0;
        color: #b9c5d5;
        font-size: 0.8rem;
        line-height: 1.6;
    }

.garage-menu-actions {
    display: grid;
    gap: 10px;
}

    .garage-menu-actions .dropdown-item {
        min-height: 44px;
        padding: 11px 14px;
        border: 1px solid #506483;
        border-radius: 8px;
        background: transparent;
        color: #edf2fb;
        font-weight: 600;
        text-align: center;
        white-space: normal;
    }

        .garage-menu-actions .dropdown-item:hover,
        .garage-menu-actions .dropdown-item:focus {
            background: #2b4160;
            color: white;
        }

    .garage-menu-actions .garage-menu-primary {
        border-color: #365fff;
        background: #365fff;
    }

    .garage-menu-actions .garage-menu-delete {
        border-color: #94576a;
        color: #ffb6c6;
    }

@media (max-width: 575.98px) {
    .garage-heading-top {
        gap: 10px;
    }

        .garage-heading-top h1 {
            font-size: 1.6rem;
        }

    .garage-menu-toggle {
        width: 140px;
        padding-left: 12px;
        padding-right: 28px;
    }

        .garage-menu-toggle::after {
            right: 10px;
        }

    .garage-menu-summary {
        font-size: 0.68rem;
    }
}

.garage-menu .garage-menu-toggle {
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    min-height: 48px;
    padding: 0;
    border-radius: 12px;
}

.garage-menu-icon {
    display: grid;
    gap: 5px;
    width: 20px;
}

    .garage-menu-icon span {
        display: block;
        height: 2px;
        border-radius: 2px;
        background: currentColor;
    }

.garage-specifications dt {
    display: flex;
    align-items: center;
    gap: 9px;
    min-height: 26px;
    margin-bottom: 10px;
}

.garage-spec-icon {
    display: block;
    flex: 0 0 22px;
    width: 22px;
    height: 22px;
    fill: none;
    stroke: #a7bdff;
    stroke-width: 1.6;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.garage-hero-media {
    display: block;
    overflow: hidden;
}

    .garage-hero-media #vehiclePhotoContainer {
        width: 100%;
        aspect-ratio: 4 / 3;
    }

    .garage-hero-media #vehiclePhotoImage {
        display: block;
        width: 100%;
        height: 100%;
        max-height: none;
        object-fit: cover;
        object-position: center;
    }

.garage-dashboard .garage-panel {
    border: 1px solid #6085e8;
    box-shadow: 0 0 0 1px rgb(74 112 230 / 12%), 0 0 20px rgb(54 95 255 / 12%);
}

/* Give story cards the same border on every side. */
.garage-dashboard .garage-story {
    border-top-width: 1px;
}

.garage-hero-details {
    background: radial-gradient( ellipse at top right, rgb(70 110 220 / 16%), transparent 65% ), #1c2838;
}

.garage-hero-media {
    position: relative;
    border-top: 0;
}

    .garage-hero-media::before {
        content: "";
        position: absolute;
        inset: 0 0 auto;
        height: clamp(60px, 10vw, 110px);
        background: linear-gradient( to bottom, #1c2838 0%, rgb(28 40 56 / 65%) 35%, transparent 100% );
        pointer-events: none;
        z-index: 1;
    }

    /* Remove the photo fade. */
    .garage-hero-media::before {
        display: none;
    }

/* Define the transition with a subtle blue accent. */
.garage-hero-media {
    border-top: 2px solid #6085e8;
}

/* Gallery controls stay inside the existing image area. */
#vehiclePhotoContainer {
    position: relative;
    overflow: hidden;
}

.garage-gallery-arrow {
    position: absolute;
    top: 50%;
    z-index: 2;
    display: grid;
    place-items: center;
    width: 44px;
    height: 52px;
    padding: 0;
    border: 1px solid rgb(255 255 255 / 40%);
    border-radius: 10px;
    background: rgb(14 20 32 / 75%);
    color: white;
    font-size: 36px;
    line-height: 1;
    transform: translateY(-50%);
    cursor: pointer;
}

.garage-gallery-previous {
    left: 14px;
}

.garage-gallery-next {
    right: 14px;
}

.garage-gallery-counter {
    position: absolute;
    top: 14px;
    right: 14px;
    z-index: 2;
    padding: 6px 11px;
    border-radius: 999px;
    background: rgb(14 20 32 / 80%);
    color: white;
    font-size: 0.75rem;
}

.garage-gallery-thumbnails {
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 2;
    display: flex;
    gap: 10px;
    padding: 18px 14px 14px;
    overflow-x: auto;
    background: linear-gradient( transparent, rgb(14 20 32 / 85%) );
    scrollbar-width: thin;
    scrollbar-color: #6085e8 transparent;
}

.garage-gallery-thumb {
    flex: 0 0 76px;
    width: 76px;
    height: 57px;
    padding: 0;
    overflow: hidden;
    border: 2px solid rgb(255 255 255 / 45%);
    border-radius: 7px;
    background: #172332;
    cursor: pointer;
}

    .garage-gallery-thumb img {
        display: block;
        width: 100%;
        height: 100%;
        max-height: none;
        object-fit: cover;
    }

    .garage-gallery-thumb.is-active {
        border-color: #9eb7ff;
        box-shadow: 0 0 0 2px #365fff;
    }

    .garage-gallery-arrow:focus-visible,
    .garage-gallery-thumb:focus-visible {
        outline: 2px solid white;
        outline-offset: 3px;
    }

@media (max-width: 575.98px) {
    .garage-gallery-thumb {
        flex-basis: 56px;
        width: 56px;
        height: 42px;
    }

    .garage-gallery-thumbnails {
        gap: 8px;
        padding: 14px 10px 10px;
    }

    .garage-gallery-previous {
        left: 8px;
    }

    .garage-gallery-next {
        right: 8px;
    }
}

.garage-gallery-tools {
    position: absolute;
    top: 14px;
    right: 80px;
    left: 14px;
    z-index: 2;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

    .garage-gallery-tools form {
        margin: 0;
    }

.garage-gallery-tool {
    min-height: 44px;
    padding: 8px 12px;
    border: 1px solid #8ca6df;
    border-radius: 8px;
    background: rgb(14 20 32 / 90%);
    color: #edf2fb;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
}

.garage-gallery-tool-danger {
    border-color: #cb8293;
    color: #ffc0ce;
}

.garage-gallery-tool:hover:not(:disabled) {
    background: #294369;
}

.garage-gallery-tool:focus-visible {
    outline: 2px solid white;
    outline-offset: 3px;
}

.garage-gallery-tool:disabled {
    opacity: 0.65;
    cursor: default;
}

@media (max-width: 575.98px) {
    .garage-gallery-tools {
        top: 10px;
        left: 10px;
        gap: 6px;
    }

    .garage-gallery-tool {
        padding: 8px 10px;
        font-size: 0.72rem;
    }
}

@media (min-width: 576px) and (max-width: 1100px) {
    .garage-story-grid > .garage-story:last-child {
        grid-column: 1 / -1;
    }
}

/* Categorised modifications */
.garage-modifications {
    padding: 24px;
}

.garage-modifications-heading {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 22px;
}

    .garage-modifications-heading h2 {
        margin: 0;
        font-size: 1.2rem;
        font-weight: 700;
    }

.garage-mod-count,
.garage-mod-category-count {
    padding: 5px 10px;
    border: 1px solid #496180;
    border-radius: 999px;
    background: #142132;
    color: #c2d0e6;
    font-size: 0.75rem;
}

.garage-modifications-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.garage-mod-group {
    --mod-accent: #a7b8d4;
    min-width: 0;
    padding: 18px;
    border: 1px solid #3b4d65;
    border-top: 3px solid var(--mod-accent);
    border-radius: 12px;
    background: #132031;
}

    .garage-mod-group[data-category="1"] {
        --mod-accent: #bea4ff;
    }

    .garage-mod-group[data-category="2"] {
        --mod-accent: #7adbc5;
    }

    .garage-mod-group[data-category="3"] {
        --mod-accent: #ffbd7a;
    }

    .garage-mod-group[data-category="4"] {
        --mod-accent: #ffa2b8;
    }

.garage-mod-group-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 18px;
}

    .garage-mod-group-heading h3 {
        margin: 0;
        color: var(--mod-accent);
        font-size: 0.95rem;
        font-weight: 650;
    }

.garage-mod-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

    .garage-mod-list li {
        padding: 14px 0;
        border-bottom: 1px solid #2d3e54;
    }

        .garage-mod-list li:first-child {
            padding-top: 0;
        }

        .garage-mod-list li:last-child {
            padding-bottom: 0;
            border-bottom: 0;
        }

    .garage-mod-list h4 {
        margin: 0;
        color: #edf2fb;
        font-size: 0.95rem;
        font-weight: 600;
    }

    .garage-mod-list p {
        margin: 8px 0 0;
        color: #b9c5d5;
        font-size: 0.85rem;
        line-height: 1.7;
        white-space: pre-wrap;
    }

.garage-mod-empty {
    margin: 0;
    color: #b9c5d5;
}

/* Two remaining story cards */
.garage-story-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

    .garage-story-grid > .garage-story:last-child {
        grid-column: auto;
    }

@media (max-width: 575.98px) {
    .garage-modifications {
        padding: 20px;
    }

    .garage-modifications-grid,
    .garage-story-grid {
        grid-template-columns: 1fr;
    }
}

.garage-mod-entry-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
}

    .garage-mod-entry-heading h4 {
        flex: 1;
        min-width: 0;
        padding-top: 10px;
    }

.garage-mod-edit {
    flex-shrink: 0;
    min-height: 44px;
    padding: 8px 12px;
    border: 1px solid #617ba4;
    border-radius: 8px;
    background: #1c2e46;
    color: #c5d5ff;
    font-size: 0.8rem;
    font-weight: 600;
}

    .garage-mod-edit:hover {
        background: #294369;
    }

    .garage-mod-edit:focus-visible {
        outline: 2px solid #a7bdff;
        outline-offset: 3px;
    }

    .garage-mod-edit.garage-mod-edit-icon {
        display: grid;
        place-items: center;
        width: 44px;
        height: 44px;
        padding: 0;
    }

.garage-mod-edit-icon svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
}

@media (max-width: 575.98px) {
    #modificationModal .modal-footer {
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
        padding: 14px;
    }

        #modificationModal .modal-footer .btn {
            flex: 1 1 0;
            min-width: 0;
            min-height: 46px;
            margin: 0 !important;
            white-space: nowrap;
        }

    #modificationModal #modificationSubmit,
    #modificationModal #modificationConfirmRemove {
        order: -1;
        flex: 0 0 100%;
        width: 100%;
    }
}

/* Bare pencil icon */
.garage-mod-edit.garage-mod-edit-icon {
    border: 0;
    background: transparent;
    color: #92a6c4;
    box-shadow: none;
    cursor: pointer;
    transition: color 0.15s ease;
}

    .garage-mod-edit.garage-mod-edit-icon:hover,
    .garage-mod-edit.garage-mod-edit-icon:focus-visible {
        background: transparent;
        color: #c3d5ff;
    }

.garage-mod-edit-icon svg {
    transition: filter 0.15s ease;
}

.garage-mod-edit-icon:hover svg,
.garage-mod-edit-icon:focus-visible svg {
    filter: drop-shadow(0 0 5px rgb(110 150 255 / 70%));
}

@media (prefers-reduced-motion: reduce) {
    .garage-mod-edit.garage-mod-edit-icon,
    .garage-mod-edit-icon svg {
        transition: none;
    }
}

.garage-mod-group-heading h3 {
    display: flex;
    align-items: center;
    gap: 10px;
}

.garage-mod-category-icon {
    display: block;
    flex: 0 0 23px;
    width: 23px;
    height: 23px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.6;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.garage-add-button {
    display: grid;
    place-items: center;
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 1px solid #354964;
    border-radius: 12px;
    background: #172232;
    color: #a7bdff;
    transition: color 150ms, background 150ms;
}

    .garage-add-button svg {
        width: 22px;
        height: 22px;
        fill: none;
        stroke: currentColor;
        stroke-width: 2;
        stroke-linecap: round;
    }

    .garage-add-button:hover {
        background: #24385b;
        color: #fff;
    }

    .garage-add-button:focus-visible {
        outline: 2px solid #a7bdff;
        outline-offset: 3px;
    }

.garage-build-picker {
    max-width: 520px;
    margin-bottom: 24px;
}

    .garage-build-picker .form-select {
        min-width: 0;
        flex: 1;
    }

[data-business-results] .list-group-item {
    background: #101c2b;
    border-color: #354964;
    color: #c8d5e9;
    text-align: left;
}

    [data-business-results] .list-group-item:hover,
    [data-business-results] .list-group-item:focus-visible {
        background: #1b2d50;
        color: #fff;
    }

[data-business-results] small {
    color: #9cacc3;
}

.garage-mod-list p.garage-mod-credit {
    margin: 6px 0 0;
    color: #9cacc3;
    font-size: 0.8rem;
    line-height: 1.5;
    white-space: normal;
    text-align: left;
}

.garage-mod-credit a {
    color: #a7bdff;
    font-weight: 600;
    text-decoration: none;
}

    .garage-mod-credit a:hover {
        color: #fff;
        text-decoration: underline;
    }

    .garage-mod-credit a:focus-visible {
        outline: 2px solid #a7bdff;
        outline-offset: 3px;
    }

.garage-gallery-arrow {
    width: 44px;
    height: 44px;
}

    .garage-gallery-arrow > span {
        display: block;
        width: 10px;
        height: 10px;
        border-top: 2px solid currentColor;
        border-right: 2px solid currentColor;
        font-size: 0;
        line-height: 0;
    }

.garage-gallery-previous > span {
    transform: rotate(-135deg);
}

.garage-gallery-next > span {
    transform: rotate(45deg);
}