/* language-select.css
   Standalone language chooser for the main trainee portal.
   Ported from the Nanny program's language page but self-contained: it carries its own
   colours/spacing so it does not depend on the nanny-* brand stylesheets. All selectors are
   prefixed (ls-*) so nothing leaks into the surrounding LeptonX layout. */

.ls-page {
    --ls-primary: #00666E;
    --ls-primary-dark: #004D54;
    --ls-text: #191C1E;
    --ls-text-muted: #3D494A;
    --ls-border: #CECECE;
    --ls-radius: 8px;
    --ls-transition: 0.25s ease;

    display: flex;
    justify-content: center;
    padding: 56px 24px;
}

.ls-container {
    width: 100%;
    max-width: 960px;
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 0;
}

.ls-header {
    text-align: center;
    margin-bottom: 40px;
}

.ls-title {
    font-size: 32px;
    font-weight: 600;
    color: var(--ls-text);
    margin-bottom: 12px;
}

.ls-subtitle {
    font-size: 18px;
    color: var(--ls-text-muted);
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.5;
}

.ls-alert {
    width: 100%;
    margin: 0 0 20px;
    padding: 10px 14px;
    border-radius: 10px;
    background: #FDECEC;
    color: #8A1C1C;
    font-size: 13px;
}

.ls-cards {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    width: 100%;
    margin-bottom: 32px;
}

.ls-card {
    cursor: pointer;
    position: relative;
    display: block;
    margin: 0;
}

.ls-radio {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.ls-card-content {
    background: var(--dw-white);
    border: 1.5px solid var(--ls-border);
    border-radius: var(--ls-radius);
    padding: 28px 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    transition: all var(--ls-transition);
    height: 100%;
}

.ls-card:hover .ls-card-content {
    border-color: var(--ls-primary);
}

.ls-radio:checked + .ls-card-content {
    border-color: var(--ls-primary);
    box-shadow: 0 0 0 1px var(--ls-primary) inset, 0 8px 24px rgba(0, 0, 0, 0.06);
}

.ls-code {
    font-size: 11px;
    font-weight: 700;
    color: #8C9899;
    margin-bottom: 12px;
    letter-spacing: 0.5px;
}

.ls-name-local {
    font-size: 24px;
    font-weight: 700;
    color: var(--ls-text);
    margin-bottom: 8px;
}

.ls-name-en {
    font-size: 15px;
    color: var(--ls-text-muted);
}

.ls-ai-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-top: 8px;
    padding: 2px 8px;
    border-radius: 999px;
    background: var(--dw-teal-l);
    color: var(--ls-primary);
    font-size: 10.5px;
    font-weight: 600;
}

.ls-selected-check {
    display: none;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    bottom: -22px;
    color: var(--ls-primary);
    font-weight: 700;
}

.ls-radio:checked ~ .ls-selected-check {
    display: inline-flex;
}

/* Info box */
.ls-info {
    background: rgba(0, 102, 110, 0.05);
    border: 1px solid rgba(0, 102, 110, 0.2);
    border-radius: var(--ls-radius);
    padding: 18px 20px;
    display: flex;
    gap: 14px;
    width: 100%;
    align-items: flex-start;
    margin-bottom: 40px;
}

.ls-info-icon {
    flex-shrink: 0;
    padding-top: 2px;
}

.ls-info-text {
    font-size: 13.5px;
    color: var(--ls-text-muted);
    line-height: 1.6;
    margin: 0;
}

/* Footer actions */
.ls-actions {
    display: flex;
    justify-content: flex-end;
    width: 100%;
    gap: 16px;
    padding-top: 24px;
    border-top: 1px solid rgba(188, 201, 202, 0.4);
}

.ls-btn-back,
.ls-btn-confirm {
    font-weight: 500;
    padding: 12px 32px;
    border-radius: var(--ls-radius);
    font-size: 14.5px;
    line-height: 1.2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background var(--ls-transition);
}

.ls-btn-back {
    background: var(--dw-white);
    border: 1px solid var(--ls-text-muted);
    color: var(--ls-text-muted);
}

.ls-btn-back:hover {
    background: var(--dw-surf);
}

.ls-btn-confirm {
    background: var(--ls-primary);
    border: 1px solid var(--ls-primary);
    color: #FFFFFF;
}

.ls-btn-confirm:hover {
    background: var(--ls-primary-dark);
    color: #FFFFFF;
}

/* RTL: the check pin and actions mirror naturally via flex; nothing extra required. */

/* Responsive */
@media (max-width: 900px) {
    .ls-cards {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .ls-cards {
        grid-template-columns: 1fr;
    }

    .ls-actions {
        flex-direction: column-reverse;
    }

    .ls-btn-back,
    .ls-btn-confirm {
        width: 100%;
    }
}
