/**
 * Race Pace Calculator Styles
 * Golden color: #EDB61E (RGB: 237, 182, 30)
 */

* {
    box-sizing: border-box;
}

.rpc-container {
    font-family: 'Poppins', sans-serif;
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
}

.rpc-logo {
    text-align: center;
    margin-bottom: 30px;
}

.rpc-logo img {
    max-width: 250px;
    height: auto;
}

/* Mode Selector */
.rpc-mode-selector {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 10px;
    margin-bottom: 30px;
}

.rpc-mode-btn {
    background: #f5f5f5;
    border: 2px solid #ddd;
    padding: 15px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-family: 'Poppins', sans-serif;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.rpc-mode-btn:hover {
    background: #fff;
    border-color: #EDB61E;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(237, 182, 30, 0.2);
}

.rpc-mode-btn.active {
    background: #EDB61E;
    color: white;
    border-color: #EDB61E;
}

.rpc-mode-btn i {
    font-size: 18px;
}

/* Calculator Modes */
.rpc-calculator-mode {
    display: none;
}

.rpc-calculator-mode.active {
    display: block;
}

/* Cards */
.rpc-card {
    background: white;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

.rpc-card h3 {
    margin: 0 0 25px 0;
    color: #333;
    font-size: 20px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

.rpc-card h3 i {
    color: #EDB61E;
}

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

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

.rpc-form-group input[type="number"],
.rpc-form-group select {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-family: 'Poppins', sans-serif;
    font-size: 14px;
    transition: border-color 0.3s ease;
}

.rpc-form-group input[type="number"]:focus,
.rpc-form-group select:focus {
    outline: none;
    border-color: #EDB61E;
}

.rpc-form-group small {
    display: block;
    margin-top: 5px;
    color: #888;
    font-size: 12px;
    font-style: italic;
}

/* Time Inputs */
.rpc-time-inputs {
    display: grid;
    grid-template-columns: 1fr auto 1fr auto 1fr auto;
    gap: 10px;
    align-items: center;
}

.rpc-time-inputs input {
    width: 100%;
}

.rpc-time-inputs span {
    color: #666;
    font-size: 13px;
}

/* Buttons */
.rpc-btn {
    background: #EDB61E;
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 8px;
    font-family: 'Poppins', sans-serif;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.3s ease;
}

.rpc-btn:hover {
    background: #d9a519;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(237, 182, 30, 0.3);
}

.rpc-btn:active {
    transform: translateY(0);
}

.rpc-btn-secondary {
    background: #f5f5f5;
    color: #333;
    padding: 10px 20px;
    font-size: 14px;
}

.rpc-btn-secondary:hover {
    background: #e8e8e8;
}

/* Results */
.rpc-results {
    background: white;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    border: 2px solid #EDB61E;
}

.rpc-results h3 {
    margin: 0 0 20px 0;
    color: #333;
    font-size: 20px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.rpc-results h3 i {
    color: #EDB61E;
}

.rpc-export-btns {
    display: flex;
    gap: 10px;
}

.rpc-export-btns button {
    width: auto;
    padding: 8px 16px;
    font-size: 13px;
}

/* Tables */
.rpc-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
}

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

.rpc-table th {
    background: #f8f8f8;
    font-weight: 600;
    color: #555;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.rpc-table td {
    color: #333;
    font-size: 14px;
}

.rpc-table tr:nth-child(even) {
    background: #fafafa;
}

.rpc-table tr:hover {
    background: #f0f0f0;
}

.rpc-table .rpc-summary-row {
    background: #fff8e8 !important;
    font-weight: 600;
}

.rpc-table .rpc-summary-row td {
    color: #EDB61E;
}

.rpc-table .rpc-highlight {
    color: #EDB61E;
    font-weight: 600;
}

/* Result Cards */
.rpc-result-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

.rpc-result-card {
    background: #f8f8f8;
    padding: 20px;
    border-radius: 8px;
    border-left: 4px solid #EDB61E;
}

.rpc-result-card h4 {
    margin: 0 0 10px 0;
    color: #666;
    font-size: 13px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.rpc-result-card .rpc-value {
    font-size: 24px;
    font-weight: 700;
    color: #EDB61E;
}

.rpc-result-card .rpc-unit {
    font-size: 14px;
    color: #888;
    margin-left: 5px;
}

/* Error Messages */
.rpc-error {
    background: #fee;
    color: #c33;
    padding: 15px;
    border-radius: 8px;
    border-left: 4px solid #c33;
    margin-bottom: 20px;
}

.rpc-error i {
    margin-right: 8px;
}

/* Responsive */
@media (max-width: 768px) {
    .rpc-mode-selector {
        grid-template-columns: 1fr 1fr;
    }
    
    .rpc-time-inputs {
        grid-template-columns: 1fr auto;
    }
    
    .rpc-time-inputs input:nth-child(5),
    .rpc-time-inputs span:nth-child(6) {
        grid-column: 1 / -1;
    }
    
    .rpc-result-cards {
        grid-template-columns: 1fr;
    }
    
    .rpc-card {
        padding: 20px;
    }
    
    .rpc-results {
        padding: 20px;
    }
    
    .rpc-table {
        font-size: 13px;
    }
    
    .rpc-table th,
    .rpc-table td {
        padding: 8px;
    }
}

@media (max-width: 480px) {
    .rpc-mode-selector {
        grid-template-columns: 1fr;
    }
    
    .rpc-mode-btn {
        font-size: 13px;
        padding: 12px 15px;
    }
    
    .rpc-export-btns {
        flex-direction: column;
    }
    
    .rpc-export-btns button {
        width: 100%;
    }
}

/* Loading State */
.rpc-loading {
    text-align: center;
    padding: 40px;
    color: #888;
}

.rpc-loading i {
    font-size: 32px;
    color: #EDB61E;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}
