/* ===========================================
Running Pace Calculator - Tool Specific Styles
=========================================== */

.rpc-box {
 max-width: 900px;
 margin: 0 auto;
}

/* --- Input & Settings Section --- */
.rpc-settings-section {
    padding: 25px;
    border-radius: 12px;
    background: #f7f9fb; /* Light background for inputs */
    border: 1px solid #e0e6ed;
    margin-bottom: 30px;
}

.rpc-section-title {
 font-size: 1.2rem;
 font-weight: 700;
 color: #007bff; /* Primary Blue */
 margin-bottom: 20px;
 padding-bottom: 8px;
 border-bottom: 2px solid #a3c9ff;
}

/* Unit Switch (Toggle) */
.rpc-unit-switch {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 25px;
    padding: 10px;
    background: #e9f0f8;
    border-radius: 8px;
}
.rpc-toggle-group {
    display: flex;
    border: 1px solid #007bff;
    border-radius: 4px;
    overflow: hidden;
}
.rpc-toggle-group input[type="radio"] {
    display: none;
}
.rpc-toggle-group label {
    padding: 8px 15px;
    cursor: pointer;
    font-size: 0.9rem;
    color: #007bff;
    background-color: white;
    transition: all 0.2s;
}
.rpc-toggle-group input[type="radio"]:checked + label {
    background-color: #007bff;
    color: white;
    font-weight: 600;
}
.rpc-toggle-group label:first-of-type {
    border-right: 1px solid #007bff;
}

/* Individual Input Group */
.rpc-input-group {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
    border-bottom: 1px dotted #ccc;
    padding-bottom: 15px;
}
.rpc-label {
    flex-basis: 120px;
    font-weight: 600;
    color: #333;
    font-size: 1rem;
}

.rpc-input {
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 1.2rem;
    text-align: right;
    max-width: 100px;
    flex-grow: 0;
}
.rpc-input[type="number"]::-webkit-outer-spin-button,
.rpc-input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
.rpc-input[type="number"] {
    -moz-appearance: textfield;
}

.rpc-unit-label {
    color: #555;
    font-size: 1rem;
    flex-grow: 1;
}

/* Time and Pace Specific Inputs (H:MM:SS / M:SS) */
.time-inputs, .pace-inputs {
    display: flex;
    align-items: center;
    gap: 5px;
}
.time-part, .pace-part {
    max-width: 70px;
    text-align: center;
}
.time-divider, .pace-divider {
    font-size: 1.2rem;
    font-weight: 700;
    color: #555;
}

.rpc-input-group.pace-input-group {
    align-items: stretch;
    border-bottom: none;
    padding-bottom: 0;
}
.rpc-btn-calc {
    padding: 10px 15px;
    font-size: 1rem;
    font-weight: 700;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    background: #28a745; /* Green Button */
    color: white;
    transition: background 0.2s;
    margin-left: auto;
}
.rpc-btn-calc:hover {
    background: #1e7e34;
}
.rpc-btn-calc:disabled {
    background: #ccc;
    cursor: not-allowed;
}


/* --- Results Section --- */

.rpc-results-section {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #e0e6ed;
}

.rpc-result-grid {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    justify-content: space-between;
    margin-bottom: 30px;
}

.rpc-result-box {
    background: #ffffff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    flex: 1 1 calc(25% - 20px);
    min-width: 150px;
    text-align: center;
    border-left: 5px solid #007bff;
}

.rpc-result-box.secondary-result {
    border-left: 5px solid #ffc107; /* Yellow/Gold for secondary stat */
}

.rpc-card-title {
    font-size: 0.9rem;
    text-transform: uppercase;
    color: #6c757d;
    margin-bottom: 5px;
    font-weight: 700;
}

.rpc-value {
    font-size: 2rem;
    font-weight: 800;
    color: #007bff;
    line-height: 1.1;
}
.rpc-value.small-value {
    font-size: 1.6rem;
    color: #ffc107;
}

.rpc-unit {
    font-size: 0.9rem;
    color: #333;
    margin-top: 5px;
}


/* --- Splits Section --- */

.rpc-splits-section {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #e0e6ed;
}

.rpc-split-intro {
    font-style: italic;
    color: #6c757d;
    margin-bottom: 20px;
}

.rpc-splits-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
    font-size: 1rem;
}
.rpc-splits-table th, .rpc-splits-table td {
    border: 1px solid #e0eeef;
    padding: 12px;
    text-align: center;
}
.rpc-splits-table th {
    background-color: #007bff;
    color: white;
    font-weight: 600;
}
.rpc-splits-table tbody tr:nth-child(even) {
    background-color: #f7f9fb;
}


/* Responsive Adjustments */
@media (max-width: 768px) {
    .rpc-input-group {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    .rpc-label {
        flex-basis: auto;
    }
    .rpc-input, .time-inputs, .pace-inputs {
        width: 100%;
        max-width: none;
    }
    .time-inputs, .pace-inputs {
        justify-content: space-around;
    }
    .rpc-btn-calc {
        width: 100%;
        margin-left: 0;
        margin-top: 10px;
    }
    .rpc-result-grid {
        justify-content: center;
    }
    .rpc-result-box {
        flex: 1 1 45%;
    }
}
@media (max-width: 480px) {
    .rpc-result-box {
        flex: 1 1 100%;
    }
}