/* Garage v3 — body style flex pills + roof type helper.
   Appended to garage-picker.css. */

.rmr-garage__hint {
    font-size: 0.85rem;
    color: #5a6b87;
}

.rmr-required { color: #c25a2d; }

/* ---- Body style field (title + hint + wrapping pills) ---- */

#rmr-garage-add-form .rmr-garage__field--body,
#rmr-garage-add-form .rmr-garage__field--roof {
    grid-column: 1 / -1;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    grid-template-columns: auto;
}

.rmr-garage__field--body {
    border: 0;
    margin: 0;
    padding: 0;
    min-width: 0;
}

.rmr-garage__field-head {
    display: flex;
    flex-direction: column;
    gap: 6px;
    float: left;
    width: 100%;
    margin-bottom: 12px;
    padding: 0;
}

.rmr-garage__field--body .rmr-garage__label,
.rmr-garage__field--roof .rmr-garage__label {
    display: block;
    font-size: 0.78rem;
    font-weight: 700;
    color: #0a1a3b;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.rmr-garage__field--body .rmr-garage__hint,
.rmr-garage__field--roof .rmr-garage__hint {
    display: block;
    font-size: 0.85rem;
    font-weight: 400;
    color: #5a6b87;
    line-height: 1.45;
    margin: 0;
    text-transform: none;
    letter-spacing: normal;
}

.rmr-body-options {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: flex-start;
    width: 100%;
    clear: both;
}

.rmr-body-tile {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    gap: 6px;
    min-height: 0;
    padding: 10px 18px;
    background: #fff;
    border: 1.5px solid #e4e7ef;
    border-radius: 10px;
    cursor: pointer;
    transition: border-color 0.15s ease, background 0.15s ease, transform 0.15s ease;
    text-align: center;
}
.rmr-body-tile:hover {
    border-color: #c5cdf0;
    background: #f6f7fb;
    transform: translateY(-1px);
}
.rmr-body-tile input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}
.rmr-body-tile:has(input:checked),
.rmr-body-tile.is-selected {
    border-color: #2447ff;
    background: #ecf0ff;
    box-shadow: 0 4px 12px rgba(36, 71, 255, 0.15);
}

.rmr-body-tile[hidden] {
    display: none !important;
}

.rmr-body-tile--has-img {
    width: 104px;
    padding: 8px 8px 10px;
}

.rmr-body-tile--has-img .rmr-body-tile__label {
    font-size: 0.78rem;
    white-space: normal;
    line-height: 1.2;
}

.rmr-body-tile__img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 1 / 1;
    max-height: 96px;
    object-fit: contain;
    background: #f4f6fb;
    border-radius: 6px;
}

.rmr-body-tile--label-only {
    padding: 10px 18px;
}

.rmr-body-tile--label-only .rmr-body-tile__label {
    font-size: 0.9rem;
    font-weight: 600;
    white-space: nowrap;
}

.rmr-body-tile__label {
    font-size: 0.9rem;
    font-weight: 600;
    color: #0a1a3b;
    line-height: 1.25;
    white-space: nowrap;
}

/* ---- Roof type helper (full-width flex) ---- */

.rmr-garage__field--roof {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    min-width: 0;
    border: 0;
    margin: 0;
    padding: 0;
}

.rmr-roof-options {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    width: 100%;
    padding: 0;
    clear: both;
}

.rmr-roof-tile {
    position: relative;
    display: inline-flex;
    flex: 1 1 140px;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;    
    padding: 12px 10px;
    background: #fff;
    border: 1.5px solid #e4e7ef;
    border-radius: 10px;
    cursor: pointer;
    text-align: center;
    transition: border-color 0.15s ease, background 0.15s ease;
    &:not(.rmr-roof-tile--has-img){
        width: 100%; 
        grid-column: 1/-1;
    }
}
.rmr-roof-tile:hover {
    border-color: #c5cdf0;
}
.rmr-roof-tile input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}
.rmr-roof-tile:has(input:checked) {
    border-color: #2447ff;
    background: #ecf0ff;
}


.rmr-roof-tile__img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 8px;
}
.rmr-roof-tile__placeholder {
    display: grid;
    place-items: center;
    width: 100%;    
    aspect-ratio: 1;
    background: #f6f7fb;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 700;
    color: #5a6b87;
}
.rmr-roof-tile.is-text-only .rmr-roof-tile__img { display: none; }

.rmr-roof-tile__label {
    font-size: 0.78rem;
    font-weight: 600;
    color: #0a1a3b;
    line-height: 1.3;
    padding: 0 2px;
}

/* ---- Responsive ---- */

@media (max-width: 720px) {
    .rmr-roof-options {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 420px) {
    .rmr-body-tile,
    .rmr-body-tile--label-only {
        padding: 10px 14px;
    }

    .rmr-roof-options {
        gap: 10px;
    } 


    .rmr-roof-tile__label {
        font-size: 0.85rem;
    }
}
