/* Hours Calculator — style.css v1.0 */

.hrsc-wrap {
    max-width: 700px;
    margin: 0 auto;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: #1a1a1a;
}

/* Header */
.hrsc-header { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; }
.hrsc-icon   { font-size: 34px; line-height: 1; }
.hrsc-title  {
    font-size: 22px !important; font-weight: 600 !important;
    margin: 0 0 3px !important; padding: 0 !important;
    border: none !important; color: #1a1a1a !important;
}
.hrsc-sub { font-size: 13px; color: #666; margin: 0; }

/* Settings row */
.hrsc-settings-row {
    display: grid; grid-template-columns: repeat(4,1fr);
    gap: 12px; margin-bottom: 18px;
    background: #f8f9ff; border: 1px solid #e0e7ff;
    border-radius: 12px; padding: 14px 16px;
}
@media (max-width: 560px) { .hrsc-settings-row { grid-template-columns: 1fr 1fr; } }
@media (max-width: 380px) { .hrsc-settings-row { grid-template-columns: 1fr; } }

.hrsc-lbl {
    display: flex; align-items: center; gap: 5px;
    font-size: 12px; font-weight: 500; color: #555; margin-bottom: 5px;
}
.hrsc-tip {
    display: inline-flex; align-items: center; justify-content: center;
    width: 14px; height: 14px; border-radius: 50%;
    background: #ebebeb; font-size: 9px; color: #777;
    cursor: help; font-style: normal;
}
.hrsc-iw { position: relative; }
.hrsc-iw input[type="number"] {
    width: 100%; box-sizing: border-box;
    padding: 7px 36px 7px 22px;
    border: 1px solid #d0d0d0; border-radius: 7px;
    font-size: 13px; color: #1a1a1a; background: #fff;
    outline: none; transition: border-color .15s;
    -moz-appearance: textfield;
}
.hrsc-iw input::-webkit-inner-spin-button,
.hrsc-iw input::-webkit-outer-spin-button { -webkit-appearance: none; }
.hrsc-iw input:focus { border-color: #2563EB; box-shadow: 0 0 0 3px rgba(37,99,235,.1); }
.hrsc-pre {
    position: absolute; left: 7px; top: 50%; transform: translateY(-50%);
    font-size: 12px; color: #999; pointer-events: none;
}
.hrsc-suf {
    position: absolute; right: 5px; top: 50%; transform: translateY(-50%);
    font-size: 10px; color: #999; pointer-events: none; white-space: nowrap;
}

.hrsc-toggle { display: flex; border: 1px solid #d0d0d0; border-radius: 7px; overflow: hidden; }
.hrsc-tbtn {
    flex: 1; padding: 7px 8px; font-size: 12px; font-weight: 600;
    border: none; border-right: 1px solid #d0d0d0;
    background: #fff; color: #555; cursor: pointer;
    transition: background .13s, color .13s;
}
.hrsc-tbtn:last-child { border-right: none; }
.hrsc-tbtn.act { background: #dbeafe; color: #1e40af; }
.hrsc-tbtn:hover:not(.act) { background: #f8faff; }

/* Table */
.hrsc-table-wrap { overflow-x: auto; margin-bottom: 4px; }
table.hrsc-table {
    width: 100%; border-collapse: collapse; font-size: 13px;
    min-width: 480px;
}
table.hrsc-table thead th {
    padding: 8px 10px; text-align: center; color: #888;
    font-size: 11px; text-transform: uppercase; letter-spacing: .4px;
    border-bottom: 2px solid #e8e8e8; background: #fafafa; font-weight: 600;
}
table.hrsc-table thead th:first-child { text-align: left; }
table.hrsc-table tbody tr { border-bottom: 1px solid #f0f0f0; }
table.hrsc-table tbody tr:last-child { border-bottom: none; }
table.hrsc-table tbody tr.hrsc-disabled { opacity: .4; }
table.hrsc-table tbody td { padding: 6px 8px; vertical-align: middle; }

/* Day name */
.hrsc-day-name {
    display: flex; align-items: center; gap: 7px;
    font-size: 13px; font-weight: 500; color: #1a1a1a; white-space: nowrap;
}
.hrsc-day-check { cursor: pointer; width: 14px; height: 14px; }

/* Time / break inputs */
.hrsc-time-input, .hrsc-break-input {
    width: 100%; box-sizing: border-box; padding: 7px 6px;
    border: 1px solid #d0d0d0; border-radius: 7px;
    font-size: 13px; color: #1a1a1a; background: #fff;
    outline: none; transition: border-color .15s; text-align: center;
    -moz-appearance: textfield;
}
.hrsc-time-input  { min-width: 90px; }
.hrsc-break-input { max-width: 70px; }
.hrsc-break-input::-webkit-inner-spin-button,
.hrsc-break-input::-webkit-outer-spin-button { -webkit-appearance: none; }
.hrsc-time-input:focus, .hrsc-break-input:focus { border-color: #2563EB; box-shadow: 0 0 0 3px rgba(37,99,235,.1); }

/* Net hours / decimal cells */
.hrsc-net-cell, .hrsc-dec-cell {
    text-align: center; font-weight: 600; font-family: monospace; font-size: 13px;
}
.hrsc-net-cell { color: #166534; }
.hrsc-dec-cell { color: #1e40af; }
.hrsc-ot-badge {
    display: inline-block; font-size: 10px; padding: 1px 5px;
    background: #fef3c7; color: #92400E; border-radius: 4px; margin-left: 4px;
}

/* Section label */
.hrsc-section-lbl {
    font-size: 11px; font-weight: 700; color: #999;
    text-transform: uppercase; letter-spacing: .6px; margin-bottom: 10px;
}

/* Summary cards */
.hrsc-summary-cards {
    display: grid; grid-template-columns: repeat(4,1fr);
    gap: 10px; margin-top: 18px;
    animation: hrsc-in .22s ease;
}
@media (max-width: 480px) { .hrsc-summary-cards { grid-template-columns: repeat(2,1fr); } }
@keyframes hrsc-in { from { opacity:0; transform:translateY(5px); } to { opacity:1; transform:translateY(0); } }

.hrsc-sum-card {
    border-radius: 10px; padding: 12px 10px; text-align: center; border: 1px solid;
}
.hrsc-card-total  { background: #dbeafe; border-color: #93c5fd; }
.hrsc-card-reg    { background: #dcfce7; border-color: #86efac; }
.hrsc-card-ot     { background: #fef3c7; border-color: #fde047; }
.hrsc-card-days   { background: #f3e8ff; border-color: #c4b5fd; }

.hrsc-sum-val { font-size: 20px; font-weight: 700; margin-bottom: 3px; font-family: monospace; }
.hrsc-sum-lbl { font-size: 11px; color: #555; }
.hrsc-card-total .hrsc-sum-val { color: #1e40af; }
.hrsc-card-reg   .hrsc-sum-val { color: #166534; }
.hrsc-card-ot    .hrsc-sum-val { color: #92400E; }
.hrsc-card-days  .hrsc-sum-val { color: #6B21A8; }

/* Pay table */
table.hrsc-pay-table {
    width: 100%; border-collapse: collapse; font-size: 13px; margin-bottom: 14px;
}
table.hrsc-pay-table th {
    padding: 7px 10px; text-align: left; color: #888;
    font-size: 11px; text-transform: uppercase; letter-spacing: .4px;
    border-bottom: 1px solid #e8e8e8; background: #fafafa; font-weight: 600;
}
table.hrsc-pay-table th:last-child { text-align: right; }
table.hrsc-pay-table td { padding: 8px 10px; border-bottom: 1px solid #f0f0f0; font-size: 13px; }
table.hrsc-pay-table td:last-child { text-align: right; font-weight: 600; font-family: monospace; color: #1e40af; }
table.hrsc-pay-table tr.hrsc-total-row td { background: #dbeafe; font-weight: 700; border-top: 2px solid #93c5fd; }
table.hrsc-pay-table tr:last-child td { border-bottom: none; }

/* Daily breakdown */
.hrsc-daily-grid {
    display: grid; grid-template-columns: repeat(7,1fr);
    gap: 6px; margin-bottom: 14px;
}
@media (max-width: 560px) { .hrsc-daily-grid { grid-template-columns: repeat(4,1fr); } }

.hrsc-daily-card {
    border-radius: 8px; padding: 8px 6px; text-align: center;
    background: #f8f9ff; border: 1px solid #e0e7ff;
}
.hrsc-daily-card.hrsc-daily-ot { background: #fefce8; border-color: #fde047; }
.hrsc-daily-card.hrsc-daily-off { opacity: .4; }
.hrsc-daily-day  { font-size: 10px; font-weight: 700; color: #888; text-transform: uppercase; letter-spacing: .3px; margin-bottom: 4px; }
.hrsc-daily-hrs  { font-size: 15px; font-weight: 700; color: #1e40af; font-family: monospace; }
.hrsc-daily-dec  { font-size: 10px; color: #888; margin-top: 2px; }

/* Decimal note */
.hrsc-decimal-note {
    background: #f8f9ff; border: 1px solid #e0e7ff;
    border-radius: 9px; padding: 10px 14px; font-size: 13px; color: #555;
    line-height: 1.6; margin-bottom: 14px;
}
.hrsc-decimal-note strong { color: #1e40af; }

/* Actions */
.hrsc-actions { display: flex; gap: 8px; margin-top: 14px; }
.hrsc-clear-btn, .hrsc-reset-btn {
    flex: 1; padding: 9px 12px; font-size: 13px;
    border: 1px solid #e8e8e8; border-radius: 8px;
    background: #fff; color: #555; cursor: pointer;
    transition: background .13s;
}
.hrsc-clear-btn:hover { background: #fee2e2; color: #b91c1c; border-color: #fca5a5; }
.hrsc-reset-btn:hover { background: #f5f5f5; color: #333; }
