/*
Theme Name: Elite VO2 Max Calculator
Theme URI: https://example.com
Author: Your Name
Author URI: https://example.com
Description: A single-page VO2 Max performance calculator theme with ACSM percentile scoring and training pace projections.
Version: 1.0
Requires PHP: 7.4
Text Domain: vo2-max-calculator
*/

:root {
    --bg: #f8fafc;
    --card-bg: #ffffff;
    --primary: #2563eb;
    --primary-hover: #1d4ed8;
    --success: #16a34a;
    --warning-bg: #eff6ff;
    --warning-border: #3b82f6;
    --warning-text: #1e40af;
    --text-dark: #0f172a;
    --text-light: #64748b;
    --border: #e2e8f0;
}

* {
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text-dark);
    line-height: 1.5;
}

.vo2-wrap {
    padding: 40px 15px;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

/* Site header */
.site-header {
    text-align: center;
    padding: 18px 15px;
    border-bottom: 1px solid var(--border);
    background: var(--card-bg);
}

.site-header .site-title {
    margin: 0;
    font-size: 20px;
    font-weight: 800;
    color: var(--text-dark);
    letter-spacing: -0.5px;
}

.site-header .site-title a {
    color: inherit;
    text-decoration: none;
}

.site-nav {
    margin-top: 8px;
}

.site-nav-list {
    list-style: none;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 18px;
    margin: 0;
    padding: 0;
}

.site-nav-list li {
    margin: 0;
}

.site-nav-list a {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-light);
    text-decoration: none;
}

.site-nav-list a:hover,
.site-nav-list .current-menu-item > a {
    color: var(--primary);
}

/* Site footer */
.site-footer {
    text-align: center;
    padding: 20px 15px;
    color: var(--text-light);
    font-size: 12px;
    border-top: 1px solid var(--border);
}

.vo2-shortcode-zone {
    margin-bottom: 20px;
}

.vo2-zone-footer {
    margin-bottom: 12px;
}

/* Blog posts & pages - clean content on white background */
.content-wrap {
    background: #ffffff;
    max-width: 760px;
    margin: 0 auto;
    padding: 40px 20px 60px 20px;
}

.post-card {
    padding-bottom: 32px;
    margin-bottom: 32px;
    border-bottom: 1px solid var(--border);
}

.post-card:last-child {
    border-bottom: none;
}

.post-thumb img,
.post-thumb-single img {
    width: 100%;
    height: auto;
    border-radius: 12px;
    margin-bottom: 16px;
    display: block;
}

.post-title {
    font-size: 24px;
    font-weight: 800;
    line-height: 1.3;
    margin: 0 0 6px 0;
}

.post-title a {
    color: var(--text-dark);
    text-decoration: none;
}

.post-title a:hover {
    color: var(--primary);
}

.post-meta {
    font-size: 13px;
    color: var(--text-light);
    margin-bottom: 14px;
}

.post-excerpt {
    font-size: 15px;
    color: var(--text-dark);
    line-height: 1.65;
}

.post-readmore {
    display: inline-block;
    margin-top: 12px;
    font-size: 14px;
    font-weight: 700;
    color: var(--primary);
    text-decoration: none;
}

.post-readmore:hover {
    color: var(--primary-hover);
}

.post-pagination {
    text-align: center;
    margin-top: 20px;
    font-size: 14px;
}

.post-pagination a,
.post-pagination span {
    display: inline-block;
    margin: 0 4px;
    padding: 8px 14px;
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-dark);
    text-decoration: none;
}

.post-pagination a:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.post-pagination .current {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}

.page-title {
    font-size: 30px;
    font-weight: 900;
    line-height: 1.25;
    margin: 0 0 16px 0;
    color: var(--text-dark);
    letter-spacing: -0.5px;
}

/* Standard entry content typography, untouched by the calculator styles */
.page-entry-content {
    font-size: 16px;
    line-height: 1.75;
    color: var(--text-dark);
}

.page-entry-content p {
    margin: 0 0 20px 0;
}

.page-entry-content h2 {
    font-size: 22px;
    font-weight: 800;
    margin: 32px 0 14px 0;
}

.page-entry-content h3 {
    font-size: 18px;
    font-weight: 700;
    margin: 26px 0 12px 0;
}

.page-entry-content ul,
.page-entry-content ol {
    margin: 0 0 20px 0;
    padding-left: 22px;
}

.page-entry-content li {
    margin-bottom: 8px;
}

.page-entry-content a {
    color: var(--primary);
}

.page-entry-content img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    margin: 10px 0;
}

.page-entry-content blockquote {
    margin: 20px 0;
    padding: 12px 20px;
    border-left: 3px solid var(--primary);
    color: var(--text-light);
    font-style: italic;
}

.post-comments {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px solid var(--border);
}

header.page-header {
    text-align: center;
    margin-bottom: 30px;
}

h1 {
    font-size: 34px;
    font-weight: 900;
    margin-bottom: 6px;
    color: var(--text-dark);
    letter-spacing: -0.8px;
}

.subtitle {
    color: var(--text-light);
    font-size: 15px;
}

.unit-toggle-container {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
}

.unit-toggle {
    background: #e2e8f0;
    padding: 3px;
    border-radius: 10px;
    display: flex;
    gap: 2px;
}

.unit-btn {
    padding: 6px 16px;
    border-radius: 8px;
    border: none;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    background: transparent;
    color: var(--text-light);
    transition: all 0.2s ease;
}

.unit-btn.active {
    background: white;
    color: var(--primary);
    box-shadow: 0 2px 5px rgba(0,0,0,0.08);
}

.card {
    background: var(--card-bg);
    padding: 32px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.04);
    border: 1px solid var(--border);
}

.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
}

@media (max-width: 700px) {
    .grid-2, .grid-3 { grid-template-columns: 1fr; }
}

.section-header {
    font-size: 14px;
    font-weight: 800;
    margin-top: 22px;
    margin-bottom: 12px;
    color: var(--primary);
    border-bottom: 1px solid var(--border);
    padding-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-light);
    margin-bottom: 5px;
    display: block;
}

input, select {
    width: 100%;
    padding: 12px 14px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: white;
    font-size: 14px;
    margin-bottom: 14px;
    transition: 0.2s ease;
    box-sizing: border-box;
}

input:focus, select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37,99,235,0.12);
}

button.calc-btn {
    width: 100%;
    padding: 16px;
    border-radius: 12px;
    border: none;
    font-size: 16px;
    font-weight: 800;
    color: white;
    background: linear-gradient(135deg, var(--primary), #3b82f6);
    cursor: pointer;
    transition: 0.25s ease;
    margin-top: 10px;
    box-shadow: 0 4px 12px rgba(37,99,235,0.25);
}

button.calc-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 22px rgba(37,99,235,0.35);
}

.loading-box {
    display: none;
    text-align: center;
    padding: 35px 20px;
}

.spinner {
    width: 44px;
    height: 44px;
    border: 4px solid var(--border);
    border-top: 4px solid var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto 15px auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.status-text {
    font-weight: 600;
    color: var(--primary);
    font-size: 15px;
}

.results {
    display: none;
    margin-top: 30px;
    animation: fadeIn 0.4s ease-in-out forwards;
}

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

.score-banner {
    background: linear-gradient(180deg, #f8fafc 0%, #edf2f7 100%);
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 28px 20px;
    text-align: center;
    margin-bottom: 25px;
    position: relative;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.8);
}

.score-num {
    font-size: 52px;
    font-weight: 900;
    color: var(--success);
    line-height: 1;
    margin: 10px 0 6px 0;
    letter-spacing: -1px;
}

.score-rank {
    font-size: 12px;
    font-weight: 800;
    color: var(--primary);
    background: rgba(37,99,235,0.1);
    padding: 5px 14px;
    border-radius: 20px;
    display: inline-block;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.confidence-bar-container {
    max-width: 320px;
    margin: 12px auto 0 auto;
    text-align: center;
}

.confidence-bar {
    height: 8px;
    background: #e2e8f0;
    border-radius: 4px;
    position: relative;
    overflow: hidden;
    margin-bottom: 6px;
}

.confidence-fill {
    position: absolute;
    height: 100%;
    background: linear-gradient(90deg, #3b82f6, #16a34a);
    border-radius: 4px;
}

.confidence-text {
    font-size: 12px;
    color: var(--text-light);
    font-weight: 600;
}

.percentile-pill {
    margin-top: 10px;
    display: inline-block;
    background: #dcfce7;
    color: #15803d;
    font-size: 12px;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 12px;
}

.res-card {
    background: white;
    padding: 18px;
    border-radius: 14px;
    border: 1px solid var(--border);
    box-shadow: 0 2px 8px rgba(0,0,0,0.02);
}

.res-card-title {
    font-size: 11px;
    font-weight: 800;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
}

.res-card-val {
    font-size: 19px;
    font-weight: 800;
    color: var(--text-dark);
}

.action-bar {
    display: flex;
    gap: 10px;
    margin-bottom: 25px;
}

.action-btn {
    flex: 1;
    padding: 12px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: white;
    font-size: 13px;
    font-weight: 700;
    color: var(--text-dark);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: all 0.2s ease;
}

.action-btn:hover {
    background: #f1f5f9;
    border-color: var(--primary);
}

.coaching-card {
    background: #f0fdf4;
    border: 1.5px solid #bbf7d0;
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 20px;
}

.coaching-badge {
    display: inline-block;
    font-size: 11px;
    font-weight: 800;
    padding: 4px 10px;
    border-radius: 20px;
    background: #dcfce7;
    color: #15803d;
    margin-bottom: 8px;
    text-transform: uppercase;
}

.coaching-title {
    font-size: 16px;
    font-weight: 800;
    color: #166534;
    margin-bottom: 6px;
}

.coaching-body {
    font-size: 13.5px;
    color: #14532d;
    line-height: 1.5;
}

.authority-box {
    background: #f8fafc;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 16px;
    margin-top: 25px;
    font-size: 12px;
    color: var(--text-light);
    line-height: 1.55;
}

.authority-title {
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 4px;
}

.diag-alert {
    background: var(--warning-bg);
    border: 1.5px solid var(--warning-border);
    border-radius: 14px;
    padding: 18px;
    margin-bottom: 20px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.diag-alert-icon {
    font-size: 22px;
    line-height: 1;
}

.diag-alert-title {
    font-weight: 800;
    color: var(--warning-text);
    font-size: 15px;
    margin-bottom: 2px;
}

.diag-alert-desc {
    font-size: 13px;
    color: #1e3a8a;
    line-height: 1.4;
}

.rx-container {
    display: flex;
    flex-direction: column;
    gap: 18px;
    margin-top: 20px;
}

.rx-card {
    background: white;
    border: 2px solid var(--primary);
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.04);
    position: relative;
    overflow: hidden;
}

.rx-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 6px;
    height: 100%;
    background: var(--primary);
}

.rx-badge {
    display: inline-block;
    font-size: 11px;
    font-weight: 800;
    padding: 5px 12px;
    border-radius: 30px;
    background: rgba(37,99,235,0.1);
    color: var(--primary);
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.rx-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--text-dark);
}

.rx-body {
    font-size: 14px;
    color: var(--text-light);
    line-height: 1.55;
    margin-bottom: 18px;
}

.rx-btn {
    display: block;
    text-align: center;
    background: var(--success);
    color: white;
    padding: 14px;
    border-radius: 10px;
    font-weight: 700;
    font-size: 15px;
    text-decoration: none;
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px rgba(22,163,74,0.2);
}

.rx-btn:hover {
    background: #15803d;
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(22,163,74,0.3);
}

#printable-card {
    display: none;
}

@media print {
    body { padding: 0; background: white; }
    .card, .page-header, .action-bar, .sticky-bar, .site-header, .site-footer { display: none !important; }
    #printable-card {
        display: block !important;
        padding: 40px;
        border: 4px double #2563eb;
        border-radius: 20px;
        text-align: center;
    }
}

.sticky-bar {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: #0f172a;
    color: white;
    padding: 12px 20px;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.2);
    z-index: 1000;
    align-items: center;
    justify-content: space-between;
}

.sticky-text {
    font-size: 13px;
    font-weight: 600;
}

.sticky-btn {
    background: var(--success);
    color: white;
    padding: 8px 16px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 700;
    font-size: 13px;
}
