/* La Mota — Location Selector Modal */
/* Designed to look good on the existing La Mota dark theme (teal accent) */

.lmgf-modal {
    position: fixed;
    inset: 0;
    z-index: 999998;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
}

.lmgf-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.lmgf-modal-content {
    position: relative;
    width: 100%;
    max-width: 460px;
    max-height: 90vh;
    overflow-y: auto;
    background: #1a1a1a;
    color: #fff;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    padding: 32px 28px;
    box-sizing: border-box;
    animation: lmgfFadeIn 0.25s ease-out;
}

@keyframes lmgfFadeIn {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0);    }
}

.lmgf-modal-close {
    position: absolute;
    top: 12px;
    right: 14px;
    width: 36px;
    height: 36px;
    border: none;
    background: transparent;
    color: #fff;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.15s;
    padding: 0;
}
.lmgf-modal-close:hover { opacity: 1; }

.lmgf-modal-header {
    text-align: center;
    margin-bottom: 24px;
}
.lmgf-modal-header h2 {
    color: #fff;
    font-size: 26px;
    font-weight: 700;
    margin: 0 0 8px;
    line-height: 1.2;
}
.lmgf-modal-subtitle {
    color: #b0b0b0;
    font-size: 14px;
    margin: 0;
    line-height: 1.5;
}

/* Steps */
.lmgf-step-detect {
    display: flex;
    flex-direction: column;
    gap: 14px;
    align-items: stretch;
}

.lmgf-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 20px;
    border: none;
    border-radius: 999px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    text-align: center;
    text-decoration: none;
    transition: all 0.15s ease;
    font-family: inherit;
}

.lmgf-btn-primary {
    background: #1abcba; /* La Mota teal */
    color: #fff;
}
.lmgf-btn-primary:hover {
    background: #16a5a3;
    transform: translateY(-1px);
}

.lmgf-btn-outline {
    background: transparent;
    color: #fff;
    border: 2px solid #1abcba;
}
.lmgf-btn-outline:hover {
    background: rgba(26, 188, 186, 0.1);
}

.lmgf-btn-text {
    background: transparent;
    color: #1abcba;
    padding: 8px;
    text-decoration: underline;
}
.lmgf-btn-text:hover {
    color: #fff;
}

.lmgf-btn-icon {
    font-size: 18px;
}

.lmgf-step-divider {
    text-align: center;
    color: #666;
    font-size: 12px;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin: 4px 0;
}

.lmgf-zip-form {
    display: flex;
    gap: 8px;
}
.lmgf-zip-input {
    flex: 1;
    padding: 14px 16px;
    border: 2px solid #333;
    background: #0a0a0a;
    color: #fff;
    border-radius: 999px;
    font-size: 16px;
    outline: none;
    transition: border-color 0.15s;
    font-family: inherit;
}
.lmgf-zip-input:focus {
    border-color: #1abcba;
}
.lmgf-zip-form .lmgf-btn {
    padding: 14px 24px;
    flex-shrink: 0;
}

/* List step */
.lmgf-list-header {
    display: flex;
    align-items: center;
    margin-bottom: 16px;
    gap: 12px;
}
.lmgf-btn-back {
    background: transparent;
    border: none;
    color: #1abcba;
    cursor: pointer;
    font-size: 14px;
    padding: 6px 10px;
    border-radius: 6px;
    font-family: inherit;
}
.lmgf-btn-back:hover {
    background: rgba(26, 188, 186, 0.1);
}
.lmgf-list-title {
    color: #b0b0b0;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.lmgf-locations-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 420px;
    overflow-y: auto;
    padding-right: 4px;
}

.lmgf-location-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 16px;
    background: #252525;
    border: 2px solid transparent;
    border-radius: 10px;
    color: #fff;
    cursor: pointer;
    text-align: left;
    transition: all 0.15s;
    font-family: inherit;
    width: 100%;
}
.lmgf-location-item:hover {
    background: #2f2f2f;
    border-color: #1abcba;
}
.lmgf-location-item-info {
    flex: 1;
    min-width: 0;
}
.lmgf-location-item-label {
    font-weight: 600;
    font-size: 15px;
    margin-bottom: 2px;
}
.lmgf-location-item-address {
    color: #b0b0b0;
    font-size: 13px;
}
.lmgf-location-item-distance {
    color: #1abcba;
    font-size: 13px;
    font-weight: 600;
    flex-shrink: 0;
    padding-left: 12px;
}

/* State headers within location list */
.lmgf-state-header {
    padding: 8px 4px 4px;
    color: #666;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-weight: 700;
}

/* Loading/Error */
.lmgf-step-loading,
.lmgf-step-error {
    text-align: center;
    padding: 24px 0;
    color: #b0b0b0;
}
.lmgf-spinner {
    display: inline-block;
    width: 38px;
    height: 38px;
    border: 3px solid rgba(26, 188, 186, 0.2);
    border-top-color: #1abcba;
    border-radius: 50%;
    animation: lmgfSpin 0.8s linear infinite;
    margin-bottom: 12px;
}
@keyframes lmgfSpin {
    to { transform: rotate(360deg); }
}

.lmgf-error-message {
    color: #f85a5a;
    margin: 0 0 16px;
}

/* Current-location header indicator (optional shortcode) */
.lmgf-change-store-wrap {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    color: #b0b0b0;
}
.lmgf-change-store-current {
    color: #fff;
    font-weight: 600;
}
.lmgf-change-store-link {
    color: #1abcba;
    text-decoration: underline;
    cursor: pointer;
    background: none;
    border: none;
    padding: 0;
    font-family: inherit;
    font-size: inherit;
}
.lmgf-change-store-link:hover {
    color: #fff;
}

/* Mobile tweaks */
@media (max-width: 520px) {
    .lmgf-modal-content {
        padding: 24px 20px;
        border-radius: 12px;
    }
    .lmgf-modal-header h2 {
        font-size: 22px;
    }
    .lmgf-btn {
        font-size: 15px;
        padding: 12px 16px;
    }
}
