/* ==========================================================================
   WC Local Pickup Availability – Frontend Styles
   ========================================================================== */

.wc-lpa-widget {
    margin: 20px 0;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    overflow: hidden;
    font-size: 14px;
    font-family: inherit;
    background: #ffffff;
    box-shadow: 0 1px 4px rgba(0,0,0,.06);
}

/* ---------- Header ---------- */
.wc-lpa-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    font-weight: 600;
    color: #1e293b;
    font-size: 14px;
}

.wc-lpa-icon {
    width: 18px;
    height: 18px;
    color: #3b82f6;
    flex-shrink: 0;
}

/* ---------- Body ---------- */
.wc-lpa-body {
    padding: 14px 16px;
}

.wc-lpa-intro {
    margin: 0 0 12px;
    color: #64748b;
    font-size: 13px;
}

/* ---------- Location cards ---------- */
.wc-lpa-locations {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.wc-lpa-location-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 14px;
    border: 1.5px solid #e2e8f0;
    border-radius: 8px;
    cursor: pointer;
    transition: border-color .15s ease, background .15s ease, box-shadow .15s ease;
    outline: none;
}

.wc-lpa-location-card:hover,
.wc-lpa-location-card:focus {
    border-color: #3b82f6;
    background: #eff6ff;
    box-shadow: 0 0 0 3px rgba(59,130,246,.12);
}

.wc-lpa-location-card.is-selected {
    border-color: #3b82f6;
    background: #eff6ff;
}

.wc-lpa-location-card.is-loading {
    opacity: .7;
    pointer-events: none;
}

/* ---------- Location info ---------- */
.wc-lpa-location-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.wc-lpa-location-name {
    color: #0f172a;
    font-weight: 600;
    font-size: 14px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.wc-lpa-location-address {
    color: #64748b;
    font-size: 12px;
}

.wc-lpa-location-hours {
    display: flex;
    align-items: center;
    gap: 4px;
    color: #64748b;
    font-size: 12px;
}

.wc-lpa-location-hours svg {
    width: 12px;
    height: 12px;
    flex-shrink: 0;
}

/* ---------- Status badge ---------- */
.wc-lpa-status-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
    flex-shrink: 0;
    transition: background .2s, color .2s;
}

.wc-lpa-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    flex-shrink: 0;
}

/* Available */
.wc-lpa-status--available .wc-lpa-status-badge,
.wc-lpa-status-badge.wc-lpa-status--available {
    background: #dcfce7;
    color: #15803d;
}
.wc-lpa-status--available .wc-lpa-dot,
.wc-lpa-status-badge.wc-lpa-status--available .wc-lpa-dot {
    background: #22c55e;
    animation: wc-lpa-pulse 2s infinite;
}

/* Limited */
.wc-lpa-status--limited .wc-lpa-status-badge,
.wc-lpa-status-badge.wc-lpa-status--limited {
    background: #fef9c3;
    color: #a16207;
}
.wc-lpa-status--limited .wc-lpa-dot,
.wc-lpa-status-badge.wc-lpa-status--limited .wc-lpa-dot {
    background: #eab308;
}

/* Unavailable */
.wc-lpa-status--unavailable .wc-lpa-status-badge,
.wc-lpa-status-badge.wc-lpa-status--unavailable {
    background: #fee2e2;
    color: #b91c1c;
}
.wc-lpa-status--unavailable .wc-lpa-dot,
.wc-lpa-status-badge.wc-lpa-status--unavailable .wc-lpa-dot {
    background: #ef4444;
}

/* Loading */
.wc-lpa-status-badge.wc-lpa-status--checking {
    background: #f1f5f9;
    color: #64748b;
}
.wc-lpa-status-badge.wc-lpa-status--checking .wc-lpa-dot {
    background: #94a3b8;
    animation: wc-lpa-blink .8s step-start infinite;
}

/* ---------- Pulse animation for available ---------- */
@keyframes wc-lpa-pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50%       { opacity: .6; transform: scale(1.25); }
}

@keyframes wc-lpa-blink {
    0%, 100% { opacity: 1; }
    50%       { opacity: .3; }
}

/* ---------- Detail panel ---------- */
.wc-lpa-detail {
    margin-top: 12px;
    padding: 12px 14px;
    border-radius: 8px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    font-size: 13px;
    color: #334155;
    line-height: 1.5;
}

.wc-lpa-detail strong {
    display: block;
    font-size: 14px;
    color: #0f172a;
    margin-bottom: 4px;
}

.wc-lpa-detail .wc-lpa-detail-row {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 4px;
    color: #64748b;
}

.wc-lpa-detail .wc-lpa-detail-row svg {
    width: 13px;
    height: 13px;
    flex-shrink: 0;
}

/* ---------- Responsive ---------- */
@media (max-width: 480px) {
    .wc-lpa-location-card {
        flex-direction: column;
        align-items: flex-start;
    }
}
