/* Garage client - Moto And Co - classes préfixées .mc-garage pour éviter tout conflit avec le thème */

#mc-garage {
    margin-bottom: 30px;
}

.mc-garage-vehicles {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 25px;
}

.mc-garage-vehicle-card {
    flex: 1 1 260px;
    max-width: 320px;
    border: 1px solid #e5e5e5;
    border-radius: 4px;
    padding: 15px;
    background: #fff;
}

.mc-garage-vehicle-card--active {
    border-color: #2c9e3f;
    box-shadow: 0 0 0 1px #2c9e3f;
}

.mc-garage-vehicle-card__label {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px;
    font-weight: 600;
    font-size: 15px;
    margin-bottom: 6px;
}

.mc-garage-rename-toggle {
    background: none;
    border: none;
    padding: 2px 4px;
    cursor: pointer;
    color: #999;
    font-size: 12px;
}

.mc-garage-rename-toggle:hover {
    color: #333;
}

.mc-garage-rename-form {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    width: 100%;
    margin-top: 4px;
}

.mc-garage-rename-form[hidden] {
    display: none;
}

.mc-garage-rename-input {
    flex: 1 1 140px;
    min-width: 140px;
    padding: 5px 8px;
    font-size: 13px;
    font-weight: 400;
    border: 1px solid #ccc;
    border-radius: 3px;
    box-sizing: border-box;
}

.mc-garage-badge {
    display: inline-block;
    margin-left: 6px;
    padding: 2px 8px;
    font-size: 11px;
    font-weight: 600;
    color: #fff;
    background: #2c9e3f;
    border-radius: 10px;
    vertical-align: middle;
}

.mc-garage-vehicle-card__details {
    color: #999;
    font-size: 11px;
    line-height: 1.5;
    margin-bottom: 8px;
}


.mc-garage-vehicle-card__note {
    margin-bottom: 8px;
}

.mc-garage-vehicle-card__note-text {
    display: inline-block;
    color: #666;
    font-size: 12px;
    line-height: 1.4;
    word-break: break-word;
}

.mc-garage-vehicle-card__note-text i {
    color: #999;
    margin-right: 3px;
}

.mc-garage-vehicle-card__note-empty {
    color: #aaa;
    font-style: italic;
}

.mc-garage-note-toggle {
    background: none;
    border: none;
    padding: 2px 4px;
    cursor: pointer;
    color: #999;
    font-size: 12px;
    vertical-align: top;
}

.mc-garage-note-toggle:hover {
    color: #333;
}

.mc-garage-note-form {
    margin-top: 4px;
}

.mc-garage-note-form[hidden] {
    display: none;
}

.mc-garage-note-input {
    width: 100%;
    min-height: 56px;
    padding: 6px 8px;
    font-size: 12px;
    font-family: inherit;
    border: 1px solid #ccc;
    border-radius: 3px;
    box-sizing: border-box;
    resize: vertical;
}

.mc-garage-note-form__actions {
    display: flex;
    gap: 6px;
    margin-top: 4px;
}

.mc-garage-vehicle-card__count {
    color: #777;
    font-size: 13px;
    margin-bottom: 10px;
}

.mc-garage-vehicle-card__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
}

.mc-garage-inline-form {
    display: inline-block;
    margin: 0;
}

.mc-garage-delete {
    color: #c0392b;
}

.mc-garage-page-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 10px;
}

.mc-garage-page-header .page-heading {
    margin: 0;
    flex: 1 1 auto;
}

.mc-garage-add-toggle {
    flex: 0 0 auto;
    background-color: #FDD594 !important;
    border-color: #FDD594 !important;
    color: #000 !important;
}

.mc-garage-add-toggle:hover,
.mc-garage-add-toggle:focus,
.mc-garage-add-toggle:active {
    background-color: #FDD594 !important;
    border-color: #FDD594 !important;
    color: #000 !important;
    filter: brightness(0.93);
}

.mc-garage-add-toggle i {
    margin-right: 6px;
}

.mc-garage-add {
    margin-bottom: 20px;
}

#mc-garage-add-wrap {
    padding: 15px;
    background: #f9f9f9;
    border: 1px solid #eee;
    border-radius: 4px;
}

.mc-garage-add__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}

.mc-garage-add__header h3 {
    margin: 0;
}

.mc-garage-add__row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 15px;
}

.mc-garage-add__row select {
    min-width: 160px;
}

.mc-garage-cascade-select {
    min-width: 190px;
    padding: 8px 10px;
    font-size: 15px;
    line-height: 1.4;
    height: auto;
}

/* Champs courts (id_ukoocompat_filter dans ukoocompat) : réduits pour garder tout le formulaire
   d'ajout sur une seule ligne. */
.mc-garage-add__row > div:first-child {
    /* Type */
    width: 120px;
    min-width: 120px;
}

.mc-garage-add__row > select[data-id-filter="5"] {
    /* Année */
    width: 110px;
    min-width: 110px;
}

.mc-garage-add__row > select[data-id-filter="3"] {
    /* Cylindrée */
    width: 130px;
    min-width: 130px;
}


/* jquery-customselect remplace le <select> par un <div class="custom-select"> une fois activé
   (recherche texte incluse). Son CSS d'origine met "width:100%" sur ce wrapper et une largeur fixe
   de 300px sur son bouton/panneau : chaque champ prenait donc toute la ligne. On reprend la main
   sur la largeur (en largeur fixe, pas %, pour ne pas dépendre du contenu) pour que les 5 champs
   du formulaire d'ajout tiennent sur une seule ligne, avec les mêmes tailles que sur le <select>
   natif d'origine ("un peu plus grandes", Type/Année réduits). */
.mc-garage-add__row .custom-select {
    box-sizing: border-box;
    width: 190px;
    height: 42px;
}

.mc-garage-add__row .custom-select:has(select[data-id-filter="1"]) {
    /* Type */
    width: 120px;
}

.mc-garage-add__row .custom-select:has(select[data-id-filter="5"]) {
    /* Année */
    width: 110px;
}

.mc-garage-add__row .custom-select:has(select[data-id-filter="3"]) {
    /* Cylindrée */
    width: 130px;
}

.mc-garage-add__row .custom-select a {
    box-sizing: border-box;
    width: 100%;
    height: auto;
    padding: 10px 12px;
    line-height: 1.4;
}

.mc-garage-add__row .custom-select a span {
    font-size: 15px;
}

.mc-garage-add__row .custom-select-open div {
    box-sizing: border-box;
    width: auto;
    min-width: 220px;
}

.mc-garage-quickswitch__form {
    display: inline-block;
    margin-right: 10px;
}

.mc-garage-quickswitch__select {
    max-width: 180px;
}

/* -- Widget "Mon garage" dans le header (hook displayTop, à côté du bloc panier) -- */

.mc-garage-headerbox {
    position: relative;
    display: inline-block;
    vertical-align: middle;
    margin-right: 10px;
    margin-top: 16px;
}

.mc-garage-header-trigger {
    position: relative;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    background: #fff;
    border: none;
    border-radius: 6px;
    padding: 6px 10px;
    cursor: pointer;
    font-size: 12px;
    color: #141414;
    text-decoration: none;
    transition: background-color .12s ease, color .12s ease, box-shadow .2s;
}

.mc-garage-header-trigger:hover,
.mc-garage-header-trigger:focus {
    text-decoration: none;
}

/* Même traitement au survol que .shopping_cart (blockcart.css) pour rester cohérent avec le panier */
.mc-garage-header-trigger:hover {
    background: #f2f7f3;
    color: #0f8f42;
}

.mc-garage-header-trigger:hover i {
    color: #0f8f42;
}

.mc-garage-beta-badge {
    position: absolute;
    top: -2px;
    right: 0;
    background: #e8a33d;
    color: #fff;
    font-size: 8px;
    font-weight: 700;
    letter-spacing: .3px;
    text-transform: uppercase;
    padding: 1px 5px;
    border-radius: 8px;
    line-height: 1.4;
    white-space: nowrap;
}

.mc-garage-header-trigger i {
    display: block;
    width: 22px;
    height: 22px;
    font-size: 22px;
    line-height: 22px;
    color: #707070;
}

.mc-garage-header-trigger--new {
    animation: mc-garage-header-glow 1.6s ease-in-out 3;
}

.mc-garage-header-label {
    display: block;
    max-width: 100px;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mc-garage-header-panel {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 6px;
    width: 260px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, .12);
    padding: 12px;
    z-index: 200;
    box-sizing: border-box;
}

.mc-garage-header-panel[hidden] {
    display: none;
}

.mc-garage-header-panel__title {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .3px;
    color: #999;
    margin: 0 0 8px;
}

.mc-garage-header-panel__list {
    list-style: none;
    margin: 0 0 10px;
    padding: 0;
}

.mc-garage-header-panel__list li {
    margin-bottom: 2px;
}

.mc-garage-header-panel__vehicle-link {
    display: block;
    width: 100%;
    box-sizing: border-box;
    text-align: left;
    padding: 7px 8px;
    border-radius: 3px;
    font-size: 13px;
    font-family: inherit;
    color: #333;
    text-decoration: none;
    background: none;
    border: none;
    margin: 0;
    cursor: pointer;
}

.mc-garage-header-panel__vehicle-link:hover,
.mc-garage-header-panel__vehicle-link:focus {
    background: #f5f5f5;
    color: #333;
    text-decoration: none;
}

.mc-garage-header-panel__vehicle-link--active {
    color: #2c9e3f;
    font-weight: 600;
}

.mc-garage-header-panel__vehicle-link i {
    margin-right: 4px;
}

.mc-garage-header-panel__empty {
    font-size: 13px;
    color: #777;
    margin: 0 0 10px;
}

.mc-garage-header-panel__manage {
    display: block;
    text-align: center;
    padding: 8px;
    background: #FDD594;
    color: #000;
    border-radius: 3px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
}

/* Bulle de découverte, affichée une seule fois (page suivant une connexion) */

.mc-garage-discovery {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 6px;
    width: 240px;
    box-sizing: border-box;
    background: #333;
    color: #fff;
    padding: 14px 30px 14px 14px;
    border-radius: 6px;
    font-size: 13px;
    line-height: 1.4;
    z-index: 210;
}

.mc-garage-discovery--hidden {
    display: none;
}

.mc-garage-discovery p {
    margin: 0;
}

.mc-garage-discovery__arrow {
    position: absolute;
    bottom: 100%;
    right: 20px;
    border: 6px solid transparent;
    border-bottom-color: #333;
}

.mc-garage-discovery__close {
    position: absolute;
    top: 4px;
    right: 8px;
    background: none;
    border: none;
    color: #fff;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    padding: 4px;
}

@keyframes mc-garage-header-glow {
    0%, 100% { box-shadow: none; }
    50% { box-shadow: 0 0 0 4px rgba(232, 163, 61, .45); }
}
