/* ============================================================
   Couch to 5K Generator - Styles
   Matches the Year Round Running design system
   ============================================================ */

#c25k-widget {
    font-family: 'Rajdhani', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #f1ebe7;
    max-width: 1140px;
    margin: 0 auto;
    background-color: transparent;
    padding: 20px;
    border-radius: 8px;
    overflow-x: hidden;
}

#c25k-widget * {
    box-sizing: border-box;
}

/* ---- Typography ---- */

#c25k-widget h1,
#c25k-widget h2,
#c25k-widget h3 {
    text-align: center;
    margin-bottom: 15px;
    color: #f1ebe7;
}

#c25k-widget h1 {
    margin-top: 0;
    font-family: 'League Spartan', 'Rajdhani', Arial, sans-serif;
    font-size: 32px;
    font-weight: 800;
    letter-spacing: -0.5px;
}

#c25k-widget h2 {
    font-size: 22px;
    font-weight: 700;
    margin-top: 10px;
}

#c25k-widget h3 {
    font-size: 18px;
    font-weight: 600;
}

#c25k-widget p {
    color: #f1ebe7;
    font-size: 16px;
}

#c25k-widget a {
    color: #d0ee88;
    text-decoration: none;
    font-weight: bold;
}

#c25k-widget a:hover {
    text-decoration: underline;
}

/* ---- SEO Hero ---- */

.c25k-seo-hero {
    text-align: center;
    margin-bottom: 30px;
    padding: 30px 20px;
    background-color: #17131b;
    border-radius: 12px;
    border: 1px solid #d0ee88;
}

.c25k-hero-subtitle {
    max-width: 720px;
    margin: 0 auto;
    font-size: 19px;
    line-height: 1.65;
    color: #f1ebe7;
    opacity: 0.95;
}

/* ---- SEO Content Sections ---- */

.c25k-seo-section {
    background-color: #17131b;
    padding: 25px 20px;
    border-radius: 8px;
    margin-bottom: 25px;
    border: 1px solid rgba(208, 238, 136, 0.15);
}

.c25k-seo-section h2 {
    color: #d0ee88;
    font-size: 24px;
    margin-bottom: 15px;
}

.c25k-seo-section h3 {
    color: #f1ebe7;
    font-size: 18px;
    font-weight: 700;
    margin-top: 20px;
    margin-bottom: 8px;
    text-align: left;
}

.c25k-seo-section h3:first-of-type {
    margin-top: 16px;
}

.c25k-seo-section p {
    max-width: 860px;
    margin: 0 auto 12px auto;
    text-align: left;
    line-height: 1.7;
}

/* ---- Form Sections ---- */

.c25k-form-section {
    background-color: #17131b;
    padding: 25px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    border: 1px solid #d0ee88;
}

.c25k-form-section h2 {
    text-align: left;
    font-size: 20px;
    margin-bottom: 5px;
}

.c25k-section-desc {
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 15px;
    opacity: 0.85;
}

/* ---- Ability Buttons ---- */

.c25k-ability-buttons {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.c25k-ability-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 18px 14px;
    border: 2px solid #d0ee88;
    background-color: #17131b;
    color: #f1ebe7;
    font-family: 'Rajdhani', Arial, sans-serif;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.2s, color 0.2s, transform 0.15s;
    border-radius: 8px;
    text-align: center;
}

.c25k-ability-btn:hover {
    background-color: #2a1f2e;
    transform: translateY(-2px);
}

.c25k-ability-btn.selected {
    background-color: #d0ee88;
    color: #17131b;
}

.c25k-ability-icon {
    display: block;
    width: 32px;
    height: 32px;
    margin: 0 auto;
    color: currentColor;
}
.c25k-ability-icon svg {
    width: 100%;
    height: 100%;
    display: block;
}

.c25k-ability-label {
    font-size: 16px;
    font-weight: 700;
}

.c25k-ability-desc {
    font-size: 13px;
    font-weight: 400;
    opacity: 0.7;
}

.c25k-ability-btn.selected .c25k-ability-desc {
    opacity: 0.85;
}

/* ---- Day Buttons ---- */

.c25k-day-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 10px;
}

.c25k-day-btn {
    padding: 10px 15px;
    border: 2px solid #d0ee88;
    background-color: #17131b;
    color: #f1ebe7;
    font-family: 'Rajdhani', Arial, sans-serif;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.2s, color 0.2s;
    border-radius: 4px;
}

.c25k-day-btn.selected {
    background-color: #d0ee88;
    color: #17131b;
}

.c25k-selection-display {
    margin-top: 5px;
    margin-bottom: 10px;
    font-weight: bold;
    color: #f1ebe7;
    font-size: 15px;
}

/* ---- Weeks / Recommendation ---- */

.c25k-weeks-row {
    display: flex;
    gap: 20px;
    align-items: flex-start;
    flex-wrap: wrap;
}

.c25k-weeks-recommendation {
    flex: 1;
    min-width: 240px;
    background-color: rgba(208, 238, 136, 0.08);
    border-left: 4px solid #d0ee88;
    padding: 14px 16px;
    border-radius: 0 6px 6px 0;
    font-size: 15px;
    line-height: 1.5;
    color: #f1ebe7;
}

.c25k-weeks-input-group {
    min-width: 180px;
}

.c25k-weeks-input-group label {
    display: block;
    font-weight: bold;
    color: #f1ebe7;
    margin-bottom: 6px;
    font-size: 16px;
}

#c25kWeeks {
    padding: 10px 15px;
    width: 100%;
    max-width: 200px;
    font-size: 16px;
    height: 48px;
    border: 1px solid #d0ee88;
    border-radius: 4px;
    background-color: #17131b;
    color: #f1ebe7;
    font-family: 'Rajdhani', Arial, sans-serif;
}

#c25kWeeks:focus {
    outline: none;
    border-color: #d0ee88;
    box-shadow: 0 0 0 2px rgba(208, 238, 136, 0.2);
}

/* ---- Buttons ---- */

.c25k-button-container {
    display: flex;
    gap: 15px;
    justify-content: flex-start;
    align-items: center;
    margin: 20px 0;
    flex-wrap: wrap;
}

#c25kGenerateBtn,
#c25kStartOverBtn {
    padding: 20px 40px;
    font-size: 20px;
    font-weight: bold;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Rajdhani', Arial, sans-serif;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 4px 6px rgba(22, 54, 28, 0.2);
    line-height: 1.2;
    display: inline-block;
}

#c25kGenerateBtn {
    background-color: #d0ee88;
    color: #17131b;
}

#c25kGenerateBtn:hover:not(:disabled) {
    background-color: #b8d870;
    transform: translateY(-2px);
    box-shadow: 0 6px 8px rgba(208, 238, 136, 0.25);
}

#c25kGenerateBtn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
    transform: none;
}

#c25kStartOverBtn {
    background-color: #16361c;
    color: #d0ee88;
}

#c25kStartOverBtn:hover {
    background-color: #2a4a2e;
    transform: translateY(-2px);
    box-shadow: 0 6px 8px rgba(22, 54, 28, 0.3);
}

/* Plan actions (e.g. Download PDF) */
.c25k-plan-summary-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    background: linear-gradient(135deg, #17131b 0%, #1e2a1a 100%);
    border-radius: 10px;
    padding: 20px 24px;
    margin-bottom: 20px;
    border: 1px solid #16361c;
    flex-wrap: wrap;
}

.c25k-plan-summary {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 40px;
    flex-wrap: wrap;
    flex: 1;
    min-width: 0;
}

.c25k-plan-actions {
    margin: 0;
    flex-shrink: 0;
}

.c25k-download-pdf-btn {
    padding: 18px 36px;
    font-size: 18px;
    font-weight: bold;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: 'Rajdhani', Arial, sans-serif;
    background-color: #d0ee88;
    color: #17131b;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.c25k-download-pdf-btn:hover {
    background-color: #b8d870;
    color: #17131b;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(208, 238, 136, 0.35);
}

/* ---- Note Box ---- */

.c25k-note-box {
    background-color: #17131b;
    padding: 15px 20px;
    border-radius: 8px;
    border: 1px solid #d0ee88;
    margin-top: 10px;
}

.c25k-note-box p {
    margin: 0;
    font-size: 15px;
    line-height: 1.6;
}

/* ============================================================
   Plan Output
   ============================================================ */

#c25kPlanContainer {
    margin-top: 30px;
}

#c25kPlanTitle {
    font-family: 'League Spartan', 'Rajdhani', Arial, sans-serif;
    font-weight: 800;
    font-size: 28px;
    text-align: center;
    margin-bottom: 5px;
}

/* ---- Plan Summary ---- */


.c25k-summary-stat {
    text-align: center;
}

.c25k-summary-stat .c25k-stat-value {
    display: block;
    font-size: 28px;
    font-weight: 800;
    color: #d0ee88;
    font-family: 'League Spartan', Arial, sans-serif;
    line-height: 1.1;
}

.c25k-summary-stat .c25k-stat-label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: #f1ebe7;
    opacity: 0.8;
    margin-top: 2px;
}

/* ---- Table Wrapper ---- */

.c25k-table-wrapper {
    overflow-x: auto;
    width: 100%;
    position: relative;
    margin-bottom: 20px;
    -webkit-overflow-scrolling: touch;
}

#c25kPlanTable {
    border-collapse: collapse;
    width: 100%;
    min-width: 780px;
    font-family: 'Rajdhani', Arial, sans-serif;
    font-weight: 400;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.15);
    border-radius: 8px;
    overflow: hidden;
    color: #17131b;
}

#c25kPlanTable th {
    background-color: #16361c;
    color: #ffffff;
    padding: 12px;
    text-align: center;
    font-weight: bold;
    font-size: 15px;
}

#c25kPlanTable td {
    padding: 12px;
    text-align: center;
    border-bottom: 1px solid #ccc;
    vertical-align: top;
    font-size: 14px;
    line-height: 1.45;
    background-color: #f1ebe7;
    color: #17131b;
}

/* Day cells (not week column): force light background so they never render black on dark themes */
#c25kPlanTable td:not(.c25k-week-cell):not(.c25k-cell-race) {
    background-color: #f1ebe7 !important;
}
#c25kPlanTable tbody tr:nth-child(even) td:not(.c25k-week-cell):not(.c25k-cell-race) {
    background-color: #e8e0d8 !important;
}

/* Week info cell: background from JS (phase color) via inline style */
.c25k-week-cell {
    background-color: #e8f0d8;
}

/* Phase badge */
.c25k-phase-badge {
    display: inline-block;
    font-size: 0.7em;
    padding: 2px 6px;
    border-radius: 3px;
    margin-top: 2px;
    font-weight: 600;
    letter-spacing: 0.5px;
    color: #ffffff;
}

/* Run type styling in cells: explicit dark colors */
.c25k-cell-type {
    font-weight: bold;
    color: #16361c;
}

.c25k-cell-detail {
    color: #333333;
    font-size: 0.9em;
}

.c25k-cell-rest {
    color: #888888;
    font-weight: 600;
}

.c25k-cell-note {
    color: #555555;
    font-size: 0.85em;
    font-style: italic;
    margin-top: 3px;
}

/* 5K Race cell highlight: dark green background, high-contrast light text */
#c25kPlanTable td.c25k-cell-race {
    background-color: #16361c !important;
    color: #f1ebe7 !important;
}

#c25kPlanTable td.c25k-cell-race .c25k-cell-type {
    color: #f1ebe7;
    font-size: 1.1em;
}

#c25kPlanTable td.c25k-cell-race .c25k-cell-detail,
#c25kPlanTable td.c25k-cell-race .c25k-cell-note {
    color: #e8f4d0;
}

/* ---- Week description row ---- */
.c25k-week-desc-row td {
    background-color: #faf8f5 !important;
    padding: 10px 16px !important;
    text-align: left !important;
    font-size: 14px;
    color: #333333 !important;
    line-height: 1.55;
    border-bottom: 2px solid #16361c !important;
}

.c25k-week-desc-row strong {
    color: #16361c;
}

/* ============================================================
   Tips Grid
   ============================================================ */

.c25k-tips-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin-top: 15px;
}

.c25k-tip-card {
    background-color: rgba(208, 238, 136, 0.06);
    padding: 18px;
    border-radius: 8px;
    border: 1px solid rgba(208, 238, 136, 0.15);
}

.c25k-tip-card h3 {
    text-align: left;
    font-size: 17px;
    margin-bottom: 6px;
    color: #d0ee88;
}

.c25k-tip-card p {
    margin: 0;
    font-size: 15px;
    line-height: 1.6;
    opacity: 0.9;
}

/* ============================================================
   FAQ
   ============================================================ */

.c25k-faq-list {
    max-width: 860px;
    margin: 0 auto;
}

.c25k-faq-item {
    border-bottom: 1px solid rgba(208, 238, 136, 0.15);
    padding: 14px 0;
}

.c25k-faq-item summary {
    cursor: pointer;
    font-weight: 700;
    font-size: 17px;
    color: #d0ee88;
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.c25k-faq-item summary::-webkit-details-marker {
    display: none;
}

.c25k-faq-item summary::after {
    content: '+';
    font-size: 22px;
    color: #d0ee88;
    font-weight: 300;
    transition: transform 0.2s;
}

.c25k-faq-item[open] summary::after {
    content: '−';
}

.c25k-faq-item p {
    margin: 10px 0 0 0;
    font-size: 15px;
    line-height: 1.7;
    padding-right: 24px;
}

/* ============================================================
   CTA Section
   ============================================================ */

.c25k-cta-section {
    margin: 35px 0;
}

.c25k-cta-box {
    background: linear-gradient(135deg, #16361c 0%, #1e2a1a 100%);
    border-radius: 12px;
    padding: 35px 30px;
    text-align: center;
    border: 2px solid #d0ee88;
}

.c25k-cta-box h2 {
    color: #d0ee88;
    font-size: 26px;
    margin-bottom: 10px;
}

.c25k-cta-box p {
    max-width: 700px;
    margin: 0 auto 20px auto;
    font-size: 16px;
    line-height: 1.7;
}

.c25k-cta-features {
    list-style: none;
    padding: 0;
    max-width: 480px;
    margin: 0 auto 25px auto;
    text-align: left;
}

.c25k-cta-features li {
    padding: 5px 0 5px 28px;
    position: relative;
    color: #f1ebe7;
    font-size: 15px;
    line-height: 1.5;
}

.c25k-cta-features li::before {
    content: '✓';
    position: absolute;
    left: 4px;
    color: #d0ee88;
    font-weight: bold;
}

.c25k-cta-button {
    display: inline-block;
    padding: 18px 40px;
    background-color: #d0ee88;
    color: #17131b !important;
    font-family: 'Rajdhani', Arial, sans-serif;
    font-size: 20px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-radius: 8px;
    text-decoration: none !important;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(208, 238, 136, 0.3);
}

.c25k-cta-button:hover {
    background-color: #b8d870;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(208, 238, 136, 0.4);
    text-decoration: none !important;
}

/* ============================================================
   Tools Grid
   ============================================================ */

.c25k-tools-section {
    margin-bottom: 30px;
}

.c25k-tools-section h2 {
    color: #d0ee88;
    margin-bottom: 20px;
}

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

.c25k-tool-card {
    display: block;
    background-color: #17131b;
    padding: 22px 18px;
    border-radius: 8px;
    border: 1px solid rgba(208, 238, 136, 0.2);
    text-decoration: none !important;
    transition: all 0.25s ease;
}

.c25k-tool-card:hover {
    border-color: #d0ee88;
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25);
    text-decoration: none !important;
}

.c25k-tool-card h3 {
    text-align: left;
    color: #d0ee88;
    font-size: 18px;
    margin-bottom: 6px;
}

.c25k-tool-card p {
    margin: 0;
    font-size: 14px;
    opacity: 0.85;
    line-height: 1.5;
}

/* ============================================================
   Display Toggle (Time / Distance)
   ============================================================ */

.c25k-display-toggle {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
    justify-content: center;
    margin-bottom: 8px;
    padding: 6px 10px;
    background: rgba(208, 238, 136, 0.06);
    border: 1px solid rgba(208, 238, 136, 0.2);
    border-radius: 6px;
}

.c25k-toggle-row,
.c25k-distance-unit-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.c25k-toggle-label {
    font-weight: 700;
    font-size: 13px;
    color: #f1ebe7;
    margin-right: 4px;
}

.c25k-toggle-btn,
.c25k-unit-btn {
    padding: 4px 10px;
    border: 1px solid #d0ee88;
    background: #17131b;
    color: #f1ebe7;
    font-family: 'Rajdhani', Arial, sans-serif;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    border-radius: 6px;
    transition: background-color 0.2s, color 0.2s;
}

.c25k-toggle-btn:hover,
.c25k-unit-btn:hover {
    background: #2a1f2e;
}

.c25k-toggle-btn.selected,
.c25k-unit-btn.selected {
    background: #d0ee88;
    color: #17131b;
}

/* ============================================================
   Responsive
   ============================================================ */

@media screen and (max-width: 768px) {
    #c25k-widget {
        padding: 10px;
    }

    #c25k-widget h1 {
        font-size: 24px;
    }

    .c25k-ability-buttons {
        grid-template-columns: 1fr;
    }

    .c25k-day-buttons {
        justify-content: flex-start;
    }

    .c25k-day-btn {
        padding: 8px 12px;
        font-size: 14px;
    }

    .c25k-weeks-row {
        flex-direction: column;
    }

    .c25k-button-container {
        flex-direction: column;
    }

    #c25kGenerateBtn,
    #c25kStartOverBtn {
        width: 100%;
        max-width: 400px;
    }

    .c25k-tips-grid {
        grid-template-columns: 1fr;
    }

    .c25k-tools-grid {
        grid-template-columns: 1fr;
    }

    .c25k-plan-summary-bar {
        flex-direction: column;
        align-items: stretch;
    }

    .c25k-plan-summary {
        gap: 20px;
        justify-content: center;
    }

    .c25k-plan-actions {
        width: 100%;
        margin-top: 16px;
    }

    .c25k-plan-actions .c25k-download-pdf-btn {
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }

    .c25k-display-toggle {
        flex-direction: column;
        gap: 10px;
        padding: 12px 14px;
    }

    .c25k-toggle-row,
    .c25k-distance-unit-row {
        flex-wrap: wrap;
        justify-content: center;
    }

    .c25k-toggle-btn,
    .c25k-unit-btn {
        padding: 7px 14px;
        font-size: 14px;
    }

    .c25k-table-wrapper {
        max-width: 100%;
    }

    #c25kPlanTable {
        font-size: 0.9em;
        color: #17131b;
    }

    #c25kPlanTable th,
    #c25kPlanTable td {
        padding: 8px 6px !important;
    }

    #c25kPlanTable td {
        color: #17131b;
    }

    .c25k-cta-button {
        padding: 16px 30px;
        font-size: 18px;
    }
}

@media screen and (max-width: 480px) {
    #c25kPlanTable {
        font-size: 0.8em;
    }

    #c25kPlanTable th,
    #c25kPlanTable td {
        padding: 6px 4px !important;
    }

    .c25k-ability-btn {
        padding: 14px 10px;
    }
}
