/* TranslateWP Pro — Public CSS */

/* ─── Floating Switcher ─── */
.twp-floating {
    position: fixed;
    z-index: 99999;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 13px;
}

.twp-pos-bottom-right { bottom: 24px; right: 24px; }
.twp-pos-bottom-left  { bottom: 24px; left: 24px; }
.twp-pos-top-right    { top: 70px; right: 24px; }
.twp-pos-top-left     { top: 70px; left: 24px; }

.twp-floating-current {
    background: #1d2327;
    color: #fff;
    padding: 8px 14px;
    border-radius: 6px;
    cursor: pointer;
    user-select: none;
    box-shadow: 0 2px 8px rgba(0,0,0,.3);
    transition: background .15s;
}
.twp-floating-current:hover { background: #2c3338; }

.twp-floating-dropdown {
    display: none;
    position: absolute;
    bottom: calc(100% + 6px);
    right: 0;
    background: #fff;
    border-radius: 6px;
    box-shadow: 0 4px 20px rgba(0,0,0,.15);
    min-width: 150px;
    overflow: hidden;
}

.twp-pos-bottom-left  .twp-floating-dropdown { right: auto; left: 0; }
.twp-pos-top-right    .twp-floating-dropdown { bottom: auto; top: calc(100% + 6px); }
.twp-pos-top-left     .twp-floating-dropdown { bottom: auto; top: calc(100% + 6px); right: auto; left: 0; }

.twp-floating.twp-open .twp-floating-dropdown { display: block; }

.twp-floating-dropdown .twp-lang-btn,
.twp-floating-dropdown a {
    display: block;
    padding: 9px 16px;
    color: #1d2327;
    text-decoration: none;
    transition: background .1s;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
    cursor: pointer;
    font-size: 13px;
}

.twp-floating-dropdown .twp-lang-btn:hover,
.twp-floating-dropdown a:hover { background: #f6f7f7; }

.twp-floating-dropdown .twp-lang-btn.twp-active {
    color: #2271b1;
    font-weight: 600;
}

.twp-floating-dropdown hr { margin: 4px 0; border: none; border-top: 1px solid #ddd; }

/* ─── Inline Switcher ─── */
.twp-switcher { display: flex; gap: 6px; flex-wrap: wrap; }

.twp-switcher .twp-lang-btn {
    padding: 6px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    text-decoration: none;
    color: #1d2327;
    font-size: 13px;
    transition: all .15s;
}
.twp-switcher .twp-lang-btn:hover   { border-color: #2271b1; color: #2271b1; }
.twp-switcher .twp-lang-btn.twp-active {
    background: #2271b1;
    border-color: #2271b1;
    color: #fff;
}

/* ─── Edit Mode ─── */
.twp-edit-active .twp-editable {
    cursor: pointer;
    outline: 1px dashed rgba(34, 113, 177, 0.4);
    border-radius: 2px;
    transition: outline .15s, background .15s;
}
.twp-edit-active .twp-editable:hover {
    outline: 2px solid #2271b1;
    background: rgba(34, 113, 177, 0.06);
}
.twp-edit-active .twp-editable.twp-translated { outline-color: #00a32a; }

/* ─── Popover ─── */
.twp-popover {
    position: absolute;
    z-index: 999999;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 8px 30px rgba(0,0,0,.18);
    width: 320px;
    padding: 0;
    overflow: hidden;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 13px;
}
.twp-pop-header {
    background: #1d2327;
    color: #fff;
    padding: 10px 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.twp-pop-close {
    background: none;
    border: none;
    color: #fff;
    cursor: pointer;
    font-size: 16px;
    line-height: 1;
    padding: 0;
    opacity: .7;
}
.twp-pop-close:hover { opacity: 1; }

.twp-pop-original {
    padding: 10px 14px;
    background: #f6f7f7;
    color: #666;
    font-size: 12px;
    border-bottom: 1px solid #ddd;
    max-height: 60px;
    overflow: hidden;
}
.twp-pop-input {
    width: 100%;
    padding: 10px 14px;
    border: none;
    border-bottom: 1px solid #eee;
    min-height: 70px;
    font-size: 13px;
    resize: vertical;
    box-sizing: border-box;
    outline: none;
}
.twp-pop-actions {
    padding: 10px 14px;
    display: flex;
    gap: 8px;
    justify-content: flex-end;
}
.twp-btn-auto {
    background: #f6f7f7;
    border: 1px solid #ddd;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
}
.twp-btn-auto:hover { background: #eee; }
.twp-btn-save {
    background: #2271b1;
    color: #fff;
    border: none;
    padding: 6px 14px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
}
.twp-btn-save:hover { background: #135e96; }

.twp-pop-msg {
    padding: 0 14px 10px;
    font-size: 12px;
    color: #00a32a;
    min-height: 18px;
}
