/* === TRANSLATE PAGE === */

.btn-back-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    color: #333;
    text-decoration: none;
    margin-right: 8px;
    transition: background 0.2s;
}
.btn-back-link:hover { background: #f0f0f0; }

.home-topbar-left {
    display: flex;
    align-items: center;
}

.translate-state {
    padding: 16px 20px 32px;
    max-width: 820px;
    margin: 0 auto;
}

/* === Intro === */
.translate-intro {
    text-align: center;
    margin: 12px 0 20px;
}
.translate-intro h2 {
    font-size: 1.5rem;
    font-weight: 800;
    color: #1F3864;
    margin: 0 0 6px;
}
.translate-intro p {
    color: #666;
    font-size: 0.92rem;
    line-height: 1.5;
    margin: 0 auto;
    max-width: 560px;
}

/* === Target language pills === */
.lang-choice {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}
.lang-choice-label {
    font-size: 0.9rem;
    font-weight: 600;
    color: #555;
}
.lang-pills {
    display: inline-flex;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 999px;
    padding: 3px;
}
.lang-pill {
    background: transparent;
    border: none;
    padding: 7px 20px;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 600;
    color: #666;
    cursor: pointer;
    transition: all 0.2s;
}
.lang-pill:hover { color: #1F3864; }
.lang-pill.active {
    background: #007A3D;
    color: #fff;
}

/* === Dropzone === */
.dropzone {
    background: #fff;
    border: 2px dashed #d0d0d0;
    border-radius: 16px;
    padding: 40px 20px;
    text-align: center;
    transition: all 0.25s;
    position: relative;
    overflow: hidden;
}
.dropzone:hover {
    border-color: #007A3D;
    background: #f0faf4;
}
.dropzone.dragover {
    border-color: #007A3D;
    background: #e8f7ee;
    transform: scale(1.01);
}
.dropzone input[type="file"] {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}
.dropzone-inner {
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: #777;
}
.dropzone-inner svg {
    color: #007A3D;
    opacity: 0.75;
    margin-bottom: 6px;
}
.dropzone-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: #1F3864;
    margin: 0;
}
.dropzone-hint {
    font-size: 0.88rem;
    color: #888;
    margin: 0;
}
.dropzone-formats {
    font-size: 0.78rem;
    color: #999;
    margin: 6px 0 0;
}

/* === Processing / stepper === */
.processing-box {
    background: #fff;
    border-radius: 16px;
    padding: 32px 24px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.04);
    text-align: center;
}
.processing-box h2 {
    font-size: 1.2rem;
    font-weight: 700;
    color: #1F3864;
    margin: 0 0 24px;
}
.stepper {
    list-style: none;
    padding: 0;
    margin: 0 auto;
    max-width: 380px;
    text-align: left;
}
.step {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    color: #aaa;
    font-size: 0.92rem;
    transition: color 0.2s;
}
.step-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #e0e0e0;
    flex-shrink: 0;
    transition: all 0.25s;
}
.step.active {
    color: #1F3864;
    font-weight: 600;
}
.step.active .step-dot {
    background: #007A3D;
    box-shadow: 0 0 0 4px rgba(0, 122, 61, 0.15);
    animation: pulse-dot 1.2s ease-in-out infinite;
}
.step.done {
    color: #555;
}
.step.done .step-dot {
    background: #007A3D;
}
.step.done .step-dot::after {
    content: '';
    display: block;
    width: 4px;
    height: 7px;
    border-right: 2px solid #fff;
    border-bottom: 2px solid #fff;
    transform: rotate(45deg) translate(-1px, -1px);
    margin: 1px 0 0 3px;
}
@keyframes pulse-dot {
    0%, 100% { transform: scale(1); }
    50%      { transform: scale(1.25); }
}
.processing-file {
    margin-top: 20px;
    font-size: 0.82rem;
    color: #999;
    font-style: italic;
    word-break: break-all;
}

/* === Confirm step === */
.confirm-box {
    background: #fff;
    border-radius: 16px;
    padding: 28px 24px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.04);
    max-width: 520px;
    margin: 0 auto;
}
.confirm-box h2 {
    font-size: 1.2rem;
    font-weight: 700;
    color: #1F3864;
    margin: 0 0 8px;
}
.confirm-subtitle {
    color: #666;
    font-size: 0.9rem;
    margin: 0 0 20px;
    line-height: 1.5;
}
.detected-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #f0faf4;
    border-left: 3px solid #007A3D;
    padding: 12px 14px;
    border-radius: 6px;
    margin-bottom: 18px;
    font-size: 0.92rem;
    flex-wrap: wrap;
}
.detected-label {
    font-weight: 700;
    color: #007A3D;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.detected-type {
    font-weight: 600;
    color: #1F3864;
}
.detected-confidence {
    color: #999;
    font-size: 0.85rem;
}
.confirm-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 18px;
}

/* === Review state === */
.review-strip {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    background: #fff;
    border-radius: 12px;
    padding: 12px 16px;
    margin-bottom: 16px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.04);
    flex-wrap: wrap;
}
.review-strip-left {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.review-strip-label {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    color: #999;
    letter-spacing: 0.5px;
}
.review-strip-type {
    font-weight: 700;
    color: #1F3864;
}
.review-change-type {
    background: transparent;
    border: 1px solid #e0e0e0;
    color: #666;
    padding: 3px 10px;
    border-radius: 14px;
    font-size: 0.78rem;
    cursor: pointer;
    transition: all 0.2s;
}
.review-change-type:hover {
    border-color: #007A3D;
    color: #007A3D;
}
.review-strip-lang {
    font-weight: 700;
    color: #007A3D;
    font-size: 0.95rem;
}
.review-intro {
    color: #666;
    font-size: 0.88rem;
    margin: 0 0 18px;
    text-align: center;
}

/* === Source administration collapsible === */
.source-admin {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 12px;
    padding: 0;
    overflow: hidden;
}
.source-admin-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    cursor: pointer;
    transition: background 0.15s;
    gap: 12px;
}
.source-admin-header:hover {
    background: #fafafa;
}
.source-admin-summary {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
    flex: 1;
}
.source-admin-label {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    color: #888;
    letter-spacing: 0.5px;
}
.source-admin-value {
    font-size: 0.9rem;
    color: #1F3864;
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.source-admin-toggle {
    background: none;
    border: none;
    color: #999;
    padding: 4px;
    cursor: pointer;
    transition: transform 0.2s;
    flex-shrink: 0;
}
.source-admin-toggle.expanded svg {
    transform: rotate(180deg);
}
.source-admin-body {
    padding: 8px 16px 16px;
    border-top: 1px solid #f0f0f0;
}
.source-admin-hint {
    font-size: 0.82rem;
    color: #888;
    margin: 10px 0 14px;
    line-height: 1.5;
    background: #fff9e6;
    padding: 8px 12px;
    border-radius: 6px;
    border-left: 3px solid #f0b40e;
}
.source-admin-actions {
    margin-top: 10px;
    display: flex;
    justify-content: flex-end;
}

/* Source level rows */
.source-level-row {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 6px;
}
.source-level-index {
    font-size: 0.82rem;
    color: #999;
    font-weight: 600;
    width: 22px;
    text-align: right;
    flex-shrink: 0;
}
.source-level-row .form-input {
    flex: 1;
    min-width: 0;
}

/* Responsive: stack level inputs on narrow screens */
@media (max-width: 560px) {
    .source-level-row {
        flex-wrap: wrap;
    }
    .source-level-row .source-level-fr,
    .source-level-row .source-level-en {
        flex-basis: 100%;
    }
    .source-level-index {
        width: auto;
    }
}
