/* styles/panel.css — левая панель: координаты, результаты, настройки, Discord */

.panel {
    width: var(--panel-width);
    flex-shrink: 0;
    background: var(--panel);
    border-right: 1px solid var(--border);
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 18px;
    overflow-y: auto;
}

.panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.menu-toggle {
    background: none;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text);
    width: 32px;
    height: 32px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.menu-toggle:hover {
    background: var(--hover);
}

.coord-row {
    display: grid;
    grid-template-columns: 1fr 1fr auto;
    gap: 8px;
    align-items: flex-end;
}

.coord-row label {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 13px;
    color: var(--muted);
}

input[type="number"] {
    width: 100%;
    background: var(--field);
    border: 1px solid var(--border);
    color: var(--text);
    padding: 8px 10px;
    border-radius: var(--radius-sm);
    font-size: 15px;
}

input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: inner-spin-button;
    opacity: 1;
    cursor: pointer;
    height: 26px;
}

input[type="number"]::-webkit-outer-spin-button {
    -webkit-appearance: none;
}

input[type="number"]:focus {
    outline: none;
    border-color: var(--accent);
}

input[type="number"]:invalid {
    border-color: var(--danger);
}

.clear {
    background: none;
    border: none;
    color: var(--dim);
    font-size: 16px;
    cursor: pointer;
    padding: 8px 2px;
    line-height: 1;
}

.clear:hover {
    color: var(--danger);
}

.result {
    background: var(--field);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 14px;
    display: grid;
    gap: 10px;
}

.result div {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
    gap: 12px;
}

.result span {
    color: var(--muted);
    flex-shrink: 0;
}

.result b {
    color: var(--accent);
    font-variant-numeric: tabular-nums;
    text-align: right;
    word-break: break-word;
}

.result b.oor {
    color: var(--danger);
}

.result b.warn {
    color: var(--warn);
}

.controls-section {
    background: var(--field);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 12px 14px;
}

.controls-section h2 {
    margin-bottom: 12px;
}

.control-group {
    margin-bottom: 14px;
}

.control-group:last-child {
    margin-bottom: 0;
}

.control-label {
    display: block;
    font-size: 11px;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: .06em;
    margin-bottom: 6px;
    font-weight: 600;
}

.radio-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.radio-option {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    padding: 4px 0;
}

.radio-option input[type="radio"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
    accent-color: var(--accent);
    margin: 0;
}

.radio-option input[type="radio"]:disabled {
    cursor: not-allowed;
}

.radio-option span {
    font-size: 13px;
    color: var(--text);
    cursor: pointer;
}

.hint {
    font-size: 12px;
    color: var(--dim);
    line-height: 1.6;
}

.contact {
    background: var(--field);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 10px 12px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.contact-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--muted);
}

.contact-email {
    color: var(--accent);
    text-decoration: none;
    font-size: 13px;
    font-family: monospace;
    word-break: break-all;
    transition: color .15s ease;
}

.contact-email:hover {
    color: var(--accent-hover);
    text-decoration: underline;
}

.discord-block {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.discord-qr {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    text-decoration: none;
    background: var(--field);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 10px;
    transition: border-color .15s ease;
}

.discord-qr:hover {
    border-color: var(--accent);
}

.discord-qr img {
    width: 200px;
    height: 200px;
    border-radius: var(--radius-sm);
    background: #fff;
    padding: 6px;
}

.discord-qr span {
    font-size: 12px;
    color: var(--muted);
}

.discord-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 12px 16px;
    background: var(--discord);
    color: #fff;
    border-radius: var(--radius-md);
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    transition: background .15s ease, transform .1s ease;
    box-shadow: 0 2px 8px rgba(88, 101, 242, .3);
}

.discord-btn:hover {
    background: var(--discord-hover);
}

.discord-btn:active {
    transform: translateY(1px);
}

.discord-btn svg {
    flex-shrink: 0;
}

.translate-widget {
    margin-top: auto;
    padding-top: 16px;
    border-top: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.translate-widget label {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--muted);
}

.translate-widget select {
    background: var(--field);
    border: 1px solid var(--border);
    color: var(--text);
    padding: 8px 10px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    cursor: pointer;
}

.translate-widget select:focus {
    outline: none;
    border-color: var(--accent);
}

.draw-tools-section {
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid var(--border);
}

.draw-tools-section h2 {
    font-size: 14px;
    color: var(--muted);
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.tool-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 6px;
    margin-bottom: 10px;
}

.draw-tool {
    height: 36px;
    border: 1px solid var(--border);
    background: var(--field);
    color: var(--text);
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    user-select: none;
}

.draw-tool:hover {
    background: var(--hover);
    border-color: var(--dim);
}

.draw-tool.active {
    border-color: var(--accent);
    background: rgba(159, 211, 86, 0.12);
    box-shadow: 0 0 0 1px var(--accent);
}

.lobby-section {
    background: var(--field);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 12px 14px;
    margin-top: 8px;
}

.lobby-section h3 {
    margin: 0 0 10px 0;
    font-size: 14px;
    color: var(--text);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.lobby-info {
    font-size: 13px;
    color: var(--muted);
    margin-bottom: 10px;
    font-family: monospace;
}

.lobby-players {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 12px;
    max-height: 150px;
    overflow-y: auto;
}

.lobby-section .view-reset {
    width: 100%;
    text-align: center;
}

.width-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 10px;
}

.width-label {
    font-size: 11px;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: .06em;
}

.width-grid {
    display: flex;
    gap: 6px;
}

.width-opt {
    width: 32px;
    height: 24px;
    border: 1px solid var(--border);
    background: var(--field);
    border-radius: var(--radius-sm);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text);
}

.width-opt span {
    display: block;
    width: 16px;
    background: currentColor;
    border-radius: 1px;
}

.width-opt .w1 {
    height: 1px;
}

.width-opt .w2 {
    height: 2px;
}

.width-opt .w4 {
    height: 4px;
}

.width-opt:hover {
    background: var(--hover);
}

.width-opt.active {
    border-color: var(--accent);
    box-shadow: 0 0 0 1px var(--accent);
}