/* Smart Local Pickup - Premium Design */

/* --- Main Container --- */
.slp-pickup-location-section {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 20px;
    margin: 20px 0;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    transition: all 0.3s ease;
}

.slp-pickup-location-section:hover {
    border-color: #cbd5e1;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.05);
}

.slp-pickup-location-info-content h4 {
    margin-bottom: 15px;
    color: #1e293b;
    font-size: 1.1rem;
    font-weight: 600;
}

/* --- List Items --- */
.slp-locations-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.slp-location-option {
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 16px;
    margin-bottom: 0;
    cursor: pointer;
    transition: all 0.2s ease;
    background: #f8fafc;
}

.slp-location-option:hover {
    background: #f1f5f9;
    border-color: #94a3b8;
}

.slp-location-option.selected {
    border-color: #2271b1;
    background: #eff6ff;
    /* Light blue tint */
    box-shadow: 0 0 0 2px rgba(34, 113, 177, 0.2);
}

.slp-location-label {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    width: 100%;
    margin: 0;
    font-weight: normal;
    cursor: pointer;
}

/* --- Radio Button --- */
.slp-radio-col {
    flex-shrink: 0;
    padding-top: 2px;
}

.slp-radio-col input[type="radio"] {
    cursor: pointer;
    width: 18px;
    height: 18px;
    margin: 0;
}

/* --- Info Column --- */
.slp-info-col {
    flex-grow: 1;
}

.slp-location-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
    flex-wrap: wrap;
    gap: 8px;
}

.slp-location-header strong {
    font-size: 1rem;
    color: #0f172a;
    font-weight: 700;
}

.slp-dist-badge {
    font-size: 0.85rem;
    color: #3b82f6;
    background: #dbeafe;
    padding: 2px 8px;
    border-radius: 9999px;
    font-weight: 600;
    white-space: nowrap;
}

.slp-location-address {
    font-size: 0.95rem;
    color: #64748b;
    line-height: 1.4;
    margin-bottom: 8px;
}

/* --- Hours Trigger Button --- */
.slp-hours-trigger {
    background: transparent;
    border: 1px solid #e2e8f0;
    color: #64748b;
    cursor: pointer;
    padding: 6px 12px;
    font-size: 0.85rem;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s;
}

.slp-hours-trigger:hover {
    background: #ffffff;
    border-color: #94a3b8;
    color: #334155;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

/* --- Modal / Popup (Premium Glassmorphism) --- */
.slp-modal {
    display: none;
    position: fixed;
    z-index: 99999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100vh;
    /* Use vh to ensure full screen coverage */
    background-color: rgba(15, 23, 42, 0.4);
    /* Dark blue overlay */
    backdrop-filter: blur(4px);
    /* Blur effect */
    display: flex;
    /* Always flex */
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    /* Prevent clicks when hidden */
    transition: opacity 0.3s ease;
}

.slp-modal.show {
    opacity: 1;
    pointer-events: auto;
    display: flex !important;
    /* Force flex to prevent theme overrides */
}

.slp-modal-content {
    background: rgba(255, 255, 255, 0.95);
    padding: 24px;
    border-radius: 16px;
    width: 90%;
    max-width: 400px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    position: relative;
    max-height: 90vh;
    /* Prevent overflow on small screens */
    overflow-y: auto;
    /* Scroll if content is too tall */
    margin: auto;
    /* reinforce centering */
    transform: translateY(20px);
    transition: transform 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 1);
}

.slp-modal.show .slp-modal-content {
    transform: translateY(0);
}

.slp-close-modal {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 24px;
    font-weight: bold;
    color: #94a3b8;
    cursor: pointer;
    line-height: 1;
    transition: color 0.2s;
}

.slp-close-modal:hover {
    color: #334155;
}

#slp-modal-title {
    margin-top: 0;
    margin-bottom: 20px;
    /* Space for close button */
    font-size: 1.25rem;
    color: #1e293b;
    padding-right: 20px;
}

#slp-modal-body {
    color: #475569;
    font-size: 0.95rem;
    line-height: 1.6;
}

/* --- Spinner --- */
.slp-loading-spinner {
    display: inline-block;
    width: 18px;
    height: 18px;
    border: 2px solid #e2e8f0;
    border-radius: 50%;
    border-top-color: #3b82f6;
    animation: slp-spin 0.8s linear infinite;
    margin-right: 8px;
}

@keyframes slp-spin {
    to {
        transform: rotate(360deg);
    }
}

/* --- Mobile Responsiveness --- */
@media (max-width: 600px) {
    .slp-pickup-location-section {
        padding: 15px;
    }

    .slp-location-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }

    .slp-dist-badge {
        align-self: flex-start;
    }
}