/* IPADrill.css — R-tier symbol highlighting + popup drill modal */

.ipa-unknown {
    cursor: pointer;
    color: #c44;
    border-bottom: 2px dotted #c44;
    padding: 0 1px;
    transition: background 0.15s;
}
.ipa-unknown:hover {
    background: rgba(204, 68, 68, 0.12);
}
.ipa-known {
    color: inherit;
}

.ipa-drill-overlay {
    position: fixed; top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 2000;
    display: flex; align-items: center; justify-content: center;
}
.ipa-drill-modal {
    background: #fff;
    border-radius: 12px;
    padding: 1.5em;
    min-width: 300px;
    max-width: 90vw;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 8px 32px rgba(0,0,0,0.3);
}
.ipa-drill-close {
    position: absolute; top: 8px; right: 12px;
    background: none; border: none; font-size: 1.5em;
    cursor: pointer; color: #888; line-height: 1;
}
.ipa-drill-close:hover { color: #333; }
.ipa-drill-container {
    margin-top: 0.5em;
    text-align: center;
}
.ipa-drill-play {
    display: inline-block;
    padding: 0.5em 1.2em;
    font-size: 1.2em;
    background: #2a7;
    color: #fff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    margin-bottom: 1em;
}
.ipa-drill-play:hover { background: #1a6; }
.ipa-drill-options {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5em;
    justify-content: center;
}
.ipa-drill-opt {
    padding: 0.6em 1em;
    font-size: 1.6em;
    min-width: 3em;
    background: #f5f5f5;
    border: 2px solid #ccc;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
    font-family: 'Noto Sans', 'DejaVu Sans', sans-serif;
}
.ipa-drill-opt:hover {
    background: #e8f5ef;
    border-color: #2a7;
}
.ipa-drill-result {
    padding: 1em;
    font-family: 'Noto Sans', 'DejaVu Sans', sans-serif;
}

/* Placement test */
.ipa-placement-modal {
    max-width: 95vw;
    width: 900px;
    max-height: 90vh;
}
.ipa-placement-container { text-align: center; }
.ipa-placement-intro {
    text-align: left;
    padding: 0.5em;
    line-height: 1.6;
}
.ipa-placement-intro h3 { color: #2a7; margin: 0 0 0.5em; }
.ipa-placement-intro p { margin: 0.5em 0; font-size: 0.95em; color: #444; }

.ipa-placement-status {
    font-size: 0.9em;
    color: #555;
    padding: 0.3em 0;
    font-weight: bold;
}
.ipa-placement-prompt {
    margin: 0.3em 0;
}
.ipa-placement-timer-wrap {
    height: 5px;
    background: #eee;
    border-radius: 3px;
    margin: 0.3em 1em;
    overflow: hidden;
}
.ipa-placement-timer-bar {
    height: 100%;
    width: 100%;
    background: #2a7;
    border-radius: 3px;
    transition: width 50ms linear, background 0.3s;
}

.ipa-placement-grid-wrap {
    text-align: left;
    padding: 0.3em 0;
}
.ipa-placement-section {
    margin: 0.3em 0;
}
.ipa-placement-group-label {
    font-size: 0.75em;
    color: #888;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.2em 0.3em;
}
.ipa-placement-row {
    display: flex;
    flex-wrap: wrap;
    gap: 3px;
}
.ipa-placement-cell {
    width: 2.6em;
    height: 2.4em;
    font-size: 1em;
    background: #f5f5f5;
    border: 1.5px solid #ccc;
    border-radius: 4px;
    cursor: pointer;
    font-family: 'Noto Sans', 'DejaVu Sans', sans-serif;
    transition: background 0.15s, border-color 0.15s;
    padding: 0;
    line-height: 2.4em;
    text-align: center;
}
.ipa-placement-cell:hover {
    background: #e8f5ef;
    border-color: #2a7;
}
.ipa-placement-cell.ipa-pl-known {
    background: #e8f5ef;
    border-color: #8cb;
    color: #5a8;
}
.ipa-placement-cell.ipa-pl-confirmed {
    background: #def0ff;
    border-color: #69b;
    color: #357;
}
.ipa-placement-cell.ipa-pl-right {
    background: #c5f0c5 !important;
    border-color: #2a7 !important;
    color: #000 !important;
}
.ipa-placement-cell.ipa-pl-wrong {
    background: #fdd !important;
    border-color: #c44 !important;
}
.ipa-placement-legend {
    font-size: 0.7em;
    color: #888;
    padding: 3px 0;
    text-align: center;
}
.ipa-pl-swatch {
    display: inline-block;
    width: 1em; height: 1em;
    border: 1px solid #ccc;
    border-radius: 3px;
    vertical-align: middle;
    margin: 0 2px 0 8px;
    background: #f5f5f5;
}
.ipa-pl-swatch.ipa-pl-known { background: #e8f5ef; border-color: #8cb; }
.ipa-pl-swatch.ipa-pl-confirmed { background: #def0ff; border-color: #69b; }
.ipa-pl-swatch.ipa-pl-marked-unknown { background: #eee; border-color: #bbb; opacity: 0.5; }

.ipa-placement-cell.ipa-pl-marked-unknown {
    opacity: 0.35;
    background: #e8e8e8;
    border-color: #bbb;
    color: #aaa;
}
.ipa-placement-cell.ipa-pl-struck {
    opacity: 0.15;
    pointer-events: none;
}
.ipa-mark-panel {
    text-align: center;
    padding: 0.3em;
}

/* IPA chart tables (consonant + vowel) */
.ipa-chart-table {
    border-collapse: collapse;
    margin: 0 auto;
}
.ipa-chart-table th {
    font-size: 0.65em;
    color: #888;
    font-weight: bold;
    padding: 1px 2px;
    text-align: center;
    white-space: nowrap;
}
.ipa-chart-table tbody th {
    text-align: right;
    padding-right: 4px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}
.ipa-chart-table td {
    text-align: center;
    padding: 1px;
    vertical-align: middle;
    border: 1px solid #eee;
    white-space: nowrap;
}
.ipa-chart-table .ipa-placement-cell {
    width: 2em;
    height: 2em;
    font-size: 0.95em;
    line-height: 2em;
    min-width: unset;
    margin: 1px;
}
.ipa-vowel-table { margin-top: 0.3em; }
.ipa-vowel-table td { min-width: 40px; white-space: normal; }
.ipa-placement-grid-wrap { overflow-x: auto; }

@media (max-width: 500px) {
    .ipa-placement-cell { width: 2.2em; height: 2.2em; font-size: 0.9em; line-height: 2.2em; }
    .ipa-chart-table .ipa-placement-cell { width: 1.7em; height: 1.7em; font-size: 0.8em; line-height: 1.7em; }
}
