/**
 * バイト変換ツール - 専用スタイル
 * Byte Converter Tool Specific Styles
 */

/* 入力エリア */
.byte-input-wrapper {
    display: flex;
    gap: 12px;
}

.byte-input {
    flex: 1;
    padding: 14px;
    font-size: 18px;
    font-family: var(--font-display);
    font-weight: 500;
    color: var(--color-text);
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    text-align: right;
}

.byte-input:focus {
    outline: none;
    border-color: var(--color-primary);
}

.byte-input::placeholder {
    color: var(--color-text-muted);
    font-weight: 400;
}

.byte-select {
    width: 180px;
    padding: 14px 16px;
    font-size: 14px;
    font-weight: 500;
    color: var(--color-text);
    background: var(--color-white);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23666666' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 40px;
}

.byte-select:focus {
    outline: none;
    border-color: var(--color-primary);
}

/* 結果セクション */
.result-section {
    padding: 20px;
    background: var(--color-bg);
    border-bottom: 1px solid var(--color-border);
}

.result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.result-label {
    font-size: 14px;
    font-weight: 500;
    color: var(--color-text);
}

.result-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.result-item {
    background: var(--color-white);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: 14px 16px;
}

.result-item.highlight {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 1px var(--color-primary);
}

.result-unit-label {
    display: block;
    font-size: 12px;
    color: var(--color-text-muted);
    margin-bottom: 6px;
}

.result-value-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
}

.result-value {
    font-family: var(--font-display);
    font-size: 16px;
    font-weight: 700;
    color: var(--color-primary-dark);
    word-break: break-all;
    line-height: 1.4;
}

.btn-copy {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: 6px;
    color: var(--color-text-muted);
    cursor: pointer;
    transition: all 0.2s;
}

.btn-copy:hover {
    background: var(--color-border);
    color: var(--color-text);
}

.btn-copy:active {
    transform: scale(0.95);
}

/* ビット換算セクション */
.bits-section {
    padding: 16px 20px;
    border-bottom: 1px solid var(--color-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
}

.bits-header {
    display: flex;
    align-items: center;
}

.bits-label {
    font-size: 13px;
    color: var(--color-text-muted);
}

.bits-value-wrapper {
    display: flex;
    align-items: baseline;
    gap: 6px;
}

.bits-value {
    font-family: var(--font-display);
    font-size: 16px;
    font-weight: 700;
    color: var(--color-text);
}

.bits-unit {
    font-size: 13px;
    color: var(--color-text-muted);
}

/* 参照テーブル */
.reference-table {
    width: 100%;
}

.reference-row {
    display: flex;
    padding: 12px 0;
    border-bottom: 1px solid var(--color-border);
}

.reference-row:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.reference-row.reference-header {
    padding-top: 0;
}

.reference-row.reference-header .reference-cell {
    font-weight: 500;
    color: var(--color-text);
    font-size: 13px;
}

.reference-cell {
    font-size: 14px;
    color: var(--color-text-secondary);
    line-height: 1.6;
}

.reference-cell:first-child {
    flex: 1;
}

.reference-cell:last-child {
    width: 140px;
    text-align: right;
    font-family: var(--font-display);
    font-weight: 500;
    color: var(--color-text);
}

/* レスポンシブ対応 */
@media (max-width: 600px) {
    .byte-input-wrapper {
        flex-direction: column;
        gap: 10px;
    }

    .byte-input {
        font-size: 16px;
        text-align: left;
    }

    .byte-select {
        width: 100%;
    }

    .result-grid {
        grid-template-columns: 1fr;
    }

    .result-value {
        font-size: 15px;
    }

    .bits-section {
        flex-direction: column;
        align-items: flex-start;
    }

    .reference-row {
        flex-direction: column;
        gap: 4px;
    }

    .reference-cell:last-child {
        width: auto;
        text-align: left;
    }

    .reference-row.reference-header {
        display: none;
    }

    .reference-row:first-of-type:not(.reference-header) {
        padding-top: 0;
    }
}
