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

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

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

/* Tabs */
.ticalc-tabs {
    display: flex; gap: 7px; margin-bottom: 20px; flex-wrap: wrap;
}
.ticalc-tab {
    flex: 1 1 auto; min-width: 110px; padding: 10px 8px;
    font-size: 13px; font-weight: 500;
    border: 1px solid #d8d8d8; border-radius: 10px;
    background: #fff; color: #555; cursor: pointer;
    transition: background .13s, color .13s, border-color .13s;
    display: flex; flex-direction: column; align-items: center; gap: 3px;
    text-align: center;
}
.ticalc-tab:hover:not(.act) { background: #f5f3ff; }
.ticalc-tab.act { background: #f3e8ff; color: #6B21A8; border-color: #c4b5fd; }
.ticalc-tab span { font-size: 16px; }

/* Panels */
.ticalc-panel { display: none; }
.ticalc-panel.act { display: block; }

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

/* 4-column time row */
.ticalc-time-row {
    display: grid; grid-template-columns: repeat(4,1fr);
    gap: 10px; margin-bottom: 10px;
}
@media (max-width: 460px) { .ticalc-time-row { grid-template-columns: repeat(2,1fr); } }

.ticalc-time-group { }
.ticalc-lbl {
    display: block; font-size: 12px; font-weight: 500;
    color: #555; margin-bottom: 5px; text-align: center;
}

/* Inputs */
.ticalc-iw { position: relative; }
.ticalc-iw input[type="number"],
.ticalc-iw select {
    width: 100%; box-sizing: border-box;
    padding: 10px 8px; text-align: center;
    border: 1px solid #d0d0d0; border-radius: 8px;
    font-size: 18px; font-weight: 600;
    color: #1a1a1a; background: #fff;
    outline: none; transition: border-color .15s;
    -moz-appearance: textfield;
    font-family: monospace;
}
.ticalc-iw input::-webkit-inner-spin-button,
.ticalc-iw input::-webkit-outer-spin-button { -webkit-appearance: none; }
.ticalc-iw input:focus { border-color: #7C3AED; box-shadow: 0 0 0 3px rgba(124,58,237,.1); }
.ticalc-iw select { font-size: 14px; font-family: inherit; font-weight: 500; cursor: pointer; appearance: none; -webkit-appearance: none; }

/* Op toggle */
.ticalc-op-row { margin: 10px 0; }
.ticalc-op-toggle {
    display: inline-flex; border: 1px solid #d0d0d0;
    border-radius: 8px; overflow: hidden;
}
.ticalc-opbtn {
    padding: 8px 18px; font-size: 13px; font-weight: 600;
    border: none; border-right: 1px solid #d0d0d0;
    background: #fff; color: #555; cursor: pointer;
    transition: background .13s, color .13s;
}
.ticalc-opbtn:last-child { border-right: none; }
.ticalc-opbtn.act { background: #f3e8ff; color: #6B21A8; }
.ticalc-opbtn:hover:not(.act) { background: #fafafa; }

/* Result card */
.ticalc-result-card {
    background: linear-gradient(135deg, #6B21A8, #5B21B6);
    border-radius: 12px; padding: 18px 20px; color: #fff;
    text-align: center; margin-top: 14px; margin-bottom: 4px;
    animation: tic-in .22s ease;
}
@keyframes tic-in { from { opacity:0; transform:translateY(5px); } to { opacity:1; transform:translateY(0); } }
.ticalc-res-main { font-size: 36px; font-weight: 700; font-family: monospace; letter-spacing: 1px; margin-bottom: 4px; }
.ticalc-res-sub  { font-size: 13px; opacity: .75; margin-bottom: 8px; }
.ticalc-res-extras {
    display: grid; grid-template-columns: repeat(3,1fr); gap: 8px;
    border-top: 1px solid rgba(255,255,255,.15); padding-top: 10px;
}
.ticalc-res-extra { text-align: center; font-size: 12px; }
.ticalc-res-extra-val { font-weight: 600; font-family: monospace; margin-bottom: 2px; }
.ticalc-res-extra-lbl { opacity: .65; }

/* Detail rows */
.ticalc-detail-card {
    background: #fafafa; border: 1px solid #e8e8e8;
    border-radius: 10px; padding: 10px 14px; margin-top: 10px;
}
.ticalc-detail-row {
    display: flex; justify-content: space-between;
    padding: 5px 0; font-size: 13px; border-bottom: 1px solid #f0f0f0;
}
.ticalc-detail-row:last-child { border-bottom: none; }
.ticalc-detail-lbl { color: #555; }
.ticalc-detail-val { font-weight: 600; font-family: monospace; }

/* Multi-add rows */
.ticalc-multi-head {
    display: grid; grid-template-columns: 1fr 1fr 1fr 1fr 28px;
    gap: 6px; padding-bottom: 4px; margin-bottom: 4px;
    font-size: 11px; font-weight: 700; color: #999;
    text-transform: uppercase; letter-spacing: .4px; text-align: center;
    border-bottom: 1px solid #e8e8e8;
}
.ticalc-multi-row {
    display: grid; grid-template-columns: 1fr 1fr 1fr 1fr 28px;
    gap: 6px; margin-bottom: 6px; align-items: center;
}
.ticalc-multi-row input {
    width: 100%; box-sizing: border-box; padding: 7px 4px; text-align: center;
    border: 1px solid #d0d0d0; border-radius: 7px;
    font-size: 15px; font-weight: 600; font-family: monospace;
    color: #1a1a1a; background: #fff; outline: none;
    -moz-appearance: textfield; transition: border-color .15s;
}
.ticalc-multi-row input::-webkit-inner-spin-button,
.ticalc-multi-row input::-webkit-outer-spin-button { -webkit-appearance: none; }
.ticalc-multi-row input:focus { border-color: #7C3AED; }
.ticalc-rm-btn {
    width: 26px; height: 26px; border-radius: 6px;
    border: 1px solid #e8e8e8; background: #fff; color: #bbb;
    font-size: 12px; cursor: pointer; display: flex;
    align-items: center; justify-content: center;
    transition: background .13s, color .13s;
}
.ticalc-rm-btn:hover { background: #fee2e2; color: #b91c1c; border-color: #fca5a5; }

.ticalc-add-row-btn {
    font-size: 12px; color: #6B21A8; background: none;
    border: 1px dashed #c4b5fd; border-radius: 7px;
    padding: 6px 14px; cursor: pointer; margin: 6px 0 12px;
    transition: background .13s;
}
.ticalc-add-row-btn:hover { background: #f3e8ff; }

/* Timesheet */
.ticalc-ts-head {
    display: grid; grid-template-columns: 80px 1fr 1fr 80px 70px;
    gap: 6px; padding-bottom: 4px; margin-bottom: 4px;
    font-size: 11px; font-weight: 700; color: #999;
    text-transform: uppercase; letter-spacing: .4px;
    border-bottom: 1px solid #e8e8e8; text-align: center;
}
.ticalc-ts-row {
    display: grid; grid-template-columns: 80px 1fr 1fr 80px 70px;
    gap: 6px; margin-bottom: 6px; align-items: center;
}
.ticalc-ts-day { font-size: 12px; font-weight: 600; color: #555; text-align: center; }
.ticalc-ts-row input[type="time"],
.ticalc-ts-row input[type="number"] {
    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;
}
.ticalc-ts-row input:focus { border-color: #7C3AED; }
.ticalc-ts-row input::-webkit-inner-spin-button,
.ticalc-ts-row input::-webkit-outer-spin-button { -webkit-appearance: none; }
.ticalc-ts-hours {
    font-size: 13px; font-weight: 700; color: #6B21A8;
    text-align: center; font-family: monospace;
}

/* Timesheet summary */
.ticalc-ts-summary {
    background: linear-gradient(135deg, #6B21A8, #5B21B6);
    color: #fff; border-radius: 10px; padding: 14px 18px;
    margin-top: 12px; display: grid; grid-template-columns: repeat(3,1fr); gap: 10px; text-align: center;
}
.ticalc-ts-sum-val { font-size: 20px; font-weight: 700; font-family: monospace; }
.ticalc-ts-sum-lbl { font-size: 11px; opacity: .7; margin-top: 2px; }

@media (max-width: 480px) {
    .ticalc-ts-head, .ticalc-ts-row { grid-template-columns: 60px 1fr 1fr 60px; }
    .ticalc-ts-hours { display: none; }
    .ticalc-ts-head span:last-child { display: none; }
}
