/* ============================================================
   Proxy / Site Switcher  —  header_home.tpl
   ============================================================ */

/* ── Wrapper: logo + switcher side-by-side ─────────────── */
.brand-proxy-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

/* ── Trigger button ─────────────────────────────────────── */
.proxy-switcher {
    position: relative;
}
.proxy-switcher .proxy-switcher-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px 5px 8px;
    border: 1.5px solid rgba(255, 255, 255, 0.32);
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.12);
    color: inherit;
    font-size: 0.8rem;
    font-weight: 500;
    white-space: nowrap;
    line-height: 1.4;
    letter-spacing: 0.01em;
    transition: background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
    box-shadow: none !important;
}
.proxy-switcher .proxy-switcher-btn:hover,
.proxy-switcher .proxy-switcher-btn:focus {
    background: rgba(255, 255, 255, 0.24);
    border-color: rgba(255, 255, 255, 0.6);
    outline: none;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.14) !important;
}
.proxy-switcher .proxy-switcher-btn::after {
    /* Bootstrap caret — keep default */
}

/* Small icon circle inside button */
.proxy-btn-icon {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.22);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.73rem;
    flex-shrink: 0;
}

.proxy-current-label {
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: inline-block;
    vertical-align: middle;
}

.proxy-count-badge {
    background: rgba(255, 255, 255, 0.28);
    border-radius: 10px;
    padding: 1px 7px;
    font-size: 0.65rem;
    font-weight: 700;
    line-height: 1.6;
    letter-spacing: 0.03em;
}

/* ── Dropdown panel ─────────────────────────────────────── */
.proxy-history-dropdown {
    min-width: 280px;
    max-height: 380px;
    overflow-y: auto;
    border-radius: 14px;
    padding: 0 0 6px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 10px 32px rgba(0, 0, 0, 0.14) !important;
    background: #ffffff;
    margin-top: 8px !important;
}
.proxy-history-dropdown::-webkit-scrollbar {
    width: 4px;
}
.proxy-history-dropdown::-webkit-scrollbar-thumb {
    background: #e0e0e0;
    border-radius: 4px;
}

/* ── Panel header row ───────────────────────────────────── */
.proxy-panel-header {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 12px 16px 10px;
    font-size: 0.68rem;
    font-weight: 700;
    color: #999;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    background: #fafafa;
    border-radius: 14px 14px 0 0;
    border-bottom: 1px solid #f0f0f0;
}
.proxy-panel-header .fa {
    font-size: 0.75rem;
    color: #bbb;
}

/* ── Individual item ────────────────────────────────────── */
.proxy-history-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 14px 9px 0;
    color: #333;
    border-left: 3px solid transparent;
    transition: background 0.15s ease, border-left-color 0.15s ease;
    text-decoration: none;
    cursor: pointer;
    border-radius: 0;
}
.proxy-history-item:hover {
    background: #f5f8fd;
    border-left-color: #b8d0f0;
    color: #111;
    text-decoration: none;
}
.proxy-history-item:hover .proxy-item-icon {
    background: #d8eaff;
}

/* ── Icon box ───────────────────────────────────────────── */
.proxy-item-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 0.8rem;
    background: #f0f4fa;
    color: #7a9bbf;
    margin-left: 12px;
    transition: background 0.15s ease, color 0.15s ease;
}

/* Home icon variant for Main Site */
.proxy-item-icon.proxy-icon-home {
    background: #eaf2ff;
    color: #3480e3;
}
.proxy-history-item:hover .proxy-item-icon.proxy-icon-home {
    background: #cce0ff;
    color: #1a60cc;
}

/* ── Item body: two-line layout ─────────────────────────── */
.proxy-item-body {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 0;
}
.proxy-site-label {
    font-weight: 600;
    font-size: 0.84rem;
    color: #1a1a1a;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    line-height: 1.35;
}
.proxy-site-url {
    font-size: 0.69rem;
    color: #aaa;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    margin-top: 1px;
    line-height: 1.3;
}

/* ── Active state (current site) ────────────────────────── */
.proxy-history-item.active {
    background: #edf5ff;
    border-left-color: #3480e3;
}
.proxy-history-item.active .proxy-site-label {
    color: #1255aa;
}
.proxy-history-item.active .proxy-site-url {
    color: #7aaee0;
}
.proxy-history-item.active .proxy-item-icon {
    background: #cfe0ff;
    color: #1255aa;
}
.proxy-history-item.active .proxy-item-icon.proxy-icon-home {
    background: #bdd5ff;
    color: #1255aa;
}
.proxy-history-item.active:hover {
    background: #e3f0ff;
}

/* ── Active checkmark ───────────────────────────────────── */
.proxy-active-check {
    color: #3480e3;
    font-size: 0.75rem;
    flex-shrink: 0;
    margin-right: 4px;
}
