/**
 * Pace Calculator — Tool Styles
 *
 * All styles scoped under #dadjogger-pace-calculator to prevent
 * conflicts with theme styles or other plugins. Class names follow
 * the BEM pattern established in render.php.
 *
 * Shared plugin styles (notices, base resets) live in
 * assets/css/dadjogger-tools.css. This file handles tool-specific
 * layout and presentation only.
 *
 * @package DadJogger_Tools
 * @author  Will Elnick
 * @since   1.0.0
 */

/* ==========================================================================
   Container and layout
   ========================================================================== */

#dadjogger-pace-calculator {
    font-family: Arial, sans-serif;
    font-size: 15px;
    line-height: 1.5;
    color: #333;
    max-width: 900px;
}

.dadjogger-pc__layout {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
    align-items: flex-start;
}

/* ==========================================================================
   Calculator panel
   ========================================================================== */

.dadjogger-pc__calculator {
    flex: 0 0 auto;
    width: 260px;
    padding: 18px;
    border: 1px solid #ddd;
    border-radius: 6px;
    background: #fff;
    box-sizing: border-box;
}

.dadjogger-pc__title {
    margin: 0 0 16px;
    font-size: 17px;
    font-weight: bold;
    text-align: center;
    color: #222;
}

/* ==========================================================================
   Form fields
   ========================================================================== */

.dadjogger-pc__field {
    margin-bottom: 12px;
}

#dadjogger-pace-calculator label {
    display: block;
    margin-bottom: 4px;
    font-size: 13px;
    font-weight: bold;
    color: #444;
    text-align: left;
}

.dadjogger-pc__field-note {
    font-weight: normal;
    font-size: 12px;
    color: #888;
}

#dadjogger-pace-calculator input[type="text"],
#dadjogger-pace-calculator input[type="number"],
#dadjogger-pace-calculator select {
    display: block;
    width: 100%;
    padding: 7px 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 14px;
    color: #333;
    background: #fff;
    box-sizing: border-box;
    text-align: center;
    -moz-appearance: textfield; /* Firefox: hide number spinners */
}

/* Hide number input spinners in Chrome/Safari/Edge */
#dadjogger-pace-calculator input[type="number"]::-webkit-inner-spin-button,
#dadjogger-pace-calculator input[type="number"]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

#dadjogger-pace-calculator input[type="text"]:focus,
#dadjogger-pace-calculator input[type="number"]:focus,
#dadjogger-pace-calculator select:focus {
    outline: 2px solid #0073aa;
    outline-offset: 1px;
    border-color: #0073aa;
}

/* ==========================================================================
   Action buttons
   ========================================================================== */

.dadjogger-pc__actions {
    display: flex;
    gap: 8px;
    margin-top: 16px;
}

#dadjogger-pace-calculator button {
    flex: 1;
    padding: 8px 12px;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.15s ease;
}

/* Calculate — primary action */
#dadjogger-pc-calculate {
    background: #0073aa;
    color: #fff;
}

#dadjogger-pc-calculate:hover,
#dadjogger-pc-calculate:focus {
    background: #005f8a;
}

/* Reset — secondary action */
#dadjogger-pc-reset {
    background: #f0f0f0;
    color: #444;
}

#dadjogger-pc-reset:hover,
#dadjogger-pc-reset:focus {
    background: #ddd;
}

/* ==========================================================================
   Result display
   ========================================================================== */

.dadjogger-pc__result {
    margin-top: 14px;
    min-height: 24px;
    font-size: 15px;
    font-weight: bold;
    text-align: center;
}

.dadjogger-pc__result--success {
    color: #0073aa;
}

.dadjogger-pc__result--error {
    color: #c00;
    font-weight: normal;
    font-size: 13px;
}

/* ==========================================================================
   Pace chart panel
   ========================================================================== */

.dadjogger-pc__chart-container {
    flex: 1 1 auto;
    min-width: 0; /* Prevents flex overflow on small containers */
    padding-top: 4px;
}

.dadjogger-pc__chart-wrapper {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: flex-start;
}

/* ==========================================================================
   Pace chart tables
   ========================================================================== */

.dadjogger-pc__chart-table {
    flex: 0 0 auto;
    border-collapse: collapse;
    font-size: 13px;
}

.dadjogger-pc__chart-table th,
.dadjogger-pc__chart-table td {
    border: 1px solid #ddd;
    padding: 6px 12px;
    text-align: center;
    white-space: nowrap;
}

.dadjogger-pc__chart-table th {
    background: #f4f4f4;
    font-weight: bold;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: #555;
}

.dadjogger-pc__chart-table td {
    color: #333;
}

.dadjogger-pc__chart-table tbody tr:nth-child(even) {
    background: #fafafa;
}

.dadjogger-pc__chart-table tbody tr:hover {
    background: #f0f7fc;
}

/* ==========================================================================
   Shared plugin disclaimer — tool-level placement override
   ========================================================================== */

#dadjogger-pace-calculator .dadjogger-tool__disclaimer {
    margin-top: 20px;
    font-size: 12px;
    color: #888;
    line-height: 1.5;
    border-top: 1px solid #eee;
    padding-top: 12px;
}

/* ==========================================================================
   Responsive — narrow viewports
   ========================================================================== */

@media ( max-width: 600px ) {

    .dadjogger-pc__layout {
        flex-direction: column;
        gap: 16px;
    }

    .dadjogger-pc__calculator {
        width: 100%;
    }

    .dadjogger-pc__chart-container {
        width: 100%;
    }

    .dadjogger-pc__chart-wrapper {
        gap: 8px;
    }

    .dadjogger-pc__chart-table th,
    .dadjogger-pc__chart-table td {
        padding: 5px 8px;
        font-size: 12px;
    }

}