/* =============================================
   Showroom Pickup - Trigger Link (inline with qty row)
   ============================================= */

/* When JS moves the wrapper into .box-tocart .fieldset, make them flex row */
.box-tocart .fieldset {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
}

.box-tocart .field.qty {
    flex-shrink: 0;
}

/* Push showroom link to the far right of the qty row */
.showroom-pickup-wrapper {
    margin-left: auto;
    display: flex;
    align-items: center;
}

/* Keep the add-to-cart button on its own full-width row */
.box-tocart .actions {
    flex-basis: 100%;
}

.showroom-pickup-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: #333;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    padding: 6px 0;
    border-bottom: 1px solid #333;
    transition: color 0.2s ease, border-color 0.2s ease;
    white-space: nowrap;
}

.showroom-pickup-link:hover {
    color: #c00;
    border-bottom-color: #c00;
    text-decoration: none;
}

.showroom-pickup-link svg {
    flex-shrink: 0;
}

/* =============================================
   Showroom Popup - Overlay
   ============================================= */

.showroom-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* =============================================
   Showroom Popup - Modal
   ============================================= */

.showroom-popup-modal {
    background: #fff;
    border-radius: 4px;
    width: 90%;
    max-width: 540px;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.15);
    animation: showroom-popup-fadein 0.2s ease;
    position: relative;
}

@keyframes showroom-popup-fadein {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* =============================================
   Showroom Popup - Header
   ============================================= */

.showroom-popup-header {
    padding: 20px 24px 12px;
}

.showroom-popup-title {
    font-size: 18px;
    font-weight: 700;
    color: #222;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Close icon: absolute top-right corner */
.showroom-popup-close {
    position: absolute;
    top: 12px;
    right: 12px;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    color: #999;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s ease;
    z-index: 1;
}

.showroom-popup-close:hover {
    color: #333;
}

.showroom-popup-close svg {
    display: block;
}

/* =============================================
   Showroom Popup - Body
   ============================================= */

.showroom-popup-body {
    padding: 0 24px 16px;
    overflow-y: auto;
    flex: 1;
}

/* City filter */
.showroom-city-label {
    font-size: 13px;
    color: #222;
    font-weight: 600;
    margin-bottom: 8px;
}

.showroom-city-filter {
    position: relative;
    margin-bottom: 16px;
}

.showroom-city-select {
    width: 100%;
    padding: 10px 36px 10px 14px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    color: #333;
    background-color: #fff;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23666' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    background-size: 12px;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    cursor: pointer;
}

.showroom-city-select:focus {
    border-color: #999;
    outline: none;
}

/* =============================================
   Showroom List Items
   ============================================= */

.showroom-list {
    display: flex;
    flex-direction: column;
}

.showroom-item {
    padding: 14px 0;
    border-bottom: 1px solid #eee;
}

.showroom-item:last-child {
    border-bottom: none;
}

.showroom-item-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
}

.showroom-item-info {
    flex: 1;
    min-width: 0;
}

.showroom-item-name {
    font-size: 14px;
    font-weight: 600;
    color: #222;
    margin-bottom: 4px;
    word-break: break-word;
}

.showroom-item-phone {
    font-size: 13px;
    color: #555;
    margin-bottom: 2px;
}

.showroom-item-hours {
    font-size: 13px;
    color: #777;
}

/* Stock status */
.showroom-item-stock {
    flex-shrink: 0;
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
    padding-top: 2px;
}

.showroom-item-stock.in-stock {
    color: #4CAF50;
}

.showroom-item-stock.out-of-stock {
    color: #F44336;
}

.showroom-item-stock .stock-dot {
    font-size: 10px;
    vertical-align: middle;
}

/* Empty & loading */
.showroom-empty-message {
    text-align: center;
    padding: 30px 16px;
    color: #999;
    font-size: 14px;
}

.showroom-loading {
    text-align: center;
    padding: 30px 16px;
    color: #999;
    font-size: 14px;
}

/* =============================================
   Showroom Popup - Footer
   ============================================= */

.showroom-popup-footer {
    padding: 12px 24px 20px;
}

.showroom-notice {
    font-size: 12px;
    color: #c00;
    margin: 0;
    line-height: 1.5;
}

.showroom-notice strong {
    color: #c00;
}

/* =============================================
   Responsive
   ============================================= */

@media (max-width: 767px) {
    .showroom-pickup-wrapper {
        margin-left: 0;
        margin-top: 10px;
        width: 100%;
    }

    .showroom-popup-modal {
        width: 95%;
        max-height: 90vh;
    }

    .showroom-popup-header {
        padding: 16px 16px 10px;
    }

    .showroom-popup-body {
        padding: 0 16px 12px;
    }

    .showroom-popup-footer {
        padding: 10px 16px 16px;
    }

    .showroom-popup-title {
        font-size: 16px;
    }
}
