/* ================================================================
   Polylang Switcher Builder — Frontend CSS
   ================================================================ */

/* ---- BASE ---- */
[data-psb] {
    font-family: inherit;
    line-height: 1;
}
[data-psb] * { box-sizing: border-box; }
[data-psb] a { text-decoration: none; }

/* ====================================================
   DROPDOWN LAYOUT
   ==================================================== */
.psb-switcher.psb-dropdown {
    position: relative;
    display: inline-block;
}

.psb-dropdown .psb-current {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 6px 14px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    color: inherit;
    transition: opacity .2s;
    user-select: none;
}
.psb-dropdown .psb-current:hover { opacity: .75; }

.psb-dropdown .psb-caret {
    transition: transform .25s ease;
    opacity: .7;
}
.psb-dropdown:hover .psb-caret {
    transform: rotate(180deg);
}

.psb-dropdown .psb-dropdown-list {
    position: absolute;
    top: calc(100% + 4px);
    right: 0;
    min-width: 140px;
    background: #fff;
    list-style: none;
    margin: 0;
    padding: 4px 0;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0,0,0,.12), 0 2px 8px rgba(0,0,0,.08);
    border: 1px solid rgba(0,0,0,.07);
    opacity: 0;
    visibility: hidden;
    transform: translateY(6px);
    transition: opacity .2s ease, visibility .2s ease, transform .2s ease;
    z-index: 9999;
}
.psb-dropdown:hover .psb-dropdown-list,
.psb-dropdown:focus-within .psb-dropdown-list {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.psb-dropdown .psb-dropdown-item { margin: 0; padding: 0; }
.psb-dropdown .psb-dropdown-item a {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    font-size: 13px;
    font-weight: 500;
    color: #1e293b;
    transition: background .15s, color .15s;
    white-space: nowrap;
}
.psb-dropdown .psb-dropdown-item:not(:last-child) a {
    border-bottom: 1px solid #f1f5f9;
}
.psb-dropdown .psb-dropdown-item a:hover {
    background: #f8fafc;
    color: #2563eb;
}

/* ====================================================
   ROW LAYOUT (jedan pored drugog)
   ==================================================== */
.psb-switcher.psb-row {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    flex-wrap: wrap;
}
.psb-row .psb-lang-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    font-size: 13px;
    font-weight: 500;
    color: inherit;
    border-radius: 20px;
    transition: background .15s, color .15s;
}
.psb-row .psb-lang-item:hover { background: rgba(0,0,0,.06); }
.psb-row .psb-lang-item.psb-active {
    font-weight: 700;
    background: rgba(37,99,235,.1);
    color: #2563eb;
}

/* ====================================================
   COLUMN LAYOUT (jedan ispod drugog)
   ==================================================== */
.psb-switcher.psb-column {
    display: inline-flex;
    flex-direction: column;
    gap: 2px;
}
.psb-column .psb-lang-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 7px 14px;
    font-size: 13px;
    font-weight: 500;
    color: inherit;
    border-radius: 6px;
    transition: background .15s, color .15s;
}
.psb-column .psb-lang-item:hover { background: rgba(0,0,0,.06); }
.psb-column .psb-lang-item.psb-active {
    font-weight: 700;
    color: #2563eb;
    background: rgba(37,99,235,.08);
}

/* ====================================================
   FLAG EMOJI
   ==================================================== */
.psb-flag {
    font-size: 1.2em;
    line-height: 1;
    display: inline-block;
}

/* ---- FLAG IMAGE (URL or base64) ---- */
.psb-flag-img {
    display: inline-block;
    width: 20px;
    height: 14px;
    object-fit: cover;
    border-radius: 2px;
    vertical-align: middle;
    box-shadow: 0 1px 2px rgba(0,0,0,.18);
    flex-shrink: 0;
}
