/* =============================================
   PACE CALCULATOR — pace.css
   Tool-specific styles only.
   Common styles are in tool.css
   ============================================= */

.pace-calc { width: 100%; }

/* Layout: inputs left, results right */
#pace-panel-pace .mort-layout,
#pace-panel-time .mort-layout,
#pace-panel-distance .mort-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    align-items: start;
}

/* Time input row */
.pace-time-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
}
.pace-time-input {
    flex: 1;
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 15px;
    font-family: var(--font-mono);
    color: var(--text);
    background: var(--white);
    outline: none;
    transition: border-color 0.2s;
    box-sizing: border-box;
}
.pace-time-input:focus {
    border-color: var(--teal);
    box-shadow: 0 0 0 3px rgba(0,201,167,0.1);
}
.pace-time-hint {
    font-size: 12px;
    color: var(--muted);
    white-space: nowrap;
}

/* Distance row */
.pace-dist-wrap {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}
.pace-dist-input {
    width: 90px;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 15px;
    font-family: var(--font-main);
    color: var(--text);
    background: var(--white);
    outline: none;
    transition: border-color 0.2s;
    box-sizing: border-box;
}
.pace-dist-input:focus {
    border-color: var(--teal);
    box-shadow: 0 0 0 3px rgba(0,201,167,0.1);
}
.pace-unit-select,
.pace-event-select {
    padding: 10px 10px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 13px;
    font-family: var(--font-main);
    color: var(--text);
    background: var(--white);
    outline: none;
    cursor: pointer;
    transition: border-color 0.2s;
}
.pace-unit-select:focus,
.pace-event-select:focus {
    border-color: var(--teal);
}
.pace-event-select { flex: 1; min-width: 160px; }

/* Results box */
.pace-results {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}
.pace-result-header {
    background: #16a34a;
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    padding: 10px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Pace units list */
.pace-units-section {
    padding: 14px 16px 8px;
    border-bottom: 1px solid var(--border);
}
.pace-units-title {
    font-size: 13px;
    color: var(--text2);
    margin-bottom: 8px;
}
.pace-units-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.pace-units-list li {
    font-size: 14px;
    color: #16a34a;
    font-weight: 500;
}
.pace-units-list li strong {
    color: #16a34a;
    font-weight: 700;
}

/* Race distances table */
.pace-race-section {
    padding: 14px 16px 8px;
    border-bottom: 1px solid var(--border);
}
.pace-race-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    margin-top: 8px;
}
.pace-race-table td {
    padding: 6px 10px;
    border: 1px solid var(--border);
    color: var(--text2);
}
.pace-race-table td:nth-child(2),
.pace-race-table td:nth-child(4) {
    font-weight: 700;
    color: var(--navy);
    font-family: var(--font-mono);
    text-align: right;
}

/* Splits table */
.pace-splits-section {
    padding: 14px 16px 14px;
}
.pace-splits-table {
    max-width: 320px;
}
.pace-splits-table td {
    width: 80px;
}

@media (max-width: 768px) {
    #pace-panel-pace .mort-layout,
    #pace-panel-time .mort-layout,
    #pace-panel-distance .mort-layout {
        grid-template-columns: 1fr;
    }
    .pace-event-select { min-width: 100%; }
}
