/* ==========================================================================
   AtlasStore.Outlet - Shwapno-style delivery location UI
   Uses Bootstrap 5 variables/theme colors. Mobile-responsive.
   ========================================================================== */

/* --- Header Delivery Badge ------------------------------------------------ */
.outlet-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.35rem 0.75rem;
    font-size: 0.8125rem;
    line-height: 1.3;
    color: var(--bs-body-color, #212529);
    background: transparent;
    border: 1px solid var(--bs-border-color, #dee2e6);
    border-radius: var(--bs-border-radius-pill, 50rem);
    cursor: pointer;
    transition: background-color 0.15s ease, border-color 0.15s ease;
    white-space: nowrap;
    max-width: 280px;
}

.outlet-badge:hover,
.outlet-badge:focus-visible {
    background-color: var(--bs-primary-bg-subtle, #cfe2ff);
    border-color: var(--bs-primary, #0d6efd);
    color: var(--bs-primary, #0d6efd);
    outline: none;
}

.outlet-badge__icon {
    color: var(--bs-primary, #0d6efd);
    font-size: 1rem;
    flex-shrink: 0;
}

.outlet-badge__text {
    overflow: hidden;
    text-overflow: ellipsis;
}

.outlet-badge__name {
    font-weight: 600;
}

.outlet-badge__change {
    font-size: 0.7rem;
    color: var(--bs-primary, #0d6efd);
    text-decoration: underline;
    margin-inline-start: 0.25rem;
}

/* --- Location Modal ------------------------------------------------------- */
#outletLocationModal .modal-content {
    border-radius: var(--bs-border-radius-lg, 0.5rem);
    background-color: #fff;
}

#outletLocationModal .modal-title {
    font-size: 1.125rem;
    font-weight: 600;
}

.outlet-modal__divider {
    display: flex;
    align-items: center;
    text-align: center;
    color: var(--bs-secondary-color, #6c757d);
    margin: 1rem 0;
}

.outlet-modal__divider::before,
.outlet-modal__divider::after {
    content: "";
    flex: 1;
    border-top: 1px solid var(--bs-border-color, #dee2e6);
}

.outlet-modal__divider span {
    padding: 0 0.75rem;
    text-transform: uppercase;
    font-size: 0.7rem;
    font-weight: 500;
    letter-spacing: 0.05em;
}

/* Suggestions dropdown */
.outlet-modal__suggestions {
    z-index: 1060;
    top: 100%;
    max-height: 14rem;
    overflow-y: auto;
    border-radius: var(--bs-border-radius, 0.375rem);
}

.outlet-modal__suggestions .list-group-item {
    cursor: pointer;
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
    border-left: 0;
    border-right: 0;
}

.outlet-modal__suggestions .list-group-item:hover,
.outlet-modal__suggestions .list-group-item:focus {
    background: var(--bs-light, #f8f9fa);
    outline: none;
}

/* Outlet radio list inside modal */
.outlet-modal__outlet-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    max-height: 16rem;
    overflow-y: auto;
}

.outlet-modal__outlet-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.625rem 0.75rem;
    border: 1px solid var(--bs-border-color, #dee2e6);
    border-radius: var(--bs-border-radius, 0.375rem);
    cursor: pointer;
    transition: border-color 0.15s ease, background-color 0.15s ease;
}

.outlet-modal__outlet-item:hover {
    border-color: var(--bs-primary, #0d6efd);
    background-color: var(--bs-primary-bg-subtle, #cfe2ff);
}

.outlet-modal__outlet-item.is-selected {
    border-color: var(--bs-primary, #0d6efd);
    background-color: var(--bs-primary-bg-subtle, #cfe2ff);
}

.outlet-modal__outlet-item input[type="radio"] {
    flex-shrink: 0;
    width: 1.1rem;
    height: 1.1rem;
    accent-color: var(--bs-primary, #0d6efd);
}

.outlet-modal__outlet-name {
    font-weight: 500;
    flex: 1;
}

.outlet-modal__outlet-distance {
    font-size: 0.8rem;
    color: var(--bs-secondary-color, #6c757d);
    white-space: nowrap;
}

/* GPS button spinner state */
.outlet-modal__gps-btn.is-loading .fa-crosshairs {
    display: none;
}

.outlet-modal__gps-btn.is-loading::before {
    content: "";
    display: inline-block;
    width: 1rem;
    height: 1rem;
    margin-right: 0.5rem;
    border: 2px solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    animation: outlet-spinner 0.6s linear infinite;
}

@keyframes outlet-spinner {
    to { transform: rotate(360deg); }
}

/* --- Responsive ----------------------------------------------------------- */
@media (max-width: 575.98px) {
    .outlet-badge {
        max-width: 200px;
        padding: 0.25rem 0.5rem;
        font-size: 0.75rem;
    }

    .outlet-badge__label {
        display: none !important;
    }

    #outletLocationModal .modal-dialog {
        margin: 0.5rem;
    }
}

/* Auto-open animation for gate redirect */
#outletLocationModal.outlet-modal--gate .modal-dialog {
    animation: outlet-slide-up 0.3s ease-out;
}

@keyframes outlet-slide-up {
    from {
        opacity: 0;
        transform: translateY(1rem);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
