/* =====================================================
   Biottek Sucursal Widgets — Styles v1.0
   assets/sucursal.css
   ===================================================== */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

/* ── Selector button ────────────────────────────────── */
.bk-suc-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #00C472;
    color: #fff;
    border: none;
    padding: 5px 16px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    font-family: 'Plus Jakarta Sans', sans-serif;
    cursor: pointer;
    transition: background .2s, transform .15s;
    line-height: 1.4;
}
.bk-suc-btn:hover  { background: #009A57; }
.bk-suc-btn:active { transform: scale(.97); }
.bk-suc-btn i, .bk-suc-btn svg { font-size: 14px; width: 14px; height: 14px; }

/* ── Modal backdrop ─────────────────────────────────── */
.bk-suc-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(10, 30, 60, .55);
    z-index: 100000;  /* encima de headers sticky, Elementor editor, etc. */
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    animation: bkFadeIn .18s ease;
}
.bk-suc-backdrop[hidden] { display: none; }

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

/* ── Modal box ──────────────────────────────────────── */
.bk-suc-modal {
    background: #fff;
    border-radius: 22px;
    padding: 30px 32px 24px;
    width: 100%;
    max-width: 520px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    gap: 0;
    box-shadow: 0 20px 60px rgba(13, 46, 110, .20);
    position: relative;
    animation: bkSlideUp .22s ease;
    font-family: 'Plus Jakarta Sans', sans-serif;
}

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

.bk-suc-modal__close {
    position: absolute;
    top: 16px; right: 18px;
    background: none;
    border: none;
    font-size: 18px;
    color: #9AAAB8;
    cursor: pointer;
    line-height: 1;
    padding: 4px;
    border-radius: 6px;
    transition: color .15s;
}
.bk-suc-modal__close:hover { color: #0D2E6E; }

.bk-suc-modal__title {
    font-size: 21px;
    font-weight: 800;
    color: #0D2E6E;
    margin: 0 0 6px;
}

.bk-suc-modal__sub {
    font-size: 13px;
    color: #6B7B8E;
    margin: 0 0 20px;
    line-height: 1.6;
}

/* ── Zone tabs ──────────────────────────────────────── */
.bk-suc-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.bk-suc-tab {
    padding: 7px 20px;
    border-radius: 24px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    border: 1.5px solid #C8D8E8;
    background: #fff;
    color: #6B7B8E;
    font-family: 'Plus Jakarta Sans', sans-serif;
    transition: all .15s;
}
.bk-suc-tab:hover  { border-color: #0D2E6E; color: #0D2E6E; }
.bk-suc-tab.bk-active { background: #0D2E6E; color: #fff; border-color: #0D2E6E; }

/* ── Sucursal list ──────────────────────────────────── */
.bk-suc-list {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 320px;
    margin-bottom: 20px;
    padding-right: 4px;
    scrollbar-width: thin;
    scrollbar-color: #C8D8E8 transparent;
}

.bk-suc-list::-webkit-scrollbar { width: 6px; }
.bk-suc-list::-webkit-scrollbar-track { background: transparent; }
.bk-suc-list::-webkit-scrollbar-thumb { background: #C8D8E8; border-radius: 3px; }

.bk-suc-row {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 12px;
    border: 1.5px solid #C8D8E8;
    cursor: pointer;
    transition: border-color .15s, background .15s;
    outline: none;
}
.bk-suc-row[hidden] { display: none; }
.bk-suc-row:hover   { border-color: #0D2E6E; }
.bk-suc-row:focus   { border-color: #0D2E6E; box-shadow: 0 0 0 3px rgba(13,46,110,.15); }
.bk-suc-row.bk-selected {
    border-color: #00C472;
    background: #E6F9F1;
}

.bk-suc-row__pin {
    font-size: 20px;
    flex-shrink: 0;
    margin-top: 1px;
    line-height: 1;
}

.bk-suc-row__info { flex: 1; min-width: 0; }

.bk-suc-row__name {
    font-size: 14px;
    font-weight: 700;
    color: #1A2733;
    line-height: 1.3;
}

.bk-suc-row__addr {
    font-size: 12px;
    color: #6B7B8E;
    margin-top: 2px;
    line-height: 1.4;
}

.bk-suc-row__hours {
    font-size: 11px;
    font-weight: 600;
    color: #009A57;
    margin-top: 4px;
}

.bk-suc-row__dist {
    font-size: 12px;
    font-weight: 600;
    color: #6B7B8E;
    flex-shrink: 0;
    margin-top: 2px;
    white-space: nowrap;
}

/* ── Modal footer ───────────────────────────────────── */
.bk-suc-modal__footer {
    display: flex;
    gap: 10px;
}

.bk-suc-modal__confirm {
    flex: 1;
    background: #0D2E6E;
    color: #fff;
    border: none;
    padding: 13px 20px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 700;
    font-family: 'Plus Jakarta Sans', sans-serif;
    cursor: pointer;
    transition: background .2s;
}
.bk-suc-modal__confirm:hover    { background: #1A4FA0; }
.bk-suc-modal__confirm:disabled {
    background: #C8D8E8;
    color: #9AAAB8;
    cursor: not-allowed;
}

.bk-suc-modal__map-btn {
    background: #fff;
    color: #0D2E6E;
    border: 1.5px solid #0D2E6E;
    padding: 13px 20px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    font-family: 'Plus Jakarta Sans', sans-serif;
    cursor: pointer;
    transition: background .15s;
    white-space: nowrap;
}
.bk-suc-modal__map-btn:hover { background: #EBF4FF; }

/* ── Zone indicator bar ─────────────────────────────── */
.bk-zona-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    font-family: 'Plus Jakarta Sans', sans-serif;
}

.bk-zona-pin { font-size: 16px; }

.bk-zona-badge {
    display: inline-flex;
    align-items: center;
    gap: 0;
    background: #00C472;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    padding: 4px 14px;
    border-radius: 20px;
    line-height: 1.4;
}

.bk-zona-change {
    font-size: 12px;
    font-weight: 500;
    color: #1A4FA0;
    background: none;
    border: none;
    cursor: pointer;
    text-decoration: underline;
    font-family: 'Plus Jakarta Sans', sans-serif;
    padding: 0;
    text-underline-offset: 2px;
}
.bk-zona-change:hover { color: #0D2E6E; }

/* ── Geo loading state ──────────────────────────────── */
.bk-suc-tab.bk-loading::after {
    content: ' ⏳';
}

/* ── Responsive ─────────────────────────────────────── */
@media (max-width: 540px) {
    .bk-suc-modal { padding: 22px 18px 18px; border-radius: 18px; }
    .bk-suc-modal__footer { flex-direction: column; }
    .bk-suc-modal__map-btn { text-align: center; }
}


/* ═══════════════════════════════════════════════════════════
   Biottek: Mi Sucursal Widget
   ═══════════════════════════════════════════════════════════ */

.bk-mi-suc {
    font-family: 'Plus Jakarta Sans', sans-serif;
    background: #FFFFFF;
    border: 1px solid #C8D8E8;
    border-radius: 16px;
    padding: 24px;
    line-height: 1.5;
}

/* ── Title ──────────────────────────────────────────── */
.bk-mi-suc__title {
    font-size: 13px;
    font-weight: 600;
    color: #6B7B8E;
    margin: 0 0 16px;
    text-transform: none;
    letter-spacing: 0;
}

/* ── Body row (icon + info) ──────────────────────────── */
.bk-mi-suc__body {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    margin-bottom: 16px;
}

.bk-mi-suc__icon {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    background: #EBF4FF;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #0D2E6E;
}

.bk-mi-suc__info {
    min-width: 0;
    flex: 1;
}

.bk-mi-suc__zone {
    display: block;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .06em;
    color: #6B7B8E;
    margin-bottom: 4px;
}

.bk-mi-suc__nombre {
    font-size: 16px;
    font-weight: 700;
    color: #0D2E6E;
    margin: 0;
    line-height: 1.3;
}

/* ── Address ─────────────────────────────────────────── */
.bk-mi-suc__direccion {
    font-size: 13px;
    color: #0D2E6E;
    font-style: normal;
    line-height: 1.6;
    margin: 0 0 12px;
    padding: 12px 0;
    border-top: 1px solid #EBF4FF;
    border-bottom: 1px solid #EBF4FF;
}

/* ── Hours ───────────────────────────────────────────── */
.bk-mi-suc__horario {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 12px;
    margin: 12px 0 16px;
}

.bk-mi-suc__horario span {
    font-size: 12px;
    color: #6B7B8E;
    background: #F4F9FF;
    padding: 3px 10px;
    border-radius: 20px;
    white-space: nowrap;
}

/* ── Actions ─────────────────────────────────────────── */
.bk-mi-suc__actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 16px;
}

/* Maps link */
.bk-mi-suc__maps-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 600;
    color: #0D2E6E;
    text-decoration: none;
    font-family: 'Plus Jakarta Sans', sans-serif;
    transition: opacity .15s;
    padding: 0;
    background: none;
    border: none;
    cursor: pointer;
}
.bk-mi-suc__maps-btn:hover {
    opacity: .75;
    text-decoration: underline;
}
.bk-mi-suc__maps-btn svg {
    stroke: #0D2E6E;
    flex-shrink: 0;
}

/* Select / Change button */
.bk-mi-suc__select-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #00C472;
    color: #fff;
    border: none;
    border-radius: 24px;
    padding: 9px 20px;
    font-size: 13px;
    font-weight: 700;
    font-family: 'Plus Jakarta Sans', sans-serif;
    cursor: pointer;
    transition: background .15s;
    line-height: 1.4;
}
.bk-mi-suc__select-btn:hover { background: #009A57; }

/* ── Empty state (no branch selected) ───────────────── */
.bk-mi-suc__empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 8px 0;
    gap: 12px;
}

.bk-mi-suc__empty-icon {
    width: 56px;
    height: 56px;
    background: #EBF4FF;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #9AAAB8;
}

.bk-mi-suc__empty-text {
    font-size: 14px;
    font-weight: 600;
    color: #6B7B8E;
    margin: 0;
}

/* ── Responsive ──────────────────────────────────────── */
@media (max-width: 480px) {
    .bk-mi-suc { padding: 18px; }
    .bk-mi-suc__actions { flex-direction: column; align-items: flex-start; }
    .bk-mi-suc__select-btn { width: 100%; justify-content: center; }
}
