/* src/public/css/time-calculator.css */

.calc-box {
    background: #ffffff;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    margin-top: 20px;
}

.tcal-section-title {
    margin: 0 0 6px;
    font-size: 1.15rem;
    color: #1e3c72;
    display: flex;
    align-items: center;
    gap: 8px;
}
.tcal-section-desc {
    margin: 0 0 20px;
    font-size: 0.88rem;
    color: #64748b;
    line-height: 1.6;
}

/* ===== セクション1：時間の足し算・引き算 ===== */
.time-rows {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 12px;
}
.time-row {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 10px 12px;
    flex-wrap: wrap;
}
.time-sign {
    flex: 0 0 auto;
    padding: 8px 6px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    background: #fff;
    font-weight: bold;
    color: #2a5298;
}
.time-fields {
    flex: 1;
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    min-width: 0;
}
.time-field {
    display: flex;
    align-items: center;
    gap: 6px;
}
.time-field input {
    width: 64px;
    padding: 8px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-size: 0.95rem;
    text-align: right;
}
.time-field span {
    font-size: 0.85rem;
    color: #64748b;
    font-weight: bold;
}
.btn-row-remove {
    flex: 0 0 auto;
    width: 34px;
    height: 34px;
    border: 1px solid #fca5a5;
    border-radius: 6px;
    background: #fff;
    color: #ef4444;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
}
.btn-row-remove:hover { background: #fee2e2; }

.btn-row-add {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 16px;
    border: 1px dashed #94a3b8;
    border-radius: 6px;
    background: #fff;
    color: #2a5298;
    font-weight: bold;
    font-size: 0.9rem;
    cursor: pointer;
    margin-bottom: 20px;
}
.btn-row-add:hover { background: #f1f5f9; }

/* ===== セクション2：タイムカード集計 ===== */
.tc-rows {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-bottom: 12px;
}
.tc-row {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 12px 14px;
}
.tc-row-top {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}
.tc-name {
    flex: 1;
    padding: 8px 10px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-size: 0.9rem;
}
.tc-fields {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
}
.tc-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 0.78rem;
    font-weight: bold;
    color: #64748b;
}
.tc-field input {
    padding: 8px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-size: 0.9rem;
    width: 118px;
}
.tc-field input.tc-break,
.tc-field input.tc-wage {
    width: 92px;
    text-align: right;
}
.tc-row-result {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px dashed #dee2e6;
    font-size: 0.88rem;
    min-height: 1.3em;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.tc-row-result-line {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    font-weight: bold;
    color: #2a5298;
}
/* 💡 [hidden] は本来 display:none になりますが、上の display:flex が
        同じ詳細度で上書きしてしまうため、明示的に指定し直します */
.tc-row-result-line[hidden] { display: none; }
.tc-row-overnight-note {
    font-size: 0.78rem;
    font-weight: normal;
    color: #94a3b8;
}
.tc-row-incomplete-note {
    font-size: 0.85rem;
    color: #94a3b8;
}

/* ===== ボタン・結果（discount.css と同じ見た目） ===== */
.btn-group {
    display: flex;
    gap: 15px;
    margin-bottom: 25px;
}
.btn-calc {
    flex: 2;
    padding: 14px;
    border: none;
    border-radius: 6px;
    font-size: 1.05rem;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.2s;
    background-color: #2a5298;
    color: white;
}
.btn-calc:hover { background-color: #1e3c72; }

.btn-clear-tool {
    flex: 1;
    padding: 14px;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.2s;
    background-color: #e9ecef;
    color: #495057;
}
.btn-clear-tool:hover { background-color: #dee2e6; }

.result-box {
    background-color: #f1f3f5;
    padding: 20px;
    border-radius: 8px;
}
.result-card { text-align: center; }
.res-title {
    display: block;
    font-size: 0.9rem;
    color: #64748b;
    font-weight: bold;
    margin-bottom: 5px;
}
.res-big-val {
    display: block;
    font-size: 1.9rem;
    font-weight: bold;
    color: #2a5298;
    margin-bottom: 10px;
}
.result-sub {
    font-size: 0.9rem;
    color: #475569;
    border-top: 1px solid #dee2e6;
    padding-top: 12px;
    min-height: 1.4em;
    white-space: pre-line;
}

/* === スマホ・タブレット対応 === */
@media (max-width: 768px) {
    .calc-box { padding: 20px; }
    .btn-group { gap: 10px; }
    .btn-calc, .btn-clear-tool { padding: 12px; font-size: 0.95rem; }
    .res-big-val { font-size: 1.5rem; }

    .time-row { padding: 10px; }
    .time-fields { gap: 8px; }
    .time-field input { width: 52px; }

    .tc-fields { gap: 10px; }
    .tc-field input { width: 100%; }
}
@media (max-width: 480px) {
    .tc-fields { flex-direction: column; }
    .tc-field { width: 100%; }
}
