/* Universal Running Pace Calculator Styles */

.urpc-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    color: #333;
    line-height: 1.6;
}

.urpc-container * {
    box-sizing: border-box;
}

/* Header */
.urpc-header {
    text-align: center;
    margin-bottom: 30px;
    padding: 30px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 16px;
    color: white;
}

.urpc-title {
    margin: 0 0 10px 0;
    font-size: 28px;
    font-weight: 700;
}

.urpc-subtitle {
    margin: 0;
    font-size: 16px;
    opacity: 0.9;
}

/* Mode Selector */
.urpc-mode-selector {
    margin-bottom: 25px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 12px;
}

.urpc-mode-selector label {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
    color: #444;
}

.urpc-select {
    width: 100%;
    padding: 12px 16px;
    font-size: 16px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    background: white;
    cursor: pointer;
    transition: border-color 0.3s ease;
}

.urpc-select:hover,
.urpc-select:focus {
    border-color: #667eea;
    outline: none;
}

/* Calculator Sections */
.urpc-calculator {
    display: none;
}

.urpc-calculator.urpc-active {
    display: block;
}

/* Cards */
.urpc-card {
    background: white;
    border-radius: 16px;
    padding: 25px;
    margin-bottom: 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid #e8ecf0;
}

.urpc-card-title {
    margin: 0 0 20px 0;
    font-size: 20px;
    font-weight: 600;
    color: #333;
    padding-bottom: 15px;
    border-bottom: 2px solid #f0f2f5;
}

/* Form Elements */
.urpc-form-group {
    margin-bottom: 20px;
}

.urpc-form-group > label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #555;
    font-size: 14px;
}

.urpc-form-row {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.urpc-half {
    flex: 1;
    min-width: 250px;
}

.urpc-time-inputs {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.urpc-input-group {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.urpc-input {
    width: 70px;
    padding: 12px;
    font-size: 18px;
    text-align: center;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.urpc-input:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.15);
    outline: none;
}

.urpc-input-wide {
    width: 150px;
}

.urpc-input-label {
    font-size: 12px;
    color: #888;
    margin-top: 5px;
}

.urpc-pace-unit {
    font-size: 13px;
    color: #666;
    margin-top: 5px;
}

/* Unit Toggle */
.urpc-toggle {
    display: inline-flex;
    background: #f0f2f5;
    border-radius: 8px;
    padding: 4px;
}

.urpc-toggle-btn {
    padding: 10px 24px;
    font-size: 14px;
    font-weight: 600;
    border: none;
    background: transparent;
    color: #666;
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.urpc-toggle-btn:hover {
    color: #333;
}

.urpc-toggle-btn.urpc-active {
    background: #667eea;
    color: white;
}

/* Calculate Button */
.urpc-button {
    display: inline-block;
    padding: 14px 32px;
    font-size: 16px;
    font-weight: 600;
    color: white;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    margin-top: 10px;
}

.urpc-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.urpc-button:active {
    transform: translateY(0);
}

/* Results Section */
.urpc-results {
    animation: urpc-fadeIn 0.4s ease;
}

@keyframes urpc-fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.urpc-result-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    border-bottom: 1px solid #f0f2f5;
}

.urpc-result-item:last-of-type {
    border-bottom: none;
}

.urpc-result-label {
    font-weight: 500;
    color: #666;
}

.urpc-result-value {
    font-size: 20px;
    font-weight: 700;
    color: #667eea;
}

.urpc-splits-title {
    margin: 25px 0 15px 0;
    font-size: 16px;
    font-weight: 600;
    color: #444;
}

/* Table */
.urpc-table-container {
    overflow-x: auto;
    margin-top: 10px;
}

.urpc-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.urpc-table th,
.urpc-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #f0f2f5;
}

.urpc-table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #555;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.urpc-table tr:hover {
    background: #fafbfc;
}

.urpc-table td:first-child {
    font-weight: 600;
    color: #667eea;
}

/* Responsive Design */
@media (max-width: 600px) {
    .urpc-container {
        padding: 15px;
    }
    
    .urpc-header {
        padding: 20px 15px;
    }
    
    .urpc-title {
        font-size: 22px;
    }
    
    .urpc-card {
        padding: 20px;
    }
    
    .urpc-form-row {
        flex-direction: column;
    }
    
    .urpc-half {
        min-width: 100%;
    }
    
    .urpc-time-inputs {
        justify-content: flex-start;
    }
    
    .urpc-input {
        width: 60px;
        padding: 10px;
        font-size: 16px;
    }
    
    .urpc-input-wide {
        width: 120px;
    }
    
    .urpc-toggle-btn {
        padding: 8px 16px;
        font-size: 13px;
    }
    
    .urpc-button {
        width: 100%;
        padding: 14px 20px;
    }
    
    .urpc-result-value {
        font-size: 18px;
    }
    
    .urpc-table th,
    .urpc-table td {
        padding: 10px 8px;
        font-size: 13px;
    }
}

/* Number Input Spinner Styling */
.urpc-input::-webkit-outer-spin-button,
.urpc-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.urpc-input[type=number] {
    -moz-appearance: textfield;
}
