/** 
 * CONTENTS
 *
 * BASE
 * PAGE LAYOUT
 * INPUT CARD
 * TABLE
 * BUTTON TYPES
 * MODIFIERS
 * SIZE / MODE
 */

/*------------------------------------*\
    FONTS
\*------------------------------------*/

@font-face {
    font-family: 'Outfit';
    font-style: normal;
    font-weight: 400;
    src: url('../fonts/Outfit-latin-ext.woff2') format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
    font-family: 'Outfit';
    font-style: normal;
    font-weight: 400;
    src: url('../fonts/Outfit-latin.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
    font-family: 'Outfit';
    font-style: normal;
    font-weight: 500;
    src: url('../fonts/Outfit-latin-ext.woff2') format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
    font-family: 'Outfit';
    font-style: normal;
    font-weight: 500;
    src: url('../fonts/Outfit-latin.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
    font-family: 'Outfit';
    font-style: normal;
    font-weight: 600;
    src: url('../fonts/Outfit-latin-ext.woff2') format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
    font-family: 'Outfit';
    font-style: normal;
    font-weight: 600;
    src: url('../fonts/Outfit-latin.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
    font-family: 'Outfit';
    font-style: normal;
    font-weight: 700;
    src: url('../fonts/Outfit-latin-ext.woff2') format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
    font-family: 'Outfit';
    font-style: normal;
    font-weight: 700;
    src: url('../fonts/Outfit-latin.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/*------------------------------------*\
    BASE
\*------------------------------------*/

*, *::before, *::after { box-sizing: border-box; }

body {
    background-color: #f8f9fb;
    font-family: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
    color: #1e293b;
    margin: 0;
    padding: 0;
    height: 100vh;
    overflow: hidden;
    user-select: none;
}

/*------------------------------------*\
    PAGE LAYOUT
\*------------------------------------*/

.page-wrapper {
    display: flex;
    flex-direction: column;
    height: 100vh;
    margin: 0 auto;
    padding: 0.1rem 0.1rem 0.1rem;
}

/*------------------------------------*\
    INPUT CARD
\*------------------------------------*/

.input-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 0.5rem;
    margin-bottom: 0.5rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

.input-card .input-label {
    font-size: 0.7rem;
    font-weight: 600;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 0.5rem;
    text-align: center;
}

.input-card form {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    margin: 0;
}

.input-card form > div {
    max-width: 100%;
    flex: 0 0 0 0;
    width: 25%;
    padding: 0;
}

@media (max-width: 1199px) {
    .input-card form > div { width: 33.333%; }
}
@media (max-width: 991px) {
    .input-card form > div { width: 41.667%; }
}
@media (max-width: 767px) {
    .input-card form > div { width: 50%; }
}

.form-control {
    display: block;
    width: 100%;
    font-family: 'Outfit', monospace;
    font-weight: 700;
    letter-spacing: 0.25em;
    color: #1e293b;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    text-align: center;
    padding: 0.5rem 1rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.form-control:focus {
    outline: none;
    border-color: #94a3b8;
    box-shadow: 0 0 0 3px rgba(148, 163, 184, 0.15);
}

.keyboard-section {
    margin-top: 1rem;
}

/*------------------------------------*\
    TABLE
\*------------------------------------*/

.table-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
}

.table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 0;
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
}

.table thead {
    flex-shrink: 0;
}

.table tbody {
    flex: 1;
    overflow-y: auto;
    display: block;
}

.table thead tr,
.table tbody tr {
    display: table;
    width: 100%;
    table-layout: fixed;
}

.table thead th {
    background-color: #000000;
    color: #f1f5f9;
    font-weight: 600;
    font-size: 0.75rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    padding: 0.85rem 0.75rem;
    border: none;
    position: sticky;
    top: 0;
    z-index: 10;
    text-align: left;
}

.table tbody td,
.table tbody th {
    vertical-align: middle;
    font-size: 0.95rem;
    line-height: 1.4;
    padding: 0.6rem 0.75rem;
    border-bottom: 1px solid #f1f5f9;
    color: #000000;
    text-align: left;
    font-weight: normal;
}

.table tbody tr:hover {
    background-color: #f8fafc;
}

.table tbody tr:last-child td,
.table tbody tr:last-child th {
    color: #cbd5e1;
}

.table tbody tr:nth-child(even) {
    background-color: #fafbfc;
}
.table tbody tr:nth-child(even):hover {
    background-color: #f1f5f9;
}

.table tbody th .my_badge {
    font-family: 'Outfit', monospace;
    font-size:0.95rem;
    letter-spacing: 0.08em;
}

/* Badges for ENG / CHI call signs */
.badge-eng {
    display: inline-block;
    padding: 0.25em 0.6em;
    border-radius: 0.4rem;
    background-color: #eff6ff;
    color: #1d4ed8;
    font-weight: 600;
    font-size: 0.95rem;
}

.badge-chi {
    display: inline-block;
    padding: 0.25em 0.6em;
    border-radius: 0.4rem;
    background-color: #f0fdf4;
    color: #15803d;
    font-weight: 600;
    font-size: 0.95rem;
}

.results-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.65rem 1rem;
    border-top: 1px solid #f1f5f9;
    font-size: 0.7rem;
    color: #94a3b8;
    flex-shrink: 0;
}
.results-info .dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #22c55e;
    display: inline-block;
    margin-right: 6px;
}

/*------------------------------------*\
    SOFTKEYS BASE
\*------------------------------------*/

.softkeys {
    display: table;
    list-style: none;
    margin: auto;
    padding: 0;
    width: 100%;
    text-align: center;
    font-size: 1em;
    -webkit-user-select: none;
       -moz-user-select: none;
        -ms-user-select: none;
            user-select: none;
    -webkit-touch-callout: none;
}

    .softkeys__btn {
        display: inline-block;
        text-align: center;
        font-size: 1em;
        line-height: 2.2em;
        min-width: 3.2em;
        padding: 0 0.2em;
        margin: 0 0.1em 0.1em 0.1em;
        border: 1px solid #d1d5db;
        border-radius: 10px;
        cursor: pointer;
        background: #ffffff;
        color: #374151;
        font-weight: 600;
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
        transition: all 0.2s ease;
    }

        .softkeys__btn:hover, .softkeys__btn:focus {
            outline: none;
            background: #1e293b;
            border-color: #1e293b;
            color: #fff;
            transform: translateY(-2px);
            box-shadow: 0 4px 12px rgba(30, 41, 59, 0.25);
        }
        
        .softkeys__btn:active {
            transform: translateY(0px);
            box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
        }

        /* Delete key - red accent */
        .softkeys__btn[data-type="delete"] {
            background: #fef2f2;
            border-color: #fecaca;
            color: #dc2626;
        }
        .softkeys__btn[data-type="delete"]:hover,
        .softkeys__btn[data-type="delete"]:focus {
            background: #dc2626;
            border-color: #dc2626;
            color: #fff;
            box-shadow: 0 4px 12px rgba(220, 38, 38, 0.25);
        }
        .softkeys__btn[data-type="delete"]:active {
            background: #b91c1c;
            border-color: #b91c1c;
            box-shadow: 0 1px 3px rgba(185, 28, 28, 0.2);
        }

        .softkeys__btn span {
            display: none;
        }
            .softkeys__btn span:first-child {
                display: block;
            }

    .softkeys__new-row:before {
        display: block;
        content: ' ';
        width: 100%;
    }

/*------------------------------------*\
    BUTTON TYPES
\*------------------------------------*/

.softkeys__btn--space {
    width: 30em;
}

/*------------------------------------*\
    SIZE MODIFIERS
\*------------------------------------*/

.softkeys--sm { font-size: 1em; }
.softkeys--md { font-size: 1.1em; }
.softkeys--lg { font-size: 1.3em; }
.softkeys--xl { font-size: 1.5em; }

/*------------------------------------*\
    MODE MODIFIERS
\*------------------------------------*/

.softkeys--caps .softkeys__btn[data-type=capslock] {
    background: #1e293b;
    border-color: #1e293b;
    color: #fff;
    box-shadow: 0 4px 12px rgba(30, 41, 59, 0.25);
}

.softkeys--caps .softkeys__btn[data-type=letter] {
    text-transform: uppercase;
}

.softkeys--alt .softkeys__btn[data-type=shift] {
    background: #1e293b;
    border-color: #1e293b;
    color: #fff;
    box-shadow: 0 4px 12px rgba(30, 41, 59, 0.25);
}

.softkeys--alt .softkeys__btn[data-type=symbol] span {
    display: none;
}

.softkeys--alt .softkeys__btn[data-type=symbol] span:last-child {
    display: block;
}

.my_badge {
    display: inline-block;
    padding: 0.4em 0.8em;
    font-weight: 700;
    line-height: 1;
    text-align: center;
    white-space: nowrap;
    vertical-align: baseline;
    border-radius: 0.5rem;
    background: #000000;
    color: #fff;
    box-shadow: 0 2px 6px rgba(30, 41, 59, 0.2);
    transition: all 0.2s ease;
}
