/* ============================================================
   EC Fast Sales - Branch Locator & Onsite EFT Extension Styles
   ============================================================ */

/* 1. Header Navigation Menu Pill */
.menu-item-branch-locator .ec-btn-branch-trigger,
a.ec-btn-branch-trigger {
    background: #0284c7 !important;
    color: #ffffff !important;
    border-radius: 17px !important;
    padding: 0 16px !important;
    font-size: 13px !important;
    font-weight: 700 !important;
    letter-spacing: 0.3px !important;
    cursor: pointer !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    height: 34px !important;
    line-height: 34px !important;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
    text-decoration: none !important;
    box-shadow: 0 2px 6px rgba(2, 132, 199, 0.25) !important;
}

.menu-item-branch-locator .ec-btn-branch-trigger:hover,
a.ec-btn-branch-trigger:hover {
    background: #0369a1 !important;
    transform: translateY(-1.5px) !important;
    box-shadow: 0 4px 10px rgba(2, 132, 199, 0.35) !important;
}

/* Ensure all 7 header pills fit on a single clean row on desktop */
@media (min-width: 1025px) {
    #menu-1-86b99b5 {
        display: flex !important;
        flex-wrap: nowrap !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 6px !important;
    }
    #menu-1-86b99b5 > li {
        margin: 0 !important;
    }
    #menu-1-86b99b5 > li > a {
        padding-left: 13px !important;
        padding-right: 13px !important;
        font-size: 12.5px !important;
    }
}

/* 2. Branch Locator Modal */
.ec-branch-modal {
    position: fixed;
    inset: 0;
    z-index: 9999999 !important;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    font-family: inherit;
    animation: ec-fade-in 0.2s ease;
}

@keyframes ec-fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

.ec-branch-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.65);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.ec-branch-modal-card {
    position: relative;
    background: #ffffff;
    width: 92%;
    max-width: 560px;
    max-height: 90vh;
    overflow-y: auto;
    border-radius: 18px;
    padding: 24px 22px;
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(0, 0, 0, 0.05);
    z-index: 2;
    box-sizing: border-box;
}

.ec-branch-close {
    position: absolute;
    top: 14px;
    right: 14px;
    background: transparent !important;
    border: none !important;
    font-size: 26px;
    line-height: 1;
    color: #94a3b8 !important;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 6px;
    transition: all 0.15s ease;
}
.ec-branch-close:hover {
    color: #0f172a !important;
    background: #f1f5f9 !important;
}

.ec-branch-header {
    margin-bottom: 16px;
    text-align: left;
}

.ec-branch-badge {
    display: inline-block;
    background: #e0f2fe;
    color: #0369a1;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 3px 8px;
    border-radius: 4px;
    margin-bottom: 6px;
}

.ec-branch-header h3 {
    margin: 0 0 4px 0;
    font-size: 19px;
    font-weight: 800;
    color: #0f172a;
    line-height: 1.25;
}

.ec-branch-header p {
    margin: 0;
    font-size: 12.5px;
    color: #64748b;
    line-height: 1.4;
}

/* 3. Nearest Detection Box */
.ec-branch-detect-box {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    background: #f0fdf4;
    border: 1.5px solid #86efac;
    border-radius: 10px;
    padding: 10px 14px;
    margin-bottom: 14px;
    box-sizing: border-box;
}

.ec-branch-detect-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.ec-branch-detect-label {
    font-size: 11px;
    color: #166534;
    font-weight: 600;
    text-transform: uppercase;
}

.ec-branch-detect-info strong {
    font-size: 13.5px;
    color: #0f172a;
    font-weight: 700;
}

.ec-branch-distance-tag {
    font-size: 11px;
    color: #15803d;
    font-weight: 700;
}

.ec-branch-detect-btn {
    background: #16a34a !important;
    color: #ffffff !important;
    border: none !important;
    border-radius: 6px !important;
    padding: 7px 12px !important;
    font-size: 12px !important;
    font-weight: 700 !important;
    cursor: pointer !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 5px !important;
    flex-shrink: 0;
    transition: all 0.15s ease !important;
    box-shadow: 0 2px 6px rgba(22, 163, 74, 0.25) !important;
}

.ec-branch-detect-btn:hover {
    background: #15803d !important;
    transform: translateY(-1px);
}

.ec-branch-detect-btn.ec-detecting {
    opacity: 0.7;
    pointer-events: none;
}

/* 4. Dropdown Selector */
.ec-branch-select-group {
    margin-bottom: 12px;
}

.ec-branch-select-group label {
    display: block;
    font-size: 12px;
    font-weight: 700;
    color: #334155;
    margin-bottom: 4px;
}

.ec-branch-select {
    width: 100%;
    padding: 9px 12px;
    font-size: 13px;
    font-weight: 600;
    color: #0f172a;
    background: #ffffff;
    border: 1.5px solid #cbd5e1;
    border-radius: 8px;
    outline: none;
    box-sizing: border-box;
    cursor: pointer;
    transition: border-color 0.15s ease;
}

.ec-branch-select:focus {
    border-color: #0284c7;
}

/* 5. Active Branch Details Card */
.ec-branch-details-card {
    background: #f8fafc;
    border: 1.5px solid #e2e8f0;
    border-radius: 10px;
    padding: 12px 14px;
    margin-bottom: 14px;
    box-sizing: border-box;
}

.ec-branch-detail-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 8px;
}

.ec-branch-icon {
    font-size: 18px;
    line-height: 1;
    margin-top: 2px;
}

.ec-branch-detail-row strong {
    display: block;
    font-size: 13.5px;
    color: #0f172a;
    margin-bottom: 2px;
}

.ec-branch-detail-row p {
    margin: 0;
    font-size: 12px;
    color: #64748b;
    line-height: 1.35;
}

.ec-branch-detail-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 8px;
    border-top: 1px solid #e2e8f0;
    font-size: 11.5px;
}

.ec-branch-meta-label {
    color: #64748b;
    font-weight: 500;
    margin-right: 4px;
}

.ec-branch-status-tag {
    color: #15803d;
    font-weight: 700;
}

/* 6. Customer Details Form (Required for Quotation) */
.ec-branch-customer-box {
    background: #f8fafc;
    border: 1.5px solid #cbd5e1;
    border-radius: 10px;
    padding: 12px 14px;
    margin-bottom: 14px;
    box-sizing: border-box;
}

.ec-branch-customer-title {
    margin-bottom: 8px;
}

.ec-branch-customer-title span {
    display: block;
    font-size: 12.5px;
    font-weight: 700;
    color: #0f172a;
}

.ec-branch-customer-title small {
    display: block;
    font-size: 11px;
    color: #64748b;
}

.ec-branch-customer-fields {
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.ec-branch-input {
    width: 100%;
    padding: 8px 10px;
    font-size: 12.5px;
    border: 1.5px solid #cbd5e1;
    border-radius: 6px;
    background: #ffffff;
    color: #0f172a;
    outline: none;
    font-family: inherit;
    box-sizing: border-box;
    transition: border-color 0.15s ease;
}

.ec-branch-input:focus {
    border-color: #0284c7;
}

/* 7. Terms & Procedure Box */
.ec-branch-terms-box {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 10px;
    padding: 10px 12px;
    margin-bottom: 16px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.ec-branch-terms-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.ec-terms-num {
    background: #1e40af;
    color: #ffffff;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10.5px;
    font-weight: 800;
    flex-shrink: 0;
    margin-top: 1px;
}

.ec-branch-terms-item strong {
    display: block;
    font-size: 12px;
    color: #1e3a8a;
    line-height: 1.25;
}

.ec-branch-terms-item p {
    margin: 1px 0 0 0;
    font-size: 11.5px;
    color: #3b82f6;
    line-height: 1.35;
}

/* 8. WhatsApp Action Button */
.ec-branch-actions {
    text-align: center;
}

.ec-branch-wa-submit-btn {
    background: #25d366 !important;
    color: #ffffff !important;
    border: none !important;
    border-radius: 10px !important;
    padding: 13px 18px !important;
    font-size: 14px !important;
    font-weight: 700 !important;
    width: 100% !important;
    cursor: pointer !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 10px !important;
    box-shadow: 0 4px 14px rgba(37, 211, 102, 0.4) !important;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
    box-sizing: border-box !important;
}

.ec-branch-wa-submit-btn:hover {
    background: #20ba5a !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(37, 211, 102, 0.5) !important;
}

.ec-branch-wa-icon svg {
    display: block;
}

.ec-branch-action-sub {
    display: block;
    margin-top: 6px;
    font-size: 11px;
    color: #64748b;
}

/* 9. Floating WhatsApp Dock Hover Tooltip */
.ec-branch-dock-tooltip {
    position: fixed;
    bottom: 74px;
    right: 86px;
    background: #0f172a;
    color: #ffffff;
    padding: 8px 14px;
    border-radius: 24px;
    font-size: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.15);
    z-index: 999998 !important;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
    white-space: nowrap;
    pointer-events: none;
}

.ec-branch-dock-tooltip.ec-tip-visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
}

.ec-branch-dock-tooltip:hover {
    background: #1e293b;
    border-color: #38bdf8;
}

.ec-dock-tip-pin {
    font-size: 13px;
}

.ec-dock-tip-text {
    color: #f1f5f9;
}

.ec-dock-tip-text strong {
    color: #38bdf8;
}

.ec-dock-tip-action {
    color: #94a3b8;
    font-weight: 600;
    font-size: 11px;
    margin-left: 2px;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .ec-branch-modal-card {
        padding: 18px 16px;
        width: 95%;
        max-height: 94vh;
    }
    .ec-branch-header h3 {
        font-size: 17px;
    }
    .ec-branch-detect-box {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }
    .ec-branch-detect-btn {
        justify-content: center;
        width: 100%;
    }
    .ec-branch-dock-tooltip {
        display: none !important; /* Hide hover tooltip on touch devices */
    }
}
