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

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

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

/* Unit toggle */
.pacc-unit-toggle {
    display: flex; border: 1px solid #d0d0d0;
    border-radius: 9px; overflow: hidden; margin-bottom: 16px;
}
.pacc-utbtn {
    flex: 1; padding: 9px 10px; font-size: 13px;
    border: none; border-right: 1px solid #d0d0d0;
    background: #fff; color: #555; cursor: pointer;
    transition: background .13s, color .13s;
}
.pacc-utbtn:last-child { border-right: none; }
.pacc-utbtn.act { background: #e0f2fe; color: #0369A1; font-weight: 600; }
.pacc-utbtn:hover:not(.act) { background: #fafafa; }

/* Tabs */
.pacc-tabs {
    display: grid; grid-template-columns: 1fr 1fr 1fr;
    gap: 8px; margin-bottom: 20px;
}
@media (max-width: 460px) { .pacc-tabs { grid-template-columns: 1fr; } }

.pacc-tab {
    padding: 10px 8px; font-size: 12.5px; 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; line-height: 1.3; text-align: center;
}
.pacc-tab:hover:not(.act) { background: #f0f9ff; }
.pacc-tab.act { background: #e0f2fe; color: #0369A1; border-color: #7DD3FC; }
.pacc-tab-icon { font-size: 18px; }
.pacc-tab-sub  { font-size: 11px; font-weight: 400; opacity: .7; }

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

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

/* Grid */
.pacc-grid {
    display: grid; grid-template-columns: 1fr 1fr;
    gap: 14px; margin-bottom: 4px;
}
@media (max-width: 440px) { .pacc-grid { grid-template-columns: 1fr; } }

/* Labels */
.pacc-lbl {
    display: flex; align-items: center; gap: 6px;
    font-size: 13px; font-weight: 500; color: #555; margin-bottom: 6px;
}
.pacc-unit-badge {
    font-size: 11px; color: #888; font-weight: 400;
}

/* Time row (h:m:s) */
.pacc-time-row { display: flex; gap: 6px; }
.pacc-time-row .pacc-iw { flex: 1; }

/* Distance row */
.pacc-dist-row { display: flex; gap: 6px; }
.pacc-dist-iw  { flex: 2; }
.pacc-unit-iw  { flex: 1.2; }

/* Inputs */
.pacc-iw { position: relative; }
.pacc-iw input[type="number"],
.pacc-iw select {
    width: 100%; box-sizing: border-box;
    padding: 9px 28px 9px 10px;
    border: 1px solid #d0d0d0; border-radius: 8px;
    font-size: 14px; color: #1a1a1a; background: #fff;
    outline: none; transition: border-color .15s;
    -moz-appearance: textfield; text-align: center;
}
.pacc-iw input::-webkit-inner-spin-button,
.pacc-iw input::-webkit-outer-spin-button { -webkit-appearance: none; }
.pacc-iw input:focus { border-color: #0369A1; box-shadow: 0 0 0 3px rgba(3,105,161,.1); }
.pacc-iw select {
    padding: 9px 8px; text-align: left;
    appearance: none; -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 24 24' fill='none' stroke='%23999' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 6px center; cursor: pointer;
}
.pacc-suf {
    position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
    font-size: 11px; color: #999; pointer-events: none;
}

/* Result card */
.pacc-result-card {
    background: linear-gradient(135deg, #0369A1, #0C4A6E);
    border-radius: 12px; padding: 18px 20px;
    color: #fff; margin-top: 16px; margin-bottom: 4px;
    animation: pacc-in .22s ease;
}
@keyframes pacc-in { from { opacity:0; transform:translateY(5px); } to { opacity:1; transform:translateY(0); } }

.pacc-res-primary { display: flex; align-items: center; margin-bottom: 14px; gap: 0; }
.pacc-res-metric  { flex: 1; text-align: center; }
.pacc-res-sep     { width: 1px; height: 44px; background: rgba(255,255,255,.2); }
.pacc-res-val     { font-size: 22px; font-weight: 700; font-family: monospace; }
.pacc-res-lbl     { font-size: 11px; opacity: .7; margin-top: 3px; }

.pacc-res-extras  {
    display: grid; grid-template-columns: repeat(3,1fr);
    gap: 8px; border-top: 1px solid rgba(255,255,255,.15);
    padding-top: 12px; font-size: 12px;
}
.pacc-res-extra   { text-align: center; }
.pacc-res-extra-val { font-weight: 600; font-size: 13px; font-family: monospace; }
.pacc-res-extra-lbl { opacity: .65; margin-top: 2px; font-size: 11px; }

/* Race times table */
table.pacc-race-table {
    width: 100%; border-collapse: collapse; font-size: 13px; margin-bottom: 14px;
}
table.pacc-race-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.pacc-race-table th:last-child { text-align: right; }
table.pacc-race-table td {
    padding: 8px 10px; border-bottom: 1px solid #f0f0f0; font-size: 13px;
}
table.pacc-race-table td:last-child { text-align: right; font-weight: 600; font-family: monospace; }
table.pacc-race-table tr:last-child td { border-bottom: none; }
table.pacc-race-table tr:nth-child(even) td { background: #fafafa; }

/* Speed conversion table */
table.pacc-speed-table {
    width: 100%; border-collapse: collapse; font-size: 13px; margin-bottom: 14px;
}
table.pacc-speed-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.pacc-speed-table th:last-child { text-align: right; }
table.pacc-speed-table td {
    padding: 7px 10px; border-bottom: 1px solid #f0f0f0; font-size: 13px;
}
table.pacc-speed-table td:last-child { text-align: right; font-weight: 600; font-family: monospace; }
table.pacc-speed-table tr:last-child td { border-bottom: none; }

/* Reset */
.pacc-reset-btn {
    display: block; width: 100%; margin-top: 10px; padding: 9px;
    font-size: 13px; color: #999; background: none;
    border: 1px solid #e8e8e8; border-radius: 8px;
    cursor: pointer; transition: background .13s;
}
.pacc-reset-btn:hover { background: #f5f5f5; color: #333; }
