/* McMillan Plan Finder Styles - Version 4.0 */

/* Product Title Display */
.mcmillan-product-title {
    font-size: 14px;
    color: #666;
    margin-top: 4px;
    font-style: italic;
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Impreza Theme Button Enhancement - Override for w-btn us-btn-style_9 */
#mcmillan-quiz-trigger.w-btn.us-btn-style_9 {
    /* Enhance existing Impreza button style if needed */
    transition: all 0.3s ease !important;
}

#mcmillan-quiz-trigger.w-btn.us-btn-style_9:hover {
    transform: translateY(-1px) !important;
}

/* Standard Button Styles (fallback) */
.mcmillan-btn {
    background-color: #007cba;
    color: white;
    border: none;
    padding: 12px 24px;
    font-size: 16px;
    cursor: pointer;
    border-radius: 4px;
    text-decoration: none;
    display: inline-block;
    transition: background-color 0.3s ease;
}

.mcmillan-btn:hover {
    background-color: #005a87;
}

.mcmillan-btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    width: 100%;
    padding: 16px 24px;
    font-size: 18px;
    font-weight: 600;
    border-radius: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    box-shadow: 0 3px 10px rgba(102, 126, 234, 0.3);
}

.mcmillan-btn-primary:hover {
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.mcmillan-btn-secondary {
    background-color: #6c757d;
    color: #fff!important;
    padding: 12px 24px;
    font-size: 16px;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.mcmillan-btn-secondary:hover {
    background-color: #5a6268;
}

/* Popup Overlay */
.mcmillan-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    z-index: 9998;
}

/* Popup Container - Perfectly Centered */
.mcmillan-popup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 9999;
    width: 90%;
    max-width: 520px;
    max-height: 85vh;
    overflow: hidden;
}

/* Popup Content */
.mcmillan-popup-content {
    background: white;
    border-radius: 12px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
    position: relative;
    overflow: hidden;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
}

/* Popup Header */
.mcmillan-popup-header {
    padding: 20px 24px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.mcmillan-popup-header h3 {
    margin: 0;
    font-size: 24px;
    color: #333;
}

/* Close Button */
.mcmillan-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #666;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.3s ease;
}

.mcmillan-close:hover {
    background-color: #f0f0f0;
}

/* Popup Body */
.mcmillan-popup-body {
    padding: 24px;
    flex: 1;
    overflow-y: auto;
}

/* Error Message Styles */
#mcmillan-error-message {
    text-align: center;
    padding: 20px;
}

.mcmillan-error-content h4 {
    color: #dc3545;
    margin: 0 0 15px 0;
    font-size: 20px;
}

.mcmillan-error-content p {
    color: #666;
    margin: 0 0 20px 0;
    line-height: 1.5;
    font-size: 16px;
}

/* Question Styles */
.mcmillan-question {
    margin-bottom: 24px;
}

.mcmillan-question label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: #333;
    font-size: 16px;
}

.mcmillan-question select {
    width: 100%;
    border: 2px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
    background-color: white;
    transition: border-color 0.3s ease;
}

.mcmillan-question select:focus {
    outline: none;
    border-color: #007cba;
}

/* Info icon styling */
.mcmillan-label-with-info {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.mcmillan-label-with-info label {
    margin: 0;
    flex: 1;
}

.mcmillan-info-icon {
    color: #666;
    cursor: pointer;
    font-size: 16px;
    transition: color 0.2s ease;
}

.mcmillan-info-icon:hover {
    color: #007cba;
}

/* Runner info modal styling */
.mcmillan-runner-info-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mcmillan-runner-info-modal {
    background: white;
    border-radius: 8px;
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.mcmillan-runner-info-header {
    padding: 20px 20px 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.mcmillan-runner-info-header h4 {
    margin: 0;
    font-size: 20px;
    color: #333;
}

.mcmillan-info-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #666;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.2s ease;
}

.mcmillan-info-close:hover {
    background-color: #f0f0f0;
    color: #333;
}

.mcmillan-runner-levels {
    padding: 20px;
}

.mcmillan-runner-level {
    margin-bottom: 15px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 6px;
    border-left: 4px solid #007cba;
}

.mcmillan-runner-level:last-child {
    margin-bottom: 0;
}

.mcmillan-runner-level strong {
    color: #007cba;
    display: block;
    margin-bottom: 5px;
}

/* NEW: Weeks Loading State Styles */
.mcmillan-weeks-loading {
    text-align: center;
    padding: 15px 0;
}

.mcmillan-weeks-loading p {
    margin: 0;
    color: #666;
    font-size: 14px;
    font-style: italic;
}

/* NEW: Training Weeks Question Animation */
#training-weeks-question {
    transition: all 0.3s ease;
}

#training-weeks-question.mcmillan-fade-in {
    animation: mcmillanQuestionFadeIn 0.4s ease-out;
}

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

/* Submit Wrapper */
.mcmillan-submit-wrapper {
    margin-top: 32px;
}

/* Loading State */
#mcmillan-loading {
    text-align: center;
    padding: 40px 20px;
}

#mcmillan-loading p {
    font-size: 18px;
    color: #666;
    margin: 0;
}

/* Prevent body scroll when popup is open */
body.mcmillan-popup-open {
    overflow: hidden;
}

/* Responsive Design */
@media (max-width: 768px) {
    .mcmillan-popup {
        width: 95%;
        max-width: none;
    }
    
    .mcmillan-popup-header {
        padding: 16px 20px;
    }
    
    .mcmillan-popup-header h3 {
        font-size: 20px;
    }
    
    .mcmillan-popup-body {
        padding: 20px;
    }
    
    .mcmillan-question {
        margin-bottom: 20px;
    }
    
    .mcmillan-question label {
        font-size: 14px;
    }
    
    .mcmillan-question select {
        font-size: 14px;
    }
    
    .mcmillan-btn-primary {
        font-size: 16px;
        padding: 12px 20px;
    }
    
    /* Mobile specific weeks loading */
    .mcmillan-weeks-loading {
        padding: 12px 0;
    }
    
    .mcmillan-weeks-loading p {
        font-size: 13px;
    }
}

/* Animation for popup - Smoother center animation */
@keyframes mcmillanFadeIn {
    from {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

.mcmillan-popup {
    animation: mcmillanFadeIn 0.25s ease-out;
}

/* NEW: Enhanced loading indicator for weeks */
.mcmillan-weeks-loading::before {
    content: "";
    display: inline-block;
    width: 16px;
    height: 16px;
    margin-right: 8px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #007cba;
    border-radius: 50%;
    animation: mcmillanSpin 1s linear infinite;
    vertical-align: middle;
}

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

/* ========================================
   DYNAMIC PLAN RESULTS PAGE STYLES
   ======================================== */

.mcmillan-plan-results {
    margin: 0 auto;
    padding: 0px 15px 20px 15px;
    font-family: inherit;
}

/* Top Section Container */
.mcmillan-top-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 10px;
}

/* Back to All Plans Link */
.mcmillan-back-link-container {
    margin-bottom: 0px;
}

.mcmillan-back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #007cba;
    text-decoration: none;
    font-size: 16px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.mcmillan-back-link:hover {
    color: #005a8b;
    text-decoration: none;
    transform: translateX(-3px);
}

.mcmillan-back-link i {
    font-size: 14px;
}

/* Main Page Title */
.mcmillan-main-plan-title {
    font-size: 28px !important;
    font-weight: 900 !important;
    text-align: left !important;
    margin: 0 0 0px 0!important;
    color: #333 !important;
    line-height: 1.2;
}

/* Custom Plan Header Styling */
.mcmillan-plan-header {
    margin-bottom: 40px;
}

.mcmillan-plan-details {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin: 20px 0;
    justify-content: flex-start;
}

.mcmillan-plan-detail-item {
    background: #EFEFEF;
    border: 1px solid #E0E0E0;
    padding: 4px 24px;
    border-radius: 2px;
    text-align: center;
    transition: all 0.3s ease;
    flex: 0 0 auto;
    white-space: nowrap;
}

.mcmillan-plan-detail-item:hover {
    background: #E8E8E8;
    border-color: #D0D0D0;
}

.mcmillan-plan-detail-value {
    font-size: 15px;
    font-weight: 500;
    color: #404040;
    margin: 0;
    line-height: 1.3;
}

/* Two Column Content Section */
.mcmillan-content-section {
    display: flex;
    gap: 40px;
    margin: 20px 0 60px 0px;
}

.mcmillan-content-left {
    flex: 2;
    padding-right: 40px;
    padding-left: 40px;
    border-right: 1px solid #B7B7B7;
}

.mcmillan-content-right {
    flex: 1;
    padding-left: 20px;
}

.mcmillan-content-left p {
    font-size: 16px;
    line-height: 24px;
    font-weight: 400;
    color: #333;
    margin-bottom: 20px;
}

.mcmillan-feature-list {
    list-style: none;
    padding: 0;
    margin: 25px 0;
    padding-left: 20px;
}

.mcmillan-feature-list li {
    margin-bottom: 15px;
    font-size: 16px;
    line-height: 1.5;
    color: #333;
    position: relative;
    padding-left: 24px;
}

.mcmillan-feature-list i {
    color: #007cba;
    position: absolute;
    left: 0;
    top: 3px;
}

.mcmillan-content-right h3 {
    font-size: 22px;
    font-weight: 700;
    color: #333;
    margin-bottom: 20px;
    margin-top: 0;
}

.mcmillan-includes-list {
    list-style: none;
    padding: 0;
    margin: 0 0 30px 0;
}

.mcmillan-includes-list li {
    display: flex;
    align-items: flex-start;
    margin-bottom: 12px;
    font-size: 16px;
    line-height: 1.4;
    color: #333;
}

.mcmillan-includes-list i {
    color: #28a745;
    margin-right: 10px;
    margin-top: 2px;
    flex-shrink: 0;
}

.mcmillan-cta-section {
    margin-top: 30px;
}

.mcmillan-add-to-cart-container {
    display: flex;
    align-items: center;
    gap: 15px;
}

.mcmillan-add-to-cart-btn {
    background: #e67e22;
    color: white;
    border: none;
    padding: 12px 24px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.mcmillan-add-to-cart-btn:hover {
    background: #d35400;
    transform: translateY(-1px);
}

.mcmillan-price {
    font-size: 18px;
    font-weight: 700;
    color: #333;
}

/* New Toolbar Design */
.mcmillan-plan-toolbar {
    background: linear-gradient(to bottom, #F7F8F9, #E3E5E7);
    border: 1px solid #E5E5E5;
    border-radius: 5px;
    padding: 15px 20px;
    margin: 20px 0;
    display: flex;
    align-items: center;
    gap: 20px;
}

.mcmillan-toolbar-section {
    display: flex;
    align-items: center;
    gap: 15px;
}

.mcmillan-toolbar-section:not(:last-child) {
    border-right: 1px solid #E2E2E2;
    padding-right: 20px;
}

.mcmillan-toolbar-add-to-cart {
    background: #f06b26;
    color: white;
    border: none;
    padding: 12px 24px;
    font-size: 17px;
    font-weight: 600;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.mcmillan-toolbar-add-to-cart:hover {
    background: #d35400;
    color: white;
    text-decoration: none;
}

.mcmillan-toolbar-price {
    font-size: 18px;
    font-weight: 700;
    color: #333;
}

.mcmillan-toolbar-label {
    font-weight: 600;
    color: #333;
    margin-right: 10px;
}

.mcmillan-toolbar-level-display {
    min-width: 20px;
    text-align: center;
    font-weight: 600;
    color: #333;
}

.mcmillan-toolbar-btn {
    background: transparent;
    border: none;
    border-radius: 4px;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 20px !important;
    color: #007cba;
    cursor: pointer;
    transition: all 0.2s ease;
}

.mcmillan-toolbar-btn:hover {
    background: #e0e0e0;
    transform: scale(1.1);
}

.mcmillan-toolbar-btn:active {
    background: #dee2e6;
    transform: translateY(1px);
}

.mcmillan-toolbar-separator {
    color: #666;
    font-size: 16px;
    margin: 0 4px;
    display: inline-block;
}

.mcmillan-toolbar-level-arrows {
    display: flex;
    flex-direction: row !important;
    align-items: center;
    gap: 8px;
}

/* Toolbar Select Dropdown */
.mcmillan-toolbar-select {
    background: transparent;
    border: none;
    color: #007cba;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    outline: none;
    padding: 4px 8px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.mcmillan-toolbar-select:hover {
    background: #f0f0f0;
}

.mcmillan-toolbar-select:focus {
    background: #f0f0f0;
    box-shadow: 0 0 0 2px rgba(0, 124, 186, 0.2);
}

/* Toolbar Info Icon */
.mcmillan-toolbar-info-icon {
    color: #999;
    font-size: 14px;
    margin-left: 6px;
    cursor: help;
}

.mcmillan-toolbar-info-icon:hover {
    color: #007cba;
}

/* Toolbar Fixed Version Text */
.mcmillan-toolbar-fixed-version {
    color: #007cba;
    font-size: 16px;
    font-weight: 600;
}

.mcmillan-toolbar-mileage-label {
    font-size: 16px;
    font-weight: 600;
    color: #333;
}

.mcmillan-toolbar-mileage-controls {
    display: flex;
    align-items: center;
    gap: 8px;
}

.mcmillan-toolbar-mileage-btn {
    background: none;
    border: none;
    color: #007cba;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 3px;
    transition: all 0.2s ease;
    line-height: 1;
}

.mcmillan-toolbar-mileage-btn:hover {
    background: rgba(253, 253, 253, 0.1);
    transform: scale(1.1);
}

.mcmillan-toolbar-mileage-btn:disabled {
    color: #ccc;
    cursor: not-allowed;
    opacity: 0.5;
}

.mcmillan-toolbar-mileage-btn:disabled:hover {
    background: none;
    transform: none;
}

.mcmillan-toolbar-separator {
    color: #898989;
    font-size: 24px;
    font-weight: normal;
}

.mcmillan-results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
    margin-bottom: 50px;
}

.mcmillan-result-item {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 8px;
    text-align: center;
    border: 1px solid #e9ecef;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.mcmillan-result-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.mcmillan-result-item h3 {
    font-size: 16px;
    color: #666;
    margin-bottom: 10px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.mcmillan-result-item p {
    font-size: 20px;
    color: #333;
    margin: 0;
    font-weight: 600;
}

/* Adjustment controls styling */
.mcmillan-result-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.mcmillan-adjustment-select {
    background: #fff;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    padding: 8px 12px;
    font-size: 14px;
    color: #333;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 120px;
    text-align: center;
}

.mcmillan-adjustment-select:focus {
    outline: none;
    border-color: #007cba;
    box-shadow: 0 0 0 2px rgba(0, 124, 186, 0.2);
}

.mcmillan-adjustment-select:hover {
    border-color: #007cba;
}

/* Enhanced styling for dropdowns with multiple options */
.mcmillan-adjustment-select:not([disabled]) {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-color: #28a745;
    box-shadow: 0 2px 4px rgba(40, 167, 69, 0.1);
}

.mcmillan-adjustment-select:not([disabled]):hover {
    border-color: #218838;
    box-shadow: 0 4px 8px rgba(40, 167, 69, 0.2);
    transform: translateY(-1px);
}

/* Loading options styling */
.mcmillan-loading-options {
    font-size: 12px;
    color: #666;
    font-style: italic;
    margin-top: 5px;
    text-align: center;
}

/* Loading state for adjustments */
.mcmillan-result-item.adjusting {
    opacity: 0.7;
    pointer-events: none;
}

.mcmillan-result-item.adjusting .mcmillan-adjust-btn {
    cursor: not-allowed;
}

/* Adjustment feedback styling */
.mcmillan-adjustment-feedback {
    background: #d4edda;
    color: #155724;
    padding: 10px 15px;
    border-radius: 4px;
    margin-top: 15px;
    font-weight: 500;
    text-align: center;
    border: 1px solid #c3e6cb;
    animation: mcmillanFeedbackSlideIn 0.3s ease-out;
}

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

/* Product Section - Simplified */
.mcmillan-product-section {
    margin: 20px 0;
}

.mcmillan-product-section h3 {
    margin-bottom: 15px;
}

.mcmillan-product-details {
    margin-bottom: 20px;
}

.mcmillan-product-price {
    margin-bottom: 15px;
}

.mcmillan-product-price .price {
    font-size: 24px;
    font-weight: bold;
}

.mcmillan-add-to-cart {
    margin-top: 20px;
}

.mcmillan-add-to-cart .mcmillan-btn {
    display: inline-block;
    padding: 12px 24px;
    text-decoration: none;
    border-radius: 4px;
    font-weight: 500;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.mcmillan-results-footer {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid #e9ecef;
}

.mcmillan-results-footer p {
    font-size: 16px;
    color: #666;
    margin: 0;
}

.mcmillan-results-footer a {
    color: #007cba;
    text-decoration: none;
    font-weight: 600;
}

.mcmillan-results-footer a:hover {
    text-decoration: underline;
}

/* Quiz Retry Section */
.mcmillan-quiz-retry {
    text-align: center;
    padding: 20px 0;
}

.mcmillan-quiz-retry p {
    margin-bottom: 15px;
    font-size: 16px;
    color: #666;
}

.mcmillan-retry-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

.mcmillan-retry-select {
    padding: 10px 15px;
    border: 2px solid #007cba;
    border-radius: 6px;
    font-size: 14px;
    background: white;
    color: #333;
    min-width: 180px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.mcmillan-retry-select:focus {
    outline: none;
    border-color: #005a87;
    box-shadow: 0 0 0 3px rgba(0, 124, 186, 0.1);
}

.mcmillan-retry-select:hover {
    border-color: #005a87;
}

#retry-quiz-link {
    padding: 10px 20px;
    font-size: 14px;
    text-decoration: none;
    white-space: nowrap;
    transition: all 0.3s ease;
}

#retry-quiz-link.ready {
    background-color: #28a745;
    color: white;
    transform: scale(1.05);
}

#retry-quiz-link.ready:hover {
    background-color: #218838;
    transform: scale(1.08);
}

/* Plan Preview Section Styles */
.mcmillan-plan-preview-section {
    margin-bottom: 20px;
}

.mcmillan-plan-preview-section h4 {
    margin-bottom: 15px;
    position: relative;
    text-align: center;
    padding: 0 20px;
}

.mcmillan-plan-preview-section h4::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background-color: #b7b7b7;
    z-index: 1;
}

.mcmillan-plan-preview-section h4 span {
    background: white;
    padding: 0 15px;
    position: relative;
    z-index: 2;
}

/* Two Week Layout Styles */
.mcmillan-weeks-container {
    margin-bottom: 0px; /* Remove bottom margin */
}

.mcmillan-week-section {
    margin-bottom: 0px;
}

.mcmillan-week-section h5 {
    margin-bottom: 10px;
    text-align: center;
    font-weight: 600;
    font-size: 19px;
}

.mcmillan-preview-weeks {
    display: flex !important;
    flex-wrap: nowrap !important;
    gap: 20px !important;
    grid-template-columns: none !important;
    grid: none !important;
}

.mcmillan-preview-weeks .preview-day {
    flex: 1 !important;
    min-width: 0 !important;
    max-width: calc(14.285% - 17px) !important;
    width: auto !important;
    display: block !important;
    float: none !important;
    clear: none !important;
}

/* Override any grid layouts */
.mcmillan-preview-weeks,
.mcmillan-preview-weeks * {
    grid-template-columns: none !important;
    grid-template-rows: none !important;
    grid-area: none !important;
}

/* Override any conflicting styles for carousel */
.mcmillan-carousel,
.mcmillan-carousel * {
    grid-template-columns: none !important;
    grid-template-rows: none !important;
    grid-area: none !important;
}

.mcmillan-carousel__slides * {
    flex-shrink: 0 !important;
}

.mcmillan-preview-day {
    background: white;
    border-radius: 8px;
    padding: 20px;
}

.mcmillan-days-grid {
    display: flex !important;
    flex-wrap: nowrap !important;
    gap: 20px !important;
    margin-top: 15px !important;
    grid-template-columns: none !important;
}

.mcmillan-day-column {
    background: #f8f9fa;
    border-radius: 6px;
    padding: 15px;
    border: 1px solid #e9ecef;
    flex: 1 !important;
    min-width: 0 !important;
    max-width: calc(14.285% - 17px) !important;
}

.mcmillan-day-column .day-header {
    font-size: 16px;
    font-weight: 600;
    color: #333!important;
    margin-bottom: 10px;
    padding-bottom: 8px;
    border-bottom: 2px solid #007cba;
    text-align: center;
}

@media (max-width: 768px) {
    .mcmillan-days-grid {
        flex-direction: column !important;
        gap: 15px !important;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .mcmillan-days-grid {
        flex-wrap: wrap !important;
        gap: 15px !important;
    }
}

.mcmillan-preview-day h5 {
    font-size: 18px;
    color: #007cba;
    margin: 0 0 15px 0;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.mcmillan-preview-day .week-title {
    font-size: 24px;
    color: #333;
    text-align: center;
    margin-bottom: 25px;
    padding-bottom: 10px;
    border-bottom: 2px solid #007cba;
}

.mcmillan-workout-detail {
    margin-bottom: 20px;
    padding: 5px;
    background: #fff;
    font-size: 15px;
    line-height: 20px;
}

.mcmillan-workout-detail .workout-name {
    font-size: 16px;
    color: #007cba!important;
    margin: 0 0 10px 0;
    font-weight: 600;
}

.mcmillan-preview-workout {
    margin-bottom: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
 }

.mcmillan-preview-workout:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.mcmillan-preview-workout h6 {
    font-size: 18px;
    color: #007cba!important;
    margin: 0 0 12px 0;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.mcmillan-preview-workout p {
    font-size: 14px;
    color: #666;
    margin: 0 0 8px 0;
    line-height: 1.5;
}

.workout-distance,
.workout-duration {
    font-size: 13px;
    color: #007cba;
    margin: 5px 0 0 0;
    font-weight: 500;
}

.workout-distance strong,
.workout-duration strong {
    color: #333;
}

/* Race Selector Shortcode Styles */
.mcmillan-race-selector {
    text-align: center;
    padding: 30px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    color: white;
    margin: 20px 0;
}

.mcmillan-race-selector h3 {
    font-size: 28px;
    margin-bottom: 10px;
    color: white;
    font-weight: 600;
}

.mcmillan-race-selector p {
    font-size: 16px;
    margin-bottom: 25px;
    color: rgba(255, 255, 255, 0.9);
}

.mcmillan-race-selector-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

.mcmillan-race-selector-dropdown {
    padding: 12px 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    font-size: 16px;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    min-width: 200px;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.mcmillan-race-selector-dropdown:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.8);
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.1);
}

.mcmillan-race-selector-dropdown:hover {
    border-color: rgba(255, 255, 255, 0.6);
}

.mcmillan-race-selector-dropdown option {
    background: #333;
    color: white;
}

#race-selector-button {
    padding: 12px 30px;
    font-size: 16px;
    font-weight: 600;
    border: 2px solid rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.7);
    cursor: not-allowed;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

#race-selector-button:enabled {
    background: rgba(255, 255, 255, 0.9);
    color: #333;
    cursor: pointer;
    border-color: rgba(255, 255, 255, 0.8);
}

#race-selector-button:enabled:hover {
    background: white;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* Responsive Design for Results Page */
@media (max-width: 768px) {
    .mcmillan-plan-results {
        padding: 0px!important;
    }
    
    .mcmillan-results-header h2 {
        font-size: 24px;
    }
    
    .mcmillan-results-header p {
        font-size: 16px;
    }
    
    .mcmillan-plan-details {
        flex-direction: column; /* Stack vertically instead of wrapping */
        justify-content: flex-start; /* Left align instead of center */
        gap: 2px;
    }
    
    .mcmillan-plan-detail-item {
        padding: 4px 24px;
    }
    
    .mcmillan-content-section {
        flex-direction: column;
        gap: 20px;
        margin: 20px 0 24px 0px!important;
    }
    
    .mcmillan-content-left {
        padding-right: 0;
        border-right: none;
        border-bottom: 0px!important;
        padding-bottom: 0px!important;
    }
    
    .mcmillan-content-right {
        padding-left: 0;
    }
    
    .mcmillan-add-to-cart-container {
        justify-content: center;
    }
    
    .mcmillan-top-container {
        padding: 0 10px;
    }
    
    .mcmillan-plan-toolbar {
        flex-direction: column;
        align-items: stretch;
        gap: 15px;
        padding: 15px;
    }
    
    .mcmillan-toolbar-section {
        justify-content: center;
        padding-right: 0;
        border-right: none;
        border-bottom: 1px solid #E2E2E2;
        padding-bottom: 15px;
    }
    
    .mcmillan-toolbar-section:last-child {
        border-bottom: none;
        padding-bottom: 0;
    }
    
    .mcmillan-results-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .mcmillan-result-item {
        padding: 20px;
    }
    
    .mcmillan-result-item h3 {
        font-size: 14px;
    }
    
    .mcmillan-result-item p {
        font-size: 18px;
    }
    
    .mcmillan-product-section {
        padding: 0px;
    }
    
    .mcmillan-product-section h3 {
        font-size: 20px;
    }
    
    .mcmillan-product-details h4 {
        font-size: 18px;
    }
    
    .mcmillan-product-price .price {
        font-size: 24px;
    }
    
    .mcmillan-add-to-cart .mcmillan-btn {
        padding: 12px 30px;
        font-size: 16px;
    }

    .mcmillan-week-section h5 {
        font-size: 17px;
    }
    
    
    /* Mobile adjustment controls */
    .mcmillan-result-content {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
    
    .mcmillan-adjustment-select {
        min-width: 100px;
        font-size: 13px;
        padding: 6px 10px;
    }
    
    
    .mcmillan-plan-title {
        font-size: 28px;
        margin-bottom: 20px;
    }
    
    .mcmillan-plan-detail-item {
        padding: 4px 24px;
    }
    
    /* Mobile retry controls */
    .mcmillan-retry-controls {
        flex-direction: column;
        gap: 10px;
    }
    
    .mcmillan-retry-select {
        min-width: 200px;
    }
    
    #retry-quiz-link {
        width: 100%;
        text-align: center;
    }
    
    /* Mobile race selector */
    .mcmillan-race-selector {
        padding: 20px;
    }
    
    .mcmillan-race-selector h3 {
        font-size: 24px;
    }
    
    .mcmillan-race-selector-controls {
        flex-direction: column;
        gap: 15px;
    }
    
    .mcmillan-race-selector-dropdown {
        min-width: 100%;
    }
    
    #race-selector-button {
        width: 100%;
        text-align: center;
    }
    
/* Mobile Plan Details Header and Read More - Hidden by default */
.mcmillan-plan-details-header {
    display: none !important; /* Hidden on desktop */
}

.mcmillan-read-more-toggle {
    display: none !important; /* Hidden on desktop */
}

/* Explicitly hide on desktop/tablet (767px and up) */
@media (min-width: 767px) {
    .mcmillan-content-left .mcmillan-plan-details-header,
    .mcmillan-content-left .mcmillan-read-more-toggle {
        display: none !important;
        visibility: hidden !important;
    }
    
    /* Ensure content is always fully visible on desktop */
    .mcmillan-plan-details-content {
        max-height: none !important;
        overflow: visible !important;
    }
}

/* Mobile styles for plan preview */
.mcmillan-plan-preview-section {
    padding: 20px 15px;
}
    
    .mcmillan-plan-preview-section h4 {
        font-size: 20px;
        text-align: center;
    }
    
    .mcmillan-preview-weeks {
        flex-direction: column !important;
        gap: 15px !important;
    }
    
    .mcmillan-preview-weeks .preview-day {
        max-width: 100% !important;
    }
    
    .mcmillan-preview-day {
        padding: 15px;
    }
    
    .mcmillan-preview-day h5 {
        font-size: 16px;
    }
    
    .mcmillan-preview-workout h6 {
        font-size: 14px;
    }
    
    .mcmillan-preview-workout p {
        font-size: 13px;
    }
    

}

/* Flickity Carousel Styles - Simplified */
.mcmillan-carousel {
    width: 100%;
    margin-bottom: 0px;
}

.mcmillan-carousel-cell {
    width: 14.285%;
    padding: 6px;
    box-sizing: border-box;
    min-height: 280px;
    display: flex;
    flex-direction: column;
}

/* Day column styles within carousel - Simplified */
.mcmillan-carousel .mcmillan-day-column {
    padding: 0px;
    max-width: 100% !important;
    min-width: 100% !important;
    flex: 1 !important;
    display: flex !important;
    flex-direction: column !important;
    height: 100% !important;
    width: 100% !important;
    /* Fixed height with scroll for consistent sizing */
    max-height: 230px;
    overflow-y: auto;
}

/* Style the scrollbar for better appearance */
.mcmillan-carousel .mcmillan-day-column::-webkit-scrollbar {
    width: 6px;
}

.mcmillan-carousel .mcmillan-day-column::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.mcmillan-carousel .mcmillan-day-column::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.mcmillan-carousel .mcmillan-day-column::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

.mcmillan-carousel .mcmillan-day-column .day-header {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 0px;
    text-align: center;
    padding: 8px;
}

/* Responsive design */
@media (max-width: 768px) {
    .mcmillan-carousel-cell {
        width: 100%;
        padding: 5px;
    }
    
    .mcmillan-day-column {
        max-width: 100% !important;
        min-width: 100% !important;
    }
}

/* Flickity custom styles - Simplified */
.flickity-button {
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid #e9ecef;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: #495057;
    transition: all 0.3s ease;
}

/* Override Flickity button positioning */
.flickity-prev-next-button.next {
    right: -44px!important;;
}

.flickity-prev-next-button.previous {
    left: -44px!important;;
}

.flickity-button:hover {
    background: #007bff;
    color: white;
    border-color: #007bff;
}

.flickity-button:focus {
    outline: 2px solid #007bff;
    outline-offset: 2px;
}

.flickity-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.flickity-page-dots {
    bottom: 10px;
}

.flickity-page-dots .dot {
    background: #dee2e6;
    opacity: 0.5;
    transition: all 0.3s ease;
}

.flickity-page-dots .dot.is-selected {
    background: #007bff;
    opacity: 1;
}

/* Override any conflicting styles for carousel */
.mcmillan-carousel,
.mcmillan-carousel * {
    grid-template-columns: none !important;
    grid-template-rows: none !important;
    grid-area: none !important;
}

.mcmillan-carousel-cell * {
    flex-shrink: 0 !important;
}

/* Product Actions - Simplified */
.mcmillan-product-actions {
    margin-top: 20px;
}

.mcmillan-btn {
    display: inline-block;
    padding: 12px 24px;
    text-decoration: none;
    border-radius: 4px;
    font-weight: 500;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.mcmillan-btn-primary {
    background: #007bff;
    color: white;
    border: none;
}

.mcmillan-btn-primary:hover {
    background: #0056b3;
    color: white;
}

/* ========================================
   PLAN ADJUSTMENT INTERFACE STYLES
   ======================================== */

/* Legacy Plan Adjustment Interface - Removed (replaced by toolbar version) */

/* Runner Level Badge */
.mcmillan-runner-level-badge {
    text-align: center;
    margin-bottom: 25px;
}

.mcmillan-badge {
    display: inline-block;
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.mcmillan-badge-beginner {
    background: linear-gradient(135deg, #4CAF50, #45a049);
    color: white;
}

.mcmillan-badge-intermediate {
    background: linear-gradient(135deg, #FF9800, #F57C00);
    color: white;
}

.mcmillan-badge-advanced {
    background: linear-gradient(135deg, #2196F3, #1976D2);
    color: white;
}

.mcmillan-badge-elite {
    background: linear-gradient(135deg, #9C27B0, #7B1FA2);
    color: white;
}

/* Adjustment Options */
.mcmillan-adjustment-options h3 {
    color: #333;
    font-size: 1.5em;
    margin-bottom: 20px;
    text-align: center;
}

.mcmillan-adjustment-group {
    padding: 25px;
  }

.mcmillan-adjustment-group h4 {
    color: #333;
    font-size: 1.2em;
    margin-bottom: 8px;
}

.mcmillan-adjustment-group p {
    color: #666;
    font-size: 0.95em;
    margin-bottom: 20px;
}

/* Week Selector */
.mcmillan-week-selector {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    margin-bottom: 15px;
}

.mcmillan-week-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 12px 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 100px;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.mcmillan-week-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.mcmillan-week-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    opacity: 0.6;
}

.mcmillan-btn-icon {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 4px;
}

.mcmillan-btn-text {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.mcmillan-current-weeks {
    text-align: center;
    background: white;
    border: 2px solid #667eea;
    border-radius: 8px;
    padding: 15px 25px;
    min-width: 80px;
}

.mcmillan-weeks-number {
    display: block;
    font-size: 24px;
    font-weight: bold;
    color: #667eea;
}

.mcmillan-weeks-label {
    display: block;
    font-size: 12px;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Available Weeks */
.mcmillan-available-weeks {
    text-align: center;
    font-size: 14px;
    color: #666;
}

.mcmillan-available-label {
    font-weight: 600;
}

.mcmillan-week-link {
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.mcmillan-week-link:hover {
    color: #5a6fd8;
    text-decoration: underline;
}

/* Intensity Selector */
.mcmillan-intensity-selector {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
}

.mcmillan-intensity-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 15px 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 120px;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.mcmillan-intensity-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.mcmillan-intensity-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    opacity: 0.6;
}

.mcmillan-btn-subtitle {
    font-size: 10px;
    opacity: 0.9;
    margin-top: 2px;
}

.mcmillan-current-intensity {
    text-align: center;
    background: white;
    border: 2px solid #667eea;
    border-radius: 8px;
    padding: 15px 25px;
    min-width: 100px;
}

.mcmillan-intensity-number {
    display: block;
    font-size: 24px;
    font-weight: bold;
    color: #667eea;
}

.mcmillan-intensity-label {
    display: block;
    font-size: 12px;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Race Distance Select */
.mcmillan-race-distance-select {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 16px;
    background: white;
    transition: border-color 0.3s ease;
}

.mcmillan-race-distance-select:focus {
    outline: none;
    border-color: #667eea;
}

/* Advanced Options */
.mcmillan-advanced-options {
    display: none;
}

.mcmillan-advanced-options.show {
    display: block;
}

.mcmillan-advanced-toggle {
    text-align: center;
    margin-top: 20px;
}

.mcmillan-toggle-btn {
    background: none;
    border: 2px solid #667eea;
    color: #667eea;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
}

.mcmillan-toggle-btn:hover {
    background: #667eea;
    color: white;
}

.mcmillan-toggle-icon {
    margin-left: 8px;
    transition: transform 0.3s ease;
}

.mcmillan-toggle-btn.active .mcmillan-toggle-icon {
    transform: rotate(180deg);
}

/* ========================================
   SIMPLIFIED PLAN CUSTOMIZATION STYLES
   ======================================== */

.mcmillan-plan-customization {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 25px;
    margin: 30px 0;
    border: 1px solid #e9ecef;
}

.mcmillan-adjustment-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
    align-items: flex-start;
}

.mcmillan-control-group {
    background: white;
    border-radius: 8px;
    padding: 20px;
    border: 1px solid #e9ecef;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    min-width: 200px;
    text-align: center;
}

.mcmillan-control-group label {
    display: block;
    font-weight: 600;
    color: #333;
    margin-bottom: 12px;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.mcmillan-week-controls,
.mcmillan-intensity-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 10px;
}

.mcmillan-control-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 6px;
    width: 32px;
    height: 32px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 16px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 6px rgba(102, 126, 234, 0.3);
}

.mcmillan-control-btn:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(102, 126, 234, 0.4);
}

.mcmillan-control-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    opacity: 0.6;
    transform: none;
    box-shadow: none;
}

.mcmillan-control-value {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    min-width: 80px;
    text-align: center;
}

.mcmillan-quick-links {
    display: flex;
    gap: 8px;
    justify-content: center;
    flex-wrap: wrap;
}

.mcmillan-quick-link {
    color: #667eea;
    text-decoration: none;
    font-size: 12px;
    font-weight: 500;
    padding: 4px 8px;
    border-radius: 4px;
    background: rgba(102, 126, 234, 0.1);
    transition: all 0.3s ease;
}

.mcmillan-quick-link:hover {
    background: rgba(102, 126, 234, 0.2);
    color: #5a6fd8;
}

.mcmillan-distance-select {
    width: 100%;
    padding: 10px 12px;
    border: 2px solid #e9ecef;
    border-radius: 6px;
    font-size: 14px;
    background: white;
    transition: border-color 0.3s ease;
}

.mcmillan-distance-select:focus {
    outline: none;
    border-color: #667eea;
}

/* Visual feedback for plan changes */
.mcmillan-adjustment-feedback {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
    padding: 12px 20px;
    border-radius: 8px;
    margin-top: 15px;
    text-align: center;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3);
    animation: slideInUp 0.3s ease-out;
}

.highlight-change {
    animation: highlightPulse 0.6s ease-in-out;
    background: rgba(102, 126, 234, 0.1);
    border-radius: 4px;
    padding: 2px 4px;
}

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

@keyframes highlightPulse {
    0% {
        background: rgba(102, 126, 234, 0.1);
    }
    50% {
        background: rgba(102, 126, 234, 0.3);
    }
    100% {
        background: rgba(102, 126, 234, 0.1);
    }
}

/* Responsive Design for Simplified Controls */
@media (max-width: 768px) {
    .mcmillan-adjustment-controls {
        flex-direction: column;
        align-items: center;
    }
    
    .mcmillan-control-group {
        width: 100%;
        max-width: 300px;
    }
}

/* Responsive Design for Plan Adjustments */
@media (max-width: 768px) {
    .mcmillan-week-selector,
    .mcmillan-intensity-selector {
        flex-direction: column;
        gap: 20px;
    }
    
    .mcmillan-week-btn,
    .mcmillan-intensity-btn {
        min-width: auto;
        width: 100%;
    }
    
    .mcmillan-current-weeks,
    .mcmillan-current-intensity {
        order: -1;
    }
}

/* Runner Info Section */
.mcmillan-runner-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 15px 0;
    padding: 12px 15px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 8px;
    border: 1px solid #dee2e6;
}


.mcmillan-start-over .mcmillan-btn {
    font-size: 13px;
    padding: 8px 16px;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.mcmillan-start-over .mcmillan-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

/* Plan Adjustment Controls - Redesigned as Toolbar */
.mcmillan-plan-adjustments {
    display: flex;
    gap: 0; /* No gap - use borders instead */
    margin: -40px 0 15px 0; /* Moderate negative top margin to move closer to plan preview */
    padding: 0;
    background: linear-gradient(to bottom, #F7F8F9, #E3E5E7); /* Back to original background */
    border-radius: 5px;
    border: 1px solid #E5E5E5;
    position: relative;
    min-height: 60px;
    align-items: center;
    justify-content: center;
}

.mcmillan-adjustment-group {
    display: flex;
    flex-direction: row;
    gap: 12px;
    align-items: center;
    padding: 12px 16px;
    min-height: 80px;
    justify-content: center;
    flex: 1 1 auto; /* Allow sections to grow and share space */
    position: relative;
    border-right: 1px solid #E2E2E2; /* Simple 1px border separator */
}

.mcmillan-adjustment-group:last-child {
    border-right: none; /* No border on last item */
}

/* Specific flex sizing for different toolbar sections */
.mcmillan-toolbar-cart-section {
    flex-direction: row;
    gap: 10px;
    align-items: center;
    flex: 0 0 auto;
    padding-right: 40px !important;
}

.mcmillan-adjustment-group:has(label:contains("Mileage")) {
    flex: 0 1 140px; /* Compact for mileage controls */
}

.mcmillan-adjustment-group:has(label:contains("Plan Version")) {
    flex: 0 1 160px; /* Reasonable size for dropdown */
}

.mcmillan-toolbar-action-section {
    flex: 0 0 120px; /* Fixed width for action buttons */
}

.mcmillan-adjustment-group label {
    font-weight: 600;
    font-size: 17px;
    color: #181618;
    margin: 0;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 6px;
}

.mcmillan-info-icon {
    width: 16px;
    height: 16px;
    opacity: 0.7;
    cursor: help;
}

.mcmillan-info-icon:hover {
    opacity: 1;
}

/* Plan Version Info Popup Styling */
#mcmillan-plan-version-popup .mcmillan-popup-content {
    max-width: 700px; /* Wider than default */
    width: 90%;
}

.mcmillan-runner-type-info h4 {
    color: #007cba;
    font-size: 18px; /* Smaller heading */
    font-weight: 600;
    margin: 0 0 8px 0; /* Less margin */
    border-bottom: 2px solid #007cba;
    padding-bottom: 6px;
}

.mcmillan-runner-type-info h4:not(:first-child) {
    margin-top: 18px; /* Less space between sections */
}

.mcmillan-runner-type-info p {
    color: #333;
    font-size: 15px; /* Smaller text */
    line-height: 1.4; /* Tighter line height */
    margin: 0 0 12px 0; /* Less bottom margin */
    text-align: justify;
}

.mcmillan-runner-type-info li {
    font-size: 15px;
 }


/* Training Mileage (Level) Controls */
.mcmillan-level-controls {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Hide the level text in the toolbar */
.mcmillan-current-runner-level {
    display: none;
}

/* Toolbar Add to Cart Section */
.mcmillan-toolbar-cart-section {
    flex-direction: row;
    gap: 4px;
    align-items: center;
    flex: 0 0 auto; /* Size based on content */

}

.mcmillan-toolbar-add-to-cart {
    background: #f06b26;
    color: white;
    border: none;
    padding: 8px 24px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    min-width: 180px;
}

.mcmillan-toolbar-add-to-cart:hover {
    background: #d14820;
}

.mcmillan-toolbar-add-to-cart i {
    margin-left: 8px;
    font-size: 12px;
}

.mcmillan-toolbar-price {
    font-size: 21px;
    font-weight: 600;
    color: #181618;
    margin-left: 14px;
}

.mcmillan-adjustment-group:has(label:contains("Mileage")) {
    flex: 0 0 auto; /* Compact mileage controls */
}

.mcmillan-adjustment-group:has(label:contains("Plan Version")) {
    flex: 1 1 auto; /* Plan Version can expand */
    min-width: 200px;
}

/* Toolbar Action Buttons */
.mcmillan-toolbar-action-section {
    justify-content: center;
    flex: 0 0 auto; /* Compact action buttons */
}

.mcmillan-toolbar-start-over,
.mcmillan-toolbar-get-help {
    background: transparent;
    border: none;
    font-weight: 600;
    font-size: 17px;
    color: #181618;
    white-space: nowrap;
    cursor: pointer;
    padding: 0px 20px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.mcmillan-toolbar-start-over:hover,
.mcmillan-toolbar-get-help:hover {
    background: #f0f0f0;
}

.mcmillan-toolbar-get-help img {
    margin-left: 8px;
    vertical-align: middle;
}
.mcmillan-toolbar-start-over img{
    position:relative; 
    top:3px;
    left:4px
}

.mcmillan-current-level,
.mcmillan-current-runner-level {
    font-weight: 600;
    color: #007cba;
    font-size: 16px;
}

.mcmillan-level-arrows {
    display: flex;
    flex-direction: row;
    gap: 2px;
}

.mcmillan-level-btn,
.mcmillan-runner-level-btn,
.mcmillan-elevation-btn {
    color: #007cba;
    border: none;
    background: transparent;
    width: 30px;
    height: 30px;
    cursor: pointer;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    font-weight: 600;
}

/* Mileage buttons (plus/minus) - larger font */
.mcmillan-runner-level-btn {
    font-size: 30px;
}

/* Elevation buttons (arrows) - smaller font */
.mcmillan-elevation-btn {
    font-size: 20px;
}

/* Level separator for mileage controls */
.mcmillan-level-separator {
    color: #898989;
    font-size: 22px;
    margin: 0 8px;
    font-weight: normal;
    position: relative;
    top: 4px;
}

.mcmillan-level-btn:hover,
.mcmillan-runner-level-btn:hover,
.mcmillan-elevation-btn:hover {
    background: #e0e0e0;
}

.mcmillan-level-btn:disabled,
.mcmillan-runner-level-btn:disabled {
    background: #6c757d;
    cursor: not-allowed;
    opacity: 0.5;
}

/* Plan Version Controls */
.mcmillan-version-controls {
    display: flex;
    align-items: center;
}

.mcmillan-version-select {
    padding: 4px 8px;
    border: none;
    border-radius: 4px;
    font-size: 17px;
    background: transparent;
    color: #007cba;
    font-weight: 600;
    cursor: pointer;
    min-width: 100px;
    outline: none;
    transition: all 0.2s ease;
}

.mcmillan-version-select:hover,
.mcmillan-version-select:focus {
    background: #f0f0f0;
    outline: none;
}

.mcmillan-fixed-version {
    font-weight: 600;
    color: #007cba;
    padding: 4px 8px;
    background: transparent;
    border-radius: 4px;
    font-size: 17px;
}

/* Mobile adjustments for new controls */
@media (max-width: 768px) {
    .mcmillan-runner-info {
        flex-direction: column;
        gap: 12px;
        text-align: center;
    }
    
    .mcmillan-plan-adjustments {
        flex-direction: column;
        gap: 0;
        min-height: auto;
    }
    
    .mcmillan-adjustment-group {
        align-items: center;
        border-right: none;
        border-bottom: 1px solid #E2E2E2;
        flex-direction: row;
        justify-content: space-between;
        padding: 15px 20px;
    }
    
    .mcmillan-adjustment-group:last-child {
        border-bottom: none;
    }
    
    .mcmillan-version-select {
        min-width: 120px;
    }
}

/* Loading state for adjustments */
.mcmillan-plan-adjustments.adjusting {
    opacity: 0.6;
    pointer-events: none;
}

.mcmillan-plan-adjustments.adjusting::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #007cba;
    border-top: 2px solid transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Mobile Plan Header Improvements */
@media (max-width: 768px) {
    /* Smaller H1 title */
    .mcmillan-main-plan-title {
        font-size: 20px !important;
        line-height: 1.1;
    }
    
    /* Clean up plan detail items - simple text list */
    .mcmillan-plan-detail-item {
        background: none !important;
        border: 0px !important;
        padding: 0px !important;
        text-align: left !important;
        display: block !important;
    }
    
    /* Reverse column order - All Plans Include comes first */
    .mcmillan-content-right {
        order: -1; /* Move to top */
    }
    
    /* Plan Details Header - Mobile Only */
    .mcmillan-plan-details-header {
        display: block !important;
        font-size: 18px;
        font-weight: bold;
        margin: 20px 0 4px 0;
        color: #181618;
    }
    
    /* Plan Details Content - Truncated by default on mobile */
    .mcmillan-plan-details-content {
        max-height: 140px;
        overflow: hidden;
        transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    }
    
    .mcmillan-plan-details-content.expanded {
        max-height: 1000px; /* Large enough to accommodate content */
        transition: max-height 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    }
    
    /* Read More Toggle Button - Mobile Only */
    .mcmillan-read-more-toggle {
        display: block !important;
        background: none;
        border: none;
        color: #168AE5;
        font-size: 16px;
        font-weight: 600;
        cursor: pointer;
        padding: 10px 0 0 0;
        text-decoration: underline;
    }
    
    .mcmillan-read-more-toggle:hover {
        color: #F06B26;
    }
    
    /* Chevron icon animation */
    .mcmillan-read-more-toggle i {
        margin-left: 8px;
        transition: transform 0.3s ease;
    }
    
    .mcmillan-read-more-toggle.expanded i {
        transform: rotate(180deg);
    }
    
    .mcmillan-content-left {
        order: 1; /* Move to bottom */
        padding-right: 0px!important;
        padding-left: 0px!important;
        border-top: 1px solid #B7B7B7;
        padding-top:30px;
        margin-top:20px;
    }
    
    /* Ensure parent container is flex for order to work */
    .mcmillan-plan-header {
        display: flex;
        flex-direction: column;
        border-bottom: 1px solid #B7B7B7;
        padding: 0px !important;
        margin-bottom: 30px;
    }
}

/* Carousel Navigation Arrows */
/* Hide arrows above 960px (when all 7 days are visible) */
@media (min-width: 961px) {
    .flickity-button.flickity-prev-next-button {
        display: none !important;
    }
}

/* Show arrows at 960px and below with orange hover */
@media (max-width: 960px) {
    .flickity-button.flickity-prev-next-button {
        display: block !important;
    }
    
    .flickity-button.flickity-prev-next-button:hover {
        background: #f06b26 !important;
    }
    
    .flickity-button.flickity-prev-next-button:hover .flickity-button-icon .arrow {
        fill: white !important;
    }
}

/* Responsive Carousel Day Count */
/* Only apply responsive widths below desktop - leave desktop as-is */

/* Tablet Large: Show 4 days */
@media (max-width: 960px) and (min-width: 769px) {
    .mcmillan-carousel-cell {
        width: calc(25% - 10px) !important; /* 4 days */
    }
}

/* Tablet Small: Show 3 days */
@media (max-width: 768px) and (min-width: 481px) {
    .mcmillan-carousel-cell {
        width: calc(33.333% - 10px) !important; /* 3 days */
    }
}

/* Mobile Large: Show 2 days */
@media (max-width: 480px) and (min-width: 321px) {
    .mcmillan-carousel-cell {
        width: calc(50% - 10px) !important; /* 2 days */
    }
}

/* Mobile Small: Show 1 day */
@media (max-width: 320px) {
    .mcmillan-carousel-cell {
        width: calc(100% - 10px) !important; /* 1 day */
    }
}

/* Reduce padding hack for smaller desktops */
@media (max-width: 1240px) {
    .mcmillan-toolbar-cart-section {
        padding-right: 10px !important;
    }
}


/* Mobile Layout for Toolbar - Applied to tablets and smaller */
@media (max-width: 1180px) {
    .mcmillan-plan-adjustments {
        flex-direction: column;
        gap: 0;
        background: white;
        border: none;
        border-radius: 0;
    }
    
    .mcmillan-adjustment-group {
        background: white;
        border-right: none;
        border-bottom: 1px solid #E2E2E2;
        flex-direction: row;
        justify-content: center; /* Center content on mobile too */
        padding: 15px 20px;
        min-height: 60px;
        width: 100%;
        float: none;
    }
    
    .mcmillan-adjustment-group:last-child {
        border-bottom: none;
    }
    
    /* All sections full width on mobile */
    .mcmillan-toolbar-cart-section,
    .mcmillan-adjustment-group:has(label:contains("Mileage")),
    .mcmillan-adjustment-group:has(label:contains("Plan Version")),
    .mcmillan-toolbar-action-section {
        width: 100%;
        float: none;
        border-right: none;
    }
}

/* Floating Risk-Free Banner - Desktop and Large Tablets */
.mcmillan-risk-free-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 75px;
    background-color: #222121;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.2);
}

.mcmillan-banner-main {
    display: flex;
    align-items: center;
    position: relative;
    gap: 20px;
}

.mcmillan-banner-badge {
    position: relative;
    top: -12px; /* Extend above the banner */
    flex-shrink: 0;
}

.mcmillan-banner-badge img {
    display: block;
}

.mcmillan-banner-content {
    /* Content will be centered with the banner */
}

.mcmillan-banner-content p {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.4;
    text-align: left;
    padding-right: 24px;
}

.mcmillan-banner-close {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
    padding: 5px 10px;
    line-height: 1;
}

.mcmillan-banner-close:hover {
    color: #ccc;
}

/* Hide banner on smaller tablets and mobile */
@media (max-width: 1024px) {
    .mcmillan-risk-free-banner {
        display: none !important;
    }
}

/* FINAL OVERRIDE: Force hide Plan Details elements on desktop/laptop (767px+) */
@media screen and (min-width: 767px) {
    .mcmillan-plan-details-header {
        display: none !important;
        visibility: hidden !important;
        height: 0 !important;
        margin: 0 !important;
        padding: 0 !important;
    }
    
    .mcmillan-read-more-toggle {
        display: none !important;
        visibility: hidden !important;
        height: 0 !important;
        margin: 0 !important;
        padding: 0 !important;
    }
}

