/* ═══════════════════════════════════════════════
   etjt-styles.css — Base Translator Styles
   No Tailwind. Pure CSS.
═══════════════════════════════════════════════ */

.etjt-translator {
    max-width: 1100px;
    margin: 0 auto;
    padding: 20px;
    background: #ffffff;
    font-family: Arial, Helvetica, sans-serif;
}

.etjt-translator * {
    font-family: Arial, Helvetica, sans-serif;
    box-sizing: border-box;
}

/* ── TOGGLES ── */
.etjt-toggles {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    margin-bottom: 16px;
    align-items: center;
}

.etjt-toggles label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 700;
    color: #111;
    cursor: pointer;
}

.etjt-toggles input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #3b82f6;
}

/* ── ROW LAYOUT ── */
.etjt-row {
    display: flex;
    flex-direction: row;
    gap: 0;
    align-items: stretch;
}

.etjt-col {
    flex: 1;
    display: flex;
    flex-direction: column;
    position: relative;
}

/* ── SWAP BUTTON WRAPPER ── */
.etjt-swap-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 12px;
}

/* ── HEADER BARS ── */
.etjt-header {
    padding: 10px 14px;
    background-color: #f0f0f0;
    font-weight: 700;
    font-size: 15px;
    text-align: center;
    border: 1px solid #d1d5db;
    border-bottom: none;
    border-radius: 4px 4px 0 0;
    color: #111;
}

/* ── INPUT TEXTAREA ── */
#etjt-input-text {
    width: 100%;
    padding: 14px;
    font-size: 1.5rem;
    min-height: 140px;
    border: 1px solid #d1d5db;
    border-radius: 0 0 4px 4px;
    resize: none;
    outline: none;
    background: #ffffff;
    color: #111;
    line-height: 1.4;
}

#etjt-input-text:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 2px rgba(59,130,246,0.15);
}

#etjt-input-text::placeholder {
    color: #999;
}

/* ── WORD COUNTER ── */
#etjt-word-counter {
    text-align: right;
    font-size: 13px;
    color: #444;
    margin-top: 6px;
    white-space: nowrap;
}

#etjt-word-counter a {
    color: #111;
    font-weight: 700;
    text-decoration: none;
}

/* ── SWAP BUTTON ── */
#etjt-swap-btn {
    background: #f0f0f0;
    border: 1px solid #ccc;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
}

#etjt-swap-btn:hover { background: #e0e0e0; }

/* ── OUTPUT BOX ── */
#etjt-output-box {
    border: 1px solid #d1d5db;
    border-radius: 0 0 4px 4px;
    padding: 16px;
    background: #ffffff;
    min-height: 140px;
    flex: 1;
}

/* ── ALIGNED VOCAB ── */
#etjt-aligned-vocab {
    white-space: pre;
    font-size: 2.25rem;
    font-weight: 700;
    color: #111;
    line-height: 1.6;
    margin: 0 0 12px 0;
    font-family: Arial, Helvetica, sans-serif;
    border: none;
    padding: 0;
    background: transparent;
}

/* ── PRONUNCIATION ROW ── */
.etjt-pronunciation-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
}

/* ── PRONUNCIATION ── */
#etjt-pronunciation {
    font-size: 1rem;
    color: #444;
    display: none;
}

/* ── TRANSLATION LINE ── */
#etjt-translation-line {
    font-size: 0.95rem;
    color: #444;
    margin-top: 4px;
}

/* ── AUDIO BUTTONS ── */
#etjt-input-audio-btn,
#etjt-translated-audio-btn {
    background: #f0f0f0;
    border: 1px solid #d1d5db;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 6px;
    margin-top: 8px;
}

#etjt-input-audio-btn:hover,
#etjt-translated-audio-btn:hover {
    background: #0073aa;
    border-color: #0073aa;
}

#etjt-input-audio-btn:hover svg,
#etjt-translated-audio-btn:hover svg {
    stroke: #ffffff;
}

/* ── LOADING SPINNER ── */
#etjt-loading-indicator {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.8);
}

.loader {
    border: 6px solid #f3f3f3;
    border-top: 6px solid #3b82f6;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0%   { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ── MOBILE ── */
@media (max-width: 640px) {
    .etjt-translator { padding: 12px; }
    .etjt-row { flex-direction: column; }
    .etjt-swap-wrap { padding: 8px 0; justify-content: center; }
    #etjt-aligned-vocab { font-size: 1.75rem; }
    #etjt-word-counter { font-size: 12px; }
}