/* Hangul Match: compact direction switch */
.hm-direction-switch {
    appearance: none;
    width: min(100%, 540px);
    min-height: 62px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 84px minmax(0, 1fr);
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border: 1px solid #d6eaff;
    border-radius: 18px;
    background: #f8fbff;
    color: #12263a;
    cursor: pointer;
    box-shadow: 0 8px 24px rgba(18, 101, 184, .06);
    -webkit-tap-highlight-color: transparent;
}

.hm-direction-switch:hover {
    border-color: #9dceff;
    background: #f4f9ff;
}

.hm-direction-switch:focus-visible {
    outline: 3px solid rgba(50, 158, 255, .22);
    outline-offset: 3px;
}

.hm-direction-side {
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
}

.hm-direction-side small {
    font-size: 10px;
    line-height: 1.2;
    color: #8393a4;
    font-weight: 800;
    letter-spacing: .08em;
}

.hm-direction-side strong {
    position: relative;
    z-index: 2;
    display: inline-block;
    font-size: 14px;
    line-height: 1.3;
    color: #1265b8;
    font-weight: 900;
    white-space: nowrap;
    will-change: transform, opacity;
}

.hm-direction-swap {
    width: 64px;
    height: 44px;
    justify-self: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0;
    border-radius: 999px;
    background: #eaf4ff;
    color: #1265b8;
}

.hm-direction-swap span {
    display: inline-block;
    font-size: 23px;
    line-height: 1;
    font-weight: 900;
    will-change: transform;
}

.hm-direction-swap small {
    margin-top: 1px;
    font-size: 8px;
    line-height: 1;
    color: #6482a0;
    font-weight: 800;
}

.hm-translator-direction-row {
    align-items: center;
}

@media (max-width: 767px) {
    .hm-translator-direction-row {
        gap: 10px;
    }

    .hm-direction-switch {
        width: 100%;
        min-height: 56px;
        grid-template-columns: minmax(0, 1fr) 68px minmax(0, 1fr);
        padding: 6px 8px;
        border-radius: 15px;
    }

    .hm-direction-side strong {
        font-size: 13px;
    }

    .hm-direction-swap {
        width: 56px;
        height: 40px;
    }

    .hm-direction-swap span {
        font-size: 21px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .hm-direction-side strong,
    .hm-direction-swap span {
        animation: none !important;
        transition: none !important;
    }
}
