/* ToolZoo - Weight Unit Converter Styles */

.toolzoo-weight-container {
    max-width: 600px;
    margin: 20px 0;
    padding: 24px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background: #f9f9f9;
    font-family: Arial, sans-serif;
    box-sizing: border-box;
}

/* ヘッダー */
.toolzoo-weight-header h3 {
    margin: 0 0 20px 0;
    font-size: 22px;
    color: #333;
    border-bottom: 2px solid #0066cc;
    padding-bottom: 10px;
}

/* --- 早見表セクション --- */
.toolzoo-weight-reference {
    margin-bottom: 24px;
}

.toolzoo-weight-reference h4 {
    margin: 0 0 12px 0;
    font-size: 15px;
    color: #555;
    font-weight: bold;
}

.toolzoo-weight-reference-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.toolzoo-weight-reference-table th,
.toolzoo-weight-reference-table td {
    padding: 8px 12px;
    border: 1px solid #ddd;
    text-align: center;
}

.toolzoo-weight-reference-table th {
    background: #e8f0fb;
    font-weight: bold;
    color: #333;
}

.toolzoo-weight-reference-table tbody tr:nth-child(odd) {
    background: #fff;
}

.toolzoo-weight-reference-table tbody tr:nth-child(even) {
    background: #f5f8ff;
}

.toolzoo-weight-reference-table td:first-child {
    font-weight: bold;
    text-align: left;
    color: #333;
}

/* --- 自由変換セクション --- */
.toolzoo-weight-converter {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 20px;
    margin-bottom: 24px;
}

.toolzoo-weight-converter h4 {
    margin: 0 0 4px 0;
    font-size: 15px;
    color: #555;
    font-weight: bold;
}

.toolzoo-weight-converter-hint {
    margin: 0 0 16px 0;
    font-size: 12px;
    color: #888;
}

.toolzoo-weight-input-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.toolzoo-weight-input-label {
    width: 7.5em;
    flex-shrink: 0;
    font-weight: bold;
    color: #333;
    font-size: 14px;
}

.toolzoo-weight-input-field {
    width: 160px;
    padding: 8px 10px;
    font-size: 15px;
    border: 2px solid #ccc;
    border-radius: 4px;
    text-align: right;
    transition: border-color 0.15s, box-shadow 0.15s;
    box-sizing: border-box;
}

.toolzoo-weight-input-field:focus {
    outline: none;
    border-color: #0066cc;
    box-shadow: 0 0 5px rgba(0, 102, 204, 0.3);
}

/* 編集中フィールドのハイライト */
.toolzoo-weight-input-field.active {
    border-color: #0066cc;
    background: #f0f6ff;
    box-shadow: 0 0 6px rgba(0, 102, 204, 0.25);
}

.toolzoo-weight-input-unit {
    font-size: 14px;
    color: #555;
    min-width: 28px;
}

.toolzoo-weight-btn-row {
    margin-top: 6px;
}

.toolzoo-weight-clear-btn {
    padding: 8px 24px;
    font-size: 13px;
    color: #555;
    background: #fff;
    border: 1px solid #bbb;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
}

.toolzoo-weight-clear-btn:hover {
    background: #f0f0f0;
    border-color: #999;
}

/* --- 解説テーブル共通 --- */
.toolzoo-weight-shakkan,
.toolzoo-weight-imperial {
    border-top: 2px solid #ddd;
    padding-top: 20px;
    margin-top: 20px;
}

.toolzoo-weight-shakkan h4,
.toolzoo-weight-imperial h4 {
    margin: 0 0 12px 0;
    font-size: 15px;
    color: #555;
    font-weight: bold;
}

.toolzoo-weight-info-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.toolzoo-weight-info-table th,
.toolzoo-weight-info-table td {
    padding: 7px 10px;
    border-bottom: 1px solid #eee;
    text-align: left;
}

.toolzoo-weight-info-table th {
    background: #f5f5f5;
    font-weight: bold;
    color: #444;
}

.toolzoo-weight-info-table td:first-child {
    font-weight: bold;
    color: #333;
    white-space: nowrap;
}

.toolzoo-weight-info-table td:nth-child(2) {
    color: #666;
}

.toolzoo-weight-info-table td:nth-child(3) {
    font-family: 'Courier New', monospace;
    color: #0066cc;
}

/* 補足注記 */
.toolzoo-weight-note {
    margin: 10px 0 0 0;
    font-size: 12px;
    color: #888;
    line-height: 1.6;
}

/* --- レスポンシブ --- */
@media screen and (max-width: 500px) {
    .toolzoo-weight-container {
        padding: 16px;
    }

    .toolzoo-weight-input-row {
        flex-wrap: wrap;
    }

    .toolzoo-weight-input-label {
        width: 7.5em;
        font-size: 13px;
    }

    .toolzoo-weight-input-field {
        width: 130px;
        font-size: 14px;
    }

    .toolzoo-weight-reference-table th,
    .toolzoo-weight-reference-table td {
        padding: 6px 6px;
        font-size: 12px;
    }

    .toolzoo-weight-info-table th,
    .toolzoo-weight-info-table td {
        padding: 5px 6px;
        font-size: 12px;
    }
}
