/* ============================================================
   Amazon-Style Geo Delivery Bar  –  geo-bar.css
   Compatible with WoodMart theme
   ============================================================ */

/* ── Bar ──────────────────────────────────────────────────── */
#agb-delivery-bar {
    display: inline-flex;
    align-items: center;
    cursor: pointer;
    user-select: none;
    padding: 4px 8px;
    border-radius: 3px;
    transition: outline 0.15s;
    color: #fff;
    font-family: inherit;
    line-height: 1.3;
    position: relative;
    z-index: 1000;
}

/* WoodMart header integration – places bar inside the header */
.woodmart-navigation #agb-delivery-bar,
.site-header #agb-delivery-bar {
    margin-right: 8px;
}

#agb-delivery-bar:hover {
    outline: 1px solid #fff;
}

.agb-bar-inner {
    display: flex;
    align-items: center;
    gap: 6px;
}

.agb-icon {
    opacity: 0.85;
    flex-shrink: 0;
    margin-top: 2px;
}

.agb-text-wrap {
    display: flex;
    flex-direction: column;
}

.agb-top-label {
    font-size: 11px;
    opacity: 0.8;
    white-space: nowrap;
}

.agb-location-name {
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
    display: flex;
    flex-direction: column;
    gap: 1px;
    max-width: 180px;
    overflow: hidden;
}

.agb-area {
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.3;
}

.agb-city {
    font-size: 11px;
    font-weight: 400;
    opacity: 0.85;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.2;
}

.agb-pin {
    font-size: 10px;
    font-weight: 400;
    opacity: 0.75;
    line-height: 1.2;
}

.agb-arrow {
    font-size: 9px;
    opacity: 0.7;
    margin-top: 2px;
}

/* ── Modal Overlay ─────────────────────────────────────────── */
#agb-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    z-index: 99999;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 80px;
    animation: agbFadeIn 0.15s ease;
}

@keyframes agbFadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

#agb-modal-overlay.agb-hidden {
    display: none !important;
}

/* ── Modal Box ─────────────────────────────────────────────── */
#agb-modal {
    background: #fff;
    border-radius: 8px;
    padding: 28px 28px 22px;
    width: 100%;
    max-width: 380px;
    position: relative;
    box-shadow: 0 8px 40px rgba(0,0,0,0.22);
    animation: agbSlideDown 0.18s ease;
}

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

#agb-modal-close {
    position: absolute;
    top: 10px;
    right: 14px;
    background: none;
    border: none;
    font-size: 22px;
    cursor: pointer;
    color: #555;
    line-height: 1;
    padding: 0;
    transition: color 0.1s;
}
#agb-modal-close:hover { color: #111; }

#agb-modal h3 {
    margin: 0 0 6px;
    font-size: 18px;
    font-weight: 700;
    color: #111;
}

.agb-modal-sub {
    font-size: 13px;
    color: #555;
    margin: 0 0 18px;
    line-height: 1.5;
}

/* ── Sign-in Button ────────────────────────────────────────── */
.agb-btn-primary {
    display: block;
    width: 100%;
    background: #f0c14b;
    border: 1px solid #a88734;
    color: #111 !important;
    text-align: center;
    padding: 9px 14px;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none !important;
    cursor: pointer;
    transition: background 0.15s;
    box-sizing: border-box;
}
.agb-btn-primary:hover {
    background: #e9b830;
    text-decoration: none !important;
}

/* ── Divider ───────────────────────────────────────────────── */
.agb-divider {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 16px 0;
    color: #999;
    font-size: 12px;
}
.agb-divider::before,
.agb-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #ddd;
}

/* ── Pincode Row ───────────────────────────────────────────── */
.agb-pincode-row {
    display: flex;
    gap: 8px;
}

#agb-pincode-input {
    flex: 1;
    border: 1px solid #aaa;
    border-radius: 4px;
    padding: 9px 12px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.15s, box-shadow 0.15s;
}
#agb-pincode-input:focus {
    border-color: #e77600;
    box-shadow: 0 0 0 3px rgba(231,118,0,.2);
}

#agb-apply-btn {
    background: #fff;
    border: 1px solid #aaa;
    border-radius: 4px;
    padding: 9px 16px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    color: #111;
    transition: background 0.12s, border-color 0.12s;
}
#agb-apply-btn:hover {
    background: #f7f7f7;
    border-color: #888;
}

/* ── Detect Location Link ─────────────────────────────────── */
.agb-detect-link {
    display: flex;
    align-items: center;
    gap: 5px;
    background: none;
    border: none;
    color: #0066c0;
    font-size: 13px;
    cursor: pointer;
    padding: 10px 0 0;
    text-decoration: none;
    transition: color 0.12s;
}
.agb-detect-link:hover { color: #c45500; text-decoration: underline; }

/* ── Error ─────────────────────────────────────────────────── */
.agb-error {
    color: #c40000;
    font-size: 12px;
    margin: 6px 0 0;
}

/* ── Utilities ─────────────────────────────────────────────── */
.agb-hidden { display: none !important; }

/* ── Responsive ────────────────────────────────────────────── */
@media (max-width: 600px) {
    #agb-modal-overlay { padding-top: 40px; padding-inline: 16px; }
    #agb-modal { padding: 22px 18px 18px; }
}
