/* Training Plan Editor Styles */

body {
    background-color: #f1ebe7;
    font-family: 'Rajdhani', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-weight: 400;
    margin: 0;
    padding: 0;
}

.training-plan-display {
    font-family: Arial, sans-serif;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    background-color: #f1ebe7;
}

/* Plan Card and Actions */
.tp-plan-card {
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 20px;
    background-color: #f1ebe7;
    margin-bottom: 30px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.tp-plan-card h3 {
    margin-top: 0;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
    color: #333;
    font-family: 'League Spartan', 'Rajdhani', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif !important;
    font-weight: 800 !important;
    text-transform: uppercase;
}

.tp-plan-actions {
    margin-top: 20px;
}

.tp-plan-actions.tp-center {
    display: flex;
    gap: 15px;
    justify-content: center;
}

.tp-edit-plan-btn {
    display: inline-block;
    padding: 10px 20px;
    background-color: #2271b1;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    margin-right: 10px;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.tp-edit-plan-btn:hover {
    background-color: #135e96;
    text-decoration: none;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.tp-delete-plan-btn {
    display: inline-block;
    padding: 10px 20px;
    background-color: #dc3545;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.tp-delete-plan-btn:hover {
    background-color: #c82333;
    text-decoration: none;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

/* Plan Details and Description */
.tp-plan-description {
    margin-bottom: 20px;
}

.tp-plan-details {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
    background-color: #f1ebe7;
    padding: 15px;
    border-radius: 8px;
    border: 1px solid #eee;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

/* Plan Table */
.tp-plan-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 30px;
    border-radius: 8px;
    overflow: hidden;
    background-color: #f1ebe7;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    table-layout: fixed;
}

.tp-plan-table th, 
.tp-plan-table td {
    padding: 8px 3px; /* Less horizontal padding */
    text-align: left;
    vertical-align: top;
    width: 14.28%; /* Equal width for all days */
}

/* Day columns */
.tp-plan-table th {
    width: 14.28%;
    background-color: #f5f5f5;
    font-weight: 600;
    color: #444;
    padding: 12px;
    text-align: center;
    border-bottom: 1px solid #e0e0e0;
    border-right: 1px solid #e0e0e0;
}

/* Week header - full width across all columns */
.tp-week-header-row {
    background-color: #2271b1;
}

.tp-week-header-cell {
    padding: 0 !important;
    border: none !important;
}

.tp-week-header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    color: white;
    background-color: #2271b1;
}

.tp-week-title {
    font-weight: bold;
    font-size: 1.1em;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Highlight animation for updated totals */
.highlight-update {
    animation: highlight-fade 1.5s ease-in-out;
}

@keyframes highlight-fade {
    0% { color: white; }
    30% { color: #ffeb3b; }
    100% { color: white; }
}

/* Week type badge styles */
.tp-week-type-badge {
    display: inline-block;
    padding: 3px 8px;
    margin-left: 8px;
    font-size: 0.8em;
    font-weight: bold;
    border-radius: 12px;
    color: white;
    background-color: rgba(255, 255, 255, 0.2);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    vertical-align: middle;
}

/* Week type specific styling */
.tp-regular-week .tp-week-header-container {
    background-color: #d0ee88;
    color: #17131b;
}

.tp-recovery-week .tp-week-header-container {
    background-color: #16361c;
    color: white;
}

.tp-taper-week .tp-week-header-container {
    background-color: #c2b257;
    color: #17131b;
}

.tp-race-week .tp-week-header-container {
    background-color: #7c1c1c;
    color: white;
}

/* Day cells - with borders between them */
.tp-day-cell {
    padding: 8px;
    background-color: #fafafa;
    min-height: 150px;
    position: relative;
    overflow: visible;
    border-right: 1px solid #e0e0e0;
    border-bottom: 1px solid #e0e0e0;
}

/* Remove border from last column */
.tp-day-cell:last-child {
    border-right: none;
}

.tp-workout-container {
    cursor: move; /* Indicate future draggability */
    border-radius: 6px;
    border: 1px dashed transparent;
    padding: 5px;
    transition: border-color 0.2s ease;
    margin: 5px 0; /* Less horizontal margin */
    width: calc(100% - 2px); /* Nearly full width */
    max-width: 100%;
    overflow: visible;
}

.tp-workout-container:hover {
    border-color: #ddd;
}

.tp-workout {
    position: relative;
    margin-bottom: 10px;
    padding: 12px;
    background-color: white;
    border-radius: 6px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    border-left: 4px solid #2271b1;
    width: 100%; /* Full width */
    max-width: 100%;
    box-sizing: border-box;
}

.tp-workout:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.12);
}

.tp-workout:last-child {
    margin-bottom: 0;
}

/* Workout title (run type) alignment */
.tp-workout-title {
    font-weight: bold;
    margin-bottom: 8px;
    color: #333;
    font-size: 1.05em;
    padding-left: 0 !important; /* Remove any padding */
    text-align: left !important;
    white-space: normal;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Make sure padding is removed in all cases */
.training-plan-display:not(.tp-view-mode) .tp-workout-title,
.tp-workout-title {
    padding-left: 0 !important;
    margin-left: 0 !important;
}

.tp-workout-description {
    font-size: 0.9em;
    margin-top: 8px;
    color: #555;
    white-space: normal;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Editable distance styles */
.editable-distance {
    margin: 5px 0;
    padding: 2px 0;
    line-height: 1.4;
}

.distance-label {
    color: #555;
    font-size: 0.9em;
    margin-bottom: 2px;
}

.edit-distance-icon {
    display: inline-block;
    margin-left: 5px;
    color: #2271b1;
    cursor: pointer;
    font-size: 0.9em;
    opacity: 0.7;
    transition: all 0.2s ease;
    vertical-align: middle;
}

.edit-distance-icon:hover {
    opacity: 1;
    color: #135e96;
    transform: scale(1.2);
}

.distance-input {
    padding: 3px;
    border: 1px solid #ddd;
    border-radius: 3px;
    font-size: 0.9em;
    transition: border-color 0.2s ease;
}

.distance-input:focus {
    border-color: #2271b1;
    outline: none;
    box-shadow: 0 0 0 2px rgba(34, 113, 177, 0.2);
}

.distance-value {
    font-weight: 700;
    color: #2271b1;
    font-size: 1.05em;
}

.tp-rest-day {
    color: #999;
    font-style: italic;
    text-align: center;
    padding: 25px 0;
    background-color: #f9f9f9;
    border-radius: 6px;
    margin: 10px 0;
}

/* Workout type-specific colors */
.tp-workout-run-interval {
    border-left-color: #ff5722; /* Orange */
}

.tp-workout-run-easy {
    border-left-color: #4caf50; /* Green */
}

.tp-workout-run-long {
    border-left-color: #2196f3; /* Blue */
}

.tp-workout-run-tempo {
    border-left-color: #9c27b0; /* Purple */
}

.tp-workout-run-race {
    border-left-color: #f44336; /* Red */
    background-color: #fff8f8;
}

.tp-workout-run-shakeout {
    border-left-color: #795548; /* Brown */
}

.tp-strength-workout {
    background-color: #e8f4f8;
    border-left-color: #4a90e2;
}

/* Week action buttons */
.tp-week-actions {
    display: flex;
    gap: 10px;
    z-index: 100; /* Ensure buttons are above other elements */
}

.tp-save-week-btn, 
.tp-reset-week-btn {
    padding: 6px 12px;
    border-radius: 4px;
    border: none;
    font-size: 0.9em;
    cursor: pointer !important; /* Force cursor pointer */
    font-weight: 500;
    transition: all 0.2s ease;
    pointer-events: auto !important; /* Force clickability */
    opacity: 1 !important; /* Force full opacity */
    position: relative; /* Ensure proper stacking */
}

.tp-save-week-btn {
    background-color: #28a745; /* Green color for save button */
    color: white;
}

.tp-save-week-btn:hover {
    background-color: #218838; /* Darker green on hover */
    transform: translateY(-1px);
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.tp-reset-week-btn {
    background-color: #c91923;
    color: white;
    border: none;
}

.tp-reset-week-btn:hover {
    background-color: #a0151c;
    transform: translateY(-1px);
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

/* Ensure buttons are visible in all modes */
.tp-view-mode .tp-save-week-btn,
.tp-view-mode .tp-reset-week-btn {
    display: inline-block !important;
    pointer-events: auto !important;
    opacity: 1 !important;
}

/* Navigation and Links */
.tp-back-link {
    text-decoration: none;
    color: #2271b1;
    margin-bottom: 15px;
    display: inline-block;
    transition: color 0.2s ease;
}

.tp-back-link:hover {
    color: #135e96;
}

/* Notifications and Messages */
.tp-plan-not-found {
    padding: 20px;
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    border-radius: 8px;
    color: #721c24;
    margin-bottom: 20px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.tp-notice {
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.tp-warning {
    background-color: #fff3cd;
    border: 1px solid #ffeeba;
    color: #856404;
}

/* Debug and Admin Tools */
.tp-debug-container,
.tp-debug-toggle,
.tp-debug-info {
    display: none !important;
}

.tp-admin-data {
    margin-top: 20px;
    padding: 15px;
    border: 1px solid #ddd;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.tp-admin-data pre {
    background-color: #f5f5f5;
    padding: 15px;
    overflow: auto;
    max-height: 400px;
    border-radius: 5px;
}

.tp-error {
    color: #dc3545;
}

.tp-success {
    color: #28a745;
}

.tp-table-responsive {
    overflow-x: auto;
    margin-bottom: 20px;
    border-radius: 8px;
    scroll-behavior: smooth;
}

.tp-table-responsive.tp-centering {
    scroll-behavior: smooth;
    scrollbar-width: none;
}

.tp-table-responsive.tp-centering::-webkit-scrollbar {
    display: none;
}

/* Base table raw text display */
.tp-plan-text {
    padding: 20px;
    background-color: white;
    border-radius: 8px;
    border: 1px solid #ddd;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

/* Responsive styles */
@media screen and (max-width: 768px) {
    /* Improve container visibility */
    .tp-plan-table {
        font-size: 14px;
        width: 960px; /* Fixed width to ensure proper scrolling */
        min-width: 100%; /* Ensure it's at least as wide as the container */
    }
    
    .tp-table-responsive {
        overflow-x: auto;
        overflow-y: hidden; /* Prevent vertical scrolling within weeks */
        -webkit-overflow-scrolling: touch; /* Smooth scrolling on iOS */
        padding-bottom: 10px; /* Space for scrollbar */
        margin-bottom: 25px; /* More space between weeks */
        border-radius: 8px;
        position: relative;
        box-shadow: 0 0 3px rgba(0,0,0,0.1);
    }
    
    /* Ensure buttons are visible on mobile */
    .delete-workout-btn {
        position: absolute;
        top: 4px;
        right: 4px;
        width: 22px !important;
        height: 22px !important;
        border-radius: 50%;
        background-color: #dc3545 !important;
        color: white !important;
        text-align: center;
        font-size: 16px !important;
        line-height: 20px !important;
        font-weight: bold;
        cursor: pointer;
        z-index: 100;
        transition: all 0.15s ease-in-out;
        display: block !important;
        border: 1px solid white !important;
        box-shadow: 0 1px 3px rgba(0,0,0,0.2) !important;
        text-indent: 0 !important;
        overflow: visible !important;
        padding: 0 !important;
        opacity: 0.9 !important;
        transform: translate(0, 0) !important;
        text-shadow: none !important;
    }
    
    .delete-workout-btn:hover,
    .delete-workout-btn:active {
        transform: scale(1.1) !important;
        opacity: 1 !important;
        background-color: #c82333 !important;
    }
    
    .add-workout-btn {
        display: inline-flex !important;
        justify-content: center !important;
        align-items: center !important;
        width: 18px !important;
        height: 18px !important;
        min-width: 18px !important;
        min-height: 18px !important;
        border-radius: 50% !important;
        background-color: #16361c !important;
        color: #f1ebe7 !important;
        font-size: 12px !important;
        line-height: 1 !important;
        margin-left: 4px !important;
        cursor: pointer !important;
        border: 1px solid rgba(255,255,255,0.8) !important;
        box-shadow: 0 1px 2px rgba(0,0,0,0.2) !important;
        padding: 0 !important;
        opacity: 0.9 !important;
        vertical-align: middle !important;
        position: relative !important;
        top: -1px !important;
        text-shadow: none !important;
        transition: all 0.15s ease-in-out !important;
    }
    
    .add-workout-btn:hover,
    .add-workout-btn:active {
        transform: scale(1.1) !important;
        opacity: 1 !important;
        background-color: #0f2615 !important;
        box-shadow: 0 2px 4px rgba(0,0,0,0.3) !important;
    }

    /* For mobile day headers, make them more compact with proper add button alignment */
    .tp-plan-table th {
        position: relative;
        height: auto !important;
        padding: 8px 4px !important;
        text-align: center !important;
        white-space: nowrap !important;
        overflow: visible !important;
    }
    
    /* Place the add button next to day name */
    th .add-workout-btn {
        position: relative !important;
        vertical-align: middle !important;
        margin-top: -2px !important;
    }

    /* Ensure edit icons are visible */
    .edit-distance-icon,
    .edit-pace-icon {
        display: inline-block !important;
        font-size: 14px;
        padding: 5px;
        margin-left: 2px;
    }
    
    /* Mobile drag handle for workouts in edit mode */
    .tp-mobile-drag-handle {
        display: none;
        position: absolute;
        left: 6px;
        top: 6px;
        width: 24px;
        height: 24px;
        background-color: rgba(0, 0, 0, 0.1);
        border-radius: 4px;
        z-index: 10;
        cursor: move;
        color: #666;
        text-align: center;
        line-height: 24px;
        font-size: 14px;
    }
    
    /* Show drag handle in edit mode */
    .training-plan-display:not(.tp-view-mode) .tp-mobile-drag-handle {
        display: block;
    }
    
    /* Add padding to workout title to make room for drag handle */
    .training-plan-display:not(.tp-view-mode) .tp-workout-title {
        padding-left: 25px;
    }
    
    /* Ensure rows have fixed heights */
    .tp-plan-table th,
    .tp-plan-table td {
        min-width: 160px; /* Wider columns */
        width: 160px;
        padding: 10px 5px;
        height: auto;
    }
    
    /* Make scroll hint more visible */
    .tp-mobile-scroll-hint {
        text-align: center;
        font-size: 12px;
        color: #333;
        background-color: rgba(255,255,255,0.8);
        padding: 5px 0;
        position: absolute;
        bottom: -25px;
        width: 100%;
        pointer-events: none;
        animation: pulse 2s infinite;
        border-radius: 3px;
        box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    }
    
    /* Improve spacing for workout containers on mobile */
    .tp-workout-container {
        width: 100%;
    }
    
    .tp-workout {
        width: 100%;
        min-width: calc(100% - 4px);
    }
    
    /* Highlight draggable items more clearly on mobile */
    .tp-dragging {
        opacity: 0.7 !important;
        box-shadow: 0 5px 15px rgba(0,0,0,0.3) !important;
    }
    
    /* Make drop area more obvious */
    .tp-drop-hover {
        background-color: #e3f2fd !important;
        box-shadow: inset 0 0 0 3px #2196F3 !important;
        position: relative;
        animation: pulse-highlight 1s infinite;
    }
    
    /* Global buttons stacking on mobile */
    .tp-global-actions {
        flex-direction: column;
        gap: 10px;
    }
    
    .tp-global-save-btn,
    .tp-global-reset-btn {
        width: 100%;
        padding: 15px;
        font-size: 16px;
    }
    
    /* Improve edit toggle buttons */
    .tp-edit-button, 
    .tp-exit-edit-button {
        width: 100%;
        padding: 15px;
        margin-bottom: 10px;
        font-size: 16px;
    }
}

@keyframes pulse {
    0% { opacity: 0.7; }
    50% { opacity: 1; }
    100% { opacity: 0.7; }
}

@keyframes pulse-highlight {
    0% { background-color: #e3f2fd; }
    50% { background-color: #bbdefb; }
    100% { background-color: #e3f2fd; }
}

/* Touch-specific optimizations */
@media (pointer: coarse) {
    /* Larger touch targets */
    .tp-save-week-btn, 
    .tp-reset-week-btn {
        padding: 10px 16px;
        font-size: 14px;
        margin: 0 5px;
    }
    
    /* More space between days for better scrolling */
    .tp-plan-table th, 
    .tp-plan-table td {
        padding: 10px 8px;
    }
}

/* Drag and Drop Functionality */
.tp-drag-instructions {
    background-color: #d0ee88;
    color: #17131b;
    padding: 15px 20px;
    border-radius: 12px;
    margin-bottom: 20px;
    border-left: 4px solid #16361c;
    font-weight: 500;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.tp-dragging {
    opacity: 0.4 !important;
}

.tp-drop-hover {
    background-color: #f0f7ff !important;
    box-shadow: inset 0 0 0 2px #4a90e2 !important;
}

/* Save Status Indicators */
.tp-saving {
    color: #f39c12;
    font-style: italic;
    padding: 5px 10px;
    background-color: #fef9e7;
    border-radius: 4px;
    display: inline-block;
}

.tp-saved {
    color: #27ae60;
    padding: 5px 10px;
    background-color: #e9f7ef;
    border-radius: 4px;
    display: inline-block;
}

/* Editable pace styles */
.editable-pace {
    margin: 5px 0;
    padding: 2px 0;
    line-height: 1.4;
}

.pace-label {
    color: #555;
    font-size: 0.9em;
    margin-bottom: 2px;
}

.edit-pace-icon {
    display: inline-block;
    margin-left: 5px;
    color: #2271b1;
    cursor: pointer;
    font-size: 0.9em;
    opacity: 0.7;
    transition: all 0.2s ease;
    vertical-align: middle;
}

.edit-pace-icon:hover {
    opacity: 1;
    color: #135e96;
    transform: scale(1.2);
}

.pace-input {
    padding: 3px;
    border: 1px solid #ddd;
    border-radius: 3px;
    font-size: 0.9em;
    transition: border-color 0.2s ease;
}

.pace-input:focus {
    border-color: #2271b1;
    outline: none;
    box-shadow: 0 0 0 2px rgba(34, 113, 177, 0.2);
}

.pace-value {
    font-weight: 700;
    color: #2271b1;
    font-size: 1.05em;
}

/* Add Workout Button */
.add-workout-btn {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background-color: #16361c;
    color: #f1ebe7;
    border: none;
    font-size: 12px;
    line-height: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 0;
    margin-left: 5px;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
    vertical-align: middle;
    position: relative;
    top: -1px;
}

.add-workout-btn:hover {
    transform: scale(1.2);
    background-color: #0f2615;
}

/* Modal Styles */
.tp-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.5);
}

.tp-modal-content {
    background-color: #fefefe;
    margin: 10% auto;
    padding: 20px;
    border: 1px solid #ddd;
    width: 80%;
    max-width: 600px;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
    position: relative;
    animation: modalFadeIn 0.3s ease;
}

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

.tp-modal-close {
    color: #aaa;
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.2s;
}

.tp-modal-close:hover {
    color: #333;
}

.tp-modal h3 {
    margin-top: 0;
    color: #333;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
    margin-bottom: 15px;
}

/* Confirmation Modal Specific Styles */
.tp-confirm-modal-content {
    max-width: 450px;
}

.tp-confirm-modal-content p {
    font-size: 16px;
    line-height: 1.5;
    color: #555;
    margin-bottom: 20px;
}

.tp-modal-buttons {
    display: flex;
    justify-content: flex-end;
    gap: 15px;
    margin-top: 25px;
}

.tp-modal-button {
    padding: 10px 20px;
    border-radius: 5px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
}

.tp-modal-cancel {
    background-color: #f0f0f0;
    color: #333;
}

.tp-modal-cancel:hover {
    background-color: #e0e0e0;
}

.tp-modal-confirm {
    background-color: #dc3545;
    color: white;
}

.tp-modal-confirm:hover {
    background-color: #c82333;
    transform: translateY(-2px);
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

/* Workout Type Selection */
.tp-workout-type-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
}

.tp-workout-type-option {
    background-color: white;
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 15px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    border-left-width: 4px;
}

.tp-workout-type-option:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 10px rgba(0,0,0,0.1);
}

.tp-workout-type-name {
    font-weight: bold;
    font-size: 1.1em;
}

/* Workout type option colors */
.tp-workout-type-option.tp-workout-run-easy {
    border-left-color: #4caf50;
}

.tp-workout-type-option.tp-workout-run-long {
    border-left-color: #2196f3;
}

.tp-workout-type-option.tp-workout-run-interval {
    border-left-color: #ff5722;
}

.tp-workout-type-option.tp-workout-run-tempo {
    border-left-color: #9c27b0;
}

.tp-workout-type-option.tp-workout-run-race {
    border-left-color: #f44336;
}

/* Download PDF Button */
.tp-download-pdf-btn {
    display: inline-block;
    padding: 10px 20px;
    background-color: #d0ee88;
    color: #17131b;
    text-decoration: none;
    border-radius: 5px;
    border: none;
    font-weight: bold;
    font-size: 14px;
    margin: 10px 5px 10px 0;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.tp-download-pdf-btn:hover {
    background-color: #b8d870;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.tp-download-pdf-btn:before {
    content: "\f1c1"; /* PDF icon from Font Awesome */
    font-family: "FontAwesome", sans-serif;
    margin-right: 8px;
}

/* Download Calendar Button */
.tp-download-calendar-btn {
    display: inline-block;
    padding: 10px 20px;
    background-color: #16361c;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    border: none;
    font-weight: bold;
    font-size: 14px;
    margin: 10px 0 10px 5px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.tp-download-calendar-btn:hover {
    background-color: #0f2615;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.tp-download-calendar-btn:before {
    content: "\f073"; /* Calendar icon from Font Awesome */
    font-family: "FontAwesome", sans-serif;
    margin-right: 8px;
}

/* In case FontAwesome isn't available */
@font-face {
    font-family: 'FontAwesome';
    src: url('https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.4/webfonts/fa-solid-900.woff2') format('woff2');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

/* Responsive adjustments for the download button */
@media screen and (max-width: 768px) {
    .tp-download-pdf-btn {
        display: block;
        width: 100%;
        margin: 10px auto;
        text-align: center;
    }
    
    .tp-download-calendar-btn {
        display: block;
        width: 100%;
        margin: 10px auto;
        text-align: center;
    }
}

/* Global Plan Settings Panel */
.tp-global-settings {
    background-color: #f1ebe7;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 30px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.tp-global-settings h4 {
    margin-top: 0;
    margin-bottom: 20px;
    color: #333;
    font-size: 1.2em;
    border-bottom: 2px solid #2271b1;
    padding-bottom: 10px;
}

.tp-adjustment-section {
    margin-bottom: 25px;
}

.tp-adjustment-section-title {
    font-size: 0.9em;
    font-weight: bold;
    color: #555;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.tp-pace-adjustments {
    display: flex;
    flex-wrap: nowrap;
    gap: 15px;
    margin-bottom: 0;
}

.tp-distance-adjustments {
    display: flex;
    flex-wrap: nowrap;
    gap: 15px;
    margin-bottom: 0;
    margin-top: 0;
}

.tp-pace-adjustment-group,
.tp-distance-adjustment-group {
    flex: 1;
    min-width: 160px;
    background-color: #f9f9f9;
    border-radius: 6px;
    padding: 15px 12px;
    border-left: 4px solid #2271b1;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.tp-pace-type-label,
.tp-distance-type-label {
    font-weight: bold;
    margin-bottom: 12px;
    color: #333;
    font-size: 0.9em;
    text-align: center;
    line-height: 1.2;
    min-height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tp-pace-controls {
    display: flex;
    align-items: center;
    gap: 10px;
}

.tp-pace-btn {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: none;
    background-color: #2271b1;
    color: white;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.tp-pace-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.tp-pace-btn.decrease {
    background-color: #dc3545;
}

.tp-pace-btn.increase {
    background-color: #28a745;
}

.tp-current-adjustment {
    font-weight: bold;
    color: #2271b1;
    min-width: 40px;
    text-align: center;
}

.tp-pace-adjustment-group.easy,
.tp-distance-adjustment-group.easy {
    border-left-color: #4caf50; /* Green */
}

.tp-pace-adjustment-group.long,
.tp-distance-adjustment-group.long {
    border-left-color: #2196f3; /* Blue */
}

.tp-pace-adjustment-group.interval,
.tp-distance-adjustment-group.interval {
    border-left-color: #ff5722; /* Orange */
}

.tp-pace-adjustment-group.tempo,
.tp-distance-adjustment-group.tempo {
    border-left-color: #9c27b0; /* Purple */
}

.tp-pace-adjustment-group.race,
.tp-distance-adjustment-group.race {
    border-left-color: #f44336; /* Red */
}

.tp-distance-controls {
    display: flex;
    align-items: center;
    gap: 10px;
}

.tp-distance-btn {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: none;
    background-color: #2271b1;
    color: white;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.tp-distance-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.tp-distance-btn.decrease {
    background-color: #dc3545;
}

.tp-distance-btn.increase {
    background-color: #28a745;
}

.tp-current-distance-adjustment {
    font-weight: bold;
    color: #2271b1;
    min-width: 40px;
    text-align: center;
}

/* Global Actions */
.tp-global-actions {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

/* Global Save Button */
.tp-global-save-btn {
    flex: 1;
    padding: 12px;
    background-color: #28a745;
    color: white;
    text-align: center;
    border: none;
    border-radius: 5px;
    font-weight: bold;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.tp-global-save-btn:hover {
    background-color: #218838;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

/* Global Reset Button */
.tp-global-reset-btn {
    display: inline-block;
    padding: 12px 25px;
    background-color: #c91923;
    color: white;
    text-decoration: none;
    border-radius: 6px;
    border: none;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    margin-left: 15px;
}

.tp-global-reset-btn:hover {
    background-color: #a0151c;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

/* Responsive Adjustments for Global Settings */
@media screen and (max-width: 768px) {
    .tp-adjustment-section {
        margin-bottom: 20px;
    }
    
    .tp-adjustment-section-title {
        font-size: 0.85em;
        margin-bottom: 10px;
        text-align: center;
    }
    
    .tp-pace-adjustments,
    .tp-distance-adjustments {
        flex-wrap: wrap;
        gap: 12px;
    }
    
    .tp-pace-adjustment-group,
    .tp-distance-adjustment-group {
        flex: 1 1 100%;
        min-width: 100%;
        margin-bottom: 15px;
        padding: 12px 10px;
    }
    
    .tp-pace-type-label,
    .tp-distance-type-label {
        font-size: 0.85em;
        margin-bottom: 10px;
        min-height: 20px;
    }
    
    .tp-global-actions {
        flex-direction: column;
        gap: 10px;
    }
    
    .tp-global-save-btn,
    .tp-global-reset-btn {
        margin-bottom: 10px;
    }
}

/* Toggle System for Edit/View Mode */
.tp-edit-toggle {
    margin-bottom: 20px;
    text-align: right;
}

.tp-edit-button, .tp-exit-edit-button {
    display: inline-block;
    padding: 10px 20px;
    background-color: #16361c;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    cursor: pointer;
    border: none;
    font-weight: bold;
}

.tp-edit-button:hover, .tp-exit-edit-button:hover {
    background-color: #0f2615;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.tp-exit-edit-button {
    background-color: #16361c;
}

.tp-exit-edit-button:hover {
    background-color: #0f2615;
}

/* View Mode - Hide all edit functionalities */
.tp-view-mode .edit-distance-icon,
.tp-view-mode .edit-pace-icon,
.tp-view-mode .delete-workout-btn,
.tp-view-mode .add-workout-btn,
.tp-view-mode .tp-save-week-btn,
.tp-view-mode .tp-reset-week-btn,
.tp-view-mode .tp-global-settings,
.tp-view-mode .tp-drag-instructions,
.tp-view-mode .tp-week-actions {
    display: none !important;
}

/* Ensure these buttons are always visible */
.tp-download-pdf-btn,
.tp-load-latest-plan-btn {
    display: inline-block !important;
}

.tp-mobile-view .tp-table-responsive {
    margin-bottom: 35px;
}

.tp-mobile-scroll-hint {
    text-align: center;
    font-size: 12px;
    color: #888;
    padding: 5px 0;
    position: absolute;
    bottom: -25px;
    width: 100%;
    pointer-events: none;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { opacity: 0.6; }
    50% { opacity: 1; }
    100% { opacity: 0.6; }
}

/* Touch device optimization */
@media (pointer: coarse) {
    .tp-table-responsive {
        -webkit-overflow-scrolling: touch;
        overflow-x: auto;
        scrollbar-width: thin;
    }
    
    /* Larger touch targets on mobile */
    .tp-workout-container {
        margin: 8px 0;
    }
    
    .edit-distance-icon, 
    .edit-pace-icon, 
    .delete-workout-btn, 
    .add-workout-btn {
        padding: 8px;
        margin: -8px;
        background-clip: content-box;
    }
}

/* Load Latest Saved Plan Button */
.tp-load-latest-plan-btn {
    display: inline-block;
    padding: 8px 15px;
    background-color: #3498db;
    color: white;
    border: none;
    border-radius: 5px;
    margin: 0; /* Remove margins from button since the container has margin */
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.tp-load-latest-plan-btn:hover {
    background-color: #2980b9;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

/* Button container and help icon */
.tp-load-plan-container {
    display: flex;
    align-items: center;
    margin-top: 10px;
    margin-bottom: 15px;
}

.tp-help-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background-color: #f0f0f0;
    color: #666;
    font-size: 14px;
    font-weight: bold;
    margin-left: 10px;
    cursor: help;
    transition: all 0.2s ease;
    position: relative;
}

.tp-help-icon:hover {
    background-color: #e0e0e0;
    color: #333;
    transform: scale(1.1);
}

/* Add tooltip CSS to make it show on hover */
.tp-help-icon:after {
    content: attr(title);
    position: absolute;
    bottom: 130%;
    left: 50%;
    transform: translateX(-50%);
    min-width: 200px;
    padding: 8px 10px;
    border-radius: 4px;
    background-color: #333;
    color: #fff;
    font-size: 12px;
    font-weight: normal;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
    z-index: 100;
    text-align: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    white-space: normal;
}

.tp-help-icon:hover:after {
    opacity: 1;
    visibility: visible;
}

/* Mobile Drag Handle - Hide it completely */
.tp-mobile-drag-handle {
    display: none !important;
    opacity: 0 !important;
    width: 0 !important;
    height: 0 !important;
    visibility: hidden !important;
    position: absolute !important;
    z-index: -1 !important;
    pointer-events: none !important;
}

/* Mobile Touch Icons - Only shown on touch devices */
.tp-mobile-touch-overlay {
    display: none !important;
    opacity: 0 !important;
    visibility: hidden !important;
}

.tp-mobile-move-icon {
    display: none !important;
    opacity: 0 !important;
    visibility: hidden !important;
}

/* Enhanced styles for touch-dragging */
.tp-workout-container.tp-touch-active .tp-workout {
    background-color: white;
    transform: none;
    border-left-width: 4px;
}

/* Custom draggable helper for touch - ensure exact dimensions */
.tp-touch-drag-helper {
    background-color: transparent !important;
    pointer-events: none !important;
    z-index: 9999 !important;
    transform: none !important;
    border: none !important;
    margin: 0 !important;
    padding: 0 !important;
    max-width: none !important;
    min-width: 0 !important;
    overflow: visible !important;
}

.tp-touch-drag-helper .tp-workout {
    background-color: white !important;
    border-radius: 6px !important;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2) !important;
    opacity: 0.95 !important;
    border-left-width: 4px !important;
    border-left-style: solid !important;
    max-width: none !important;
    min-width: 0 !important;
    transform: none !important;
    overflow: hidden !important;
}

/* Keep original color for workout during drag */
.tp-touch-drag-helper .tp-workout.tp-workout-run-interval {
    border-left-color: #ff5722 !important; /* Orange */
}

.tp-touch-drag-helper .tp-workout.tp-workout-run-easy {
    border-left-color: #4caf50 !important; /* Green */
}

.tp-touch-drag-helper .tp-workout.tp-workout-run-long {
    border-left-color: #2196f3 !important; /* Blue */
}

.tp-touch-drag-helper .tp-workout.tp-workout-run-tempo {
    border-left-color: #9c27b0 !important; /* Purple */
}

.tp-touch-drag-helper .tp-workout.tp-workout-run-race {
    border-left-color: #f44336 !important; /* Red */
}

.tp-touch-drag-helper .tp-workout.tp-workout-run-shakeout {
    border-left-color: #795548 !important; /* Brown */
}

/* Auto-scroll indicator styles */
.tp-autoscroll-indicator {
    position: absolute;
    top: 50%;
    height: 50px;
    width: 30px;
    transform: translateY(-50%);
    background-color: rgba(33, 150, 243, 0.3);
    z-index: 100;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 18px;
    color: white;
}

.tp-autoscroll-left {
    left: 0;
    border-radius: 0 5px 5px 0;
}

.tp-autoscroll-right {
    right: 0;
    border-radius: 5px 0 0 5px;
}

.tp-autoscroll-indicator.active {
    opacity: 1;
}

/* More visible active state for dragging */
.tp-workout-container.tp-touch-active {
    z-index: 5;
}

/* Prevent page scrolling when dragging */
body.tp-touch-dragging {
    overflow: hidden !important;
    touch-action: none !important;
    -ms-touch-action: none !important;
    -webkit-touch-callout: none !important;
    -webkit-user-select: none !important;
    user-select: none !important;
}

/* Block table scrolling when dragging */
.tp-table-responsive.tp-drag-active {
    overflow: hidden !important;
    touch-action: none !important;
}

/* Media query for mobile devices */
@media screen and (max-width: 768px) {
    /* Style with no visible handles - just press anywhere on the workout */
    .training-plan-display:not(.tp-view-mode) .tp-workout {
        user-select: none;
        touch-action: none;
        -webkit-touch-callout: none;
        cursor: grab;
    }
    
    /* Ensure delete buttons are VERY visible on mobile */
    .delete-workout-btn {
        position: absolute;
        top: 4px;
        right: 4px;
        width: 22px !important;
        height: 22px !important;
        border-radius: 50%;
        background-color: #dc3545 !important;
        color: white !important;
        text-align: center;
        font-size: 16px !important;
        line-height: 20px !important;
        font-weight: bold;
        cursor: pointer;
        z-index: 100;
        transition: all 0.15s ease-in-out;
        display: block !important;
        border: 1px solid white !important;
        box-shadow: 0 1px 3px rgba(0,0,0,0.2) !important;
        text-indent: 0 !important;
        overflow: visible !important;
        padding: 0 !important;
        opacity: 0.9 !important;
        transform: translate(0, 0) !important;
        text-shadow: none !important;
    }
    
    .delete-workout-btn:hover,
    .delete-workout-btn:active {
        transform: scale(1.1) !important;
        opacity: 1 !important;
        background-color: #c82333 !important;
    }
    
    /* Redesigned add workout button */
    .add-workout-btn {
        display: inline-flex !important;
        justify-content: center !important;
        align-items: center !important;
        width: 18px !important;
        height: 18px !important;
        min-width: 18px !important;
        min-height: 18px !important;
        border-radius: 50% !important;
        background-color: #16361c !important;
        color: #f1ebe7 !important;
        font-size: 12px !important;
        line-height: 1 !important;
        margin-left: 4px !important;
        cursor: pointer !important;
        border: 1px solid rgba(255,255,255,0.8) !important;
        box-shadow: 0 1px 2px rgba(0,0,0,0.2) !important;
        padding: 0 !important;
        opacity: 0.9 !important;
        vertical-align: middle !important;
        position: relative !important;
        top: -1px !important;
        text-shadow: none !important;
        transition: all 0.15s ease-in-out !important;
    }
    
    .add-workout-btn:hover,
    .add-workout-btn:active {
        transform: scale(1.1) !important;
        opacity: 1 !important;
        background-color: #0f2615 !important;
        box-shadow: 0 2px 4px rgba(0,0,0,0.3) !important;
    }

    /* For mobile day headers, make them more compact with proper add button alignment */
    .tp-plan-table th {
        position: relative;
        height: auto !important;
        padding: 8px 4px !important;
        text-align: center !important;
        white-space: nowrap !important;
        overflow: visible !important;
    }
    
    /* Place the add button next to day name */
    th .add-workout-btn {
        position: relative !important;
        vertical-align: middle !important;
        margin-top: -2px !important;
    }

    /* Make table scrollable during drag but not directly under finger */
    .tp-table-responsive {
        scroll-behavior: smooth;
    }
    
    /* Prevent scrollbar from showing when dragging */
    .tp-table-responsive.tp-drag-scrolling::-webkit-scrollbar {
        display: none;
    }
    
    /* Ensure drop target is very visible */
    .tp-drop-hover {
        background-color: #e3f2fd !important;
        box-shadow: inset 0 0 0 3px #2196F3 !important;
        position: relative;
    }
    
    /* Add arrow indicators to drop target */
    .tp-drop-hover::before {
        content: "⬇";
        position: absolute;
        top: 15px;
        left: 50%;
        transform: translateX(-50%);
        color: #2196F3;
        font-size: 24px;
        font-weight: bold;
        animation: bounce 1s infinite;
        text-shadow: 0 1px 3px rgba(0,0,0,0.2);
    }
} 

/* Workout title should maintain padding only on desktop */
@media screen and (min-width: 769px) {
    .tp-workout-title {
        padding-left: initial;
    }
} 

/* Delete workout button - desktop version */
.delete-workout-btn {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background-color: #c91923;
    color: white;
    border: none;
    font-size: 12px;
    line-height: 16px;
    cursor: pointer;
    display: block;
    z-index: 10;
    transition: all 0.2s ease;
    text-align: center;
    font-weight: bold;
}

.delete-workout-btn:hover {
    background-color: #a0151c;
    transform: scale(1.1);
}

/* Additional desktop styles for new adjustment structure */
@media screen and (min-width: 769px) {
    .tp-workout-title {
        padding-left: initial;
    }
    
    /* Ensure desktop edit buttons are visible and properly styled */
    .edit-distance-icon,
    .edit-pace-icon {
        display: inline-block;
        margin-left: 5px;
        color: #2271b1;
        cursor: pointer;
        font-size: 0.9em;
        opacity: 0.7;
        transition: all 0.2s ease;
        vertical-align: middle;
    }
    
    .edit-distance-icon:hover,
    .edit-pace-icon:hover {
        opacity: 1;
        color: #135e96;
        transform: scale(1.2);
    }
    
    /* Ensure global pace adjustment panel works correctly */
    .tp-global-settings {
        display: block !important;
    }
    
    .tp-adjustment-section {
        margin-bottom: 25px;
    }
    
    .tp-adjustment-section-title {
        font-size: 0.9em;
        font-weight: bold;
        color: #555;
        margin-bottom: 8px;
        text-transform: uppercase;
        letter-spacing: 0.5px;
    }
    
    .tp-pace-adjustments {
        display: flex;
        flex-wrap: nowrap;
        gap: 15px;
        margin-bottom: 0 !important;
    }
    
    .tp-distance-adjustments {
        display: flex;
        flex-wrap: nowrap;
        gap: 15px;
        margin-bottom: 0 !important;
        margin-top: 0 !important;
    }
    
    .tp-pace-adjustment-group,
    .tp-distance-adjustment-group {
        flex: 1;
        min-width: 160px;
        background-color: #f9f9f9;
        border-radius: 6px;
        padding: 15px 12px;
        border-left: 4px solid #2271b1;
        box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    }
    
    .tp-global-actions {
        display: flex;
        gap: 15px;
        margin-top: 20px;
        flex-direction: row;
    }
    
    .tp-global-save-btn, 
    .tp-global-reset-btn {
        width: auto;
    }
}

#tp-save-status {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    padding: 10px 15px;
    border-radius: 4px;
    font-weight: bold;
}

#tp-save-status .tp-saving {
    color: #2196F3;
    background-color: rgba(33, 150, 243, 0.1);
    padding: 10px 15px;
    border-radius: 4px;
    border: 1px solid #2196F3;
}

#tp-save-status .tp-saved {
    color: #4CAF50;
    background-color: rgba(76, 175, 80, 0.1);
    padding: 10px 15px;
    border-radius: 4px;
    border: 1px solid #4CAF50;
}

#tp-save-status .tp-error {
    color: #f44336;
    background-color: rgba(244, 67, 54, 0.1);
    padding: 10px 15px;
    border-radius: 4px;
    border: 1px solid #f44336;
}

/* Animation for save status */
@keyframes fadeInOut {
    0% { opacity: 0; transform: translateY(-20px); }
    10% { opacity: 1; transform: translateY(0); }
    90% { opacity: 1; transform: translateY(0); }
    100% { opacity: 0; transform: translateY(-20px); }
}

#tp-save-status span {
    display: inline-block;
    animation: fadeInOut 3s ease-in-out;
}

/* Notes Icon Styles */
.yrt-notes-icon {
    position: absolute;
    bottom: 5px;
    right: 5px;
    width: 20px;
    height: 20px;
    background-color: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 12px;
    border: 1px solid #ddd;
    transition: all 0.2s ease;
    z-index: 10;
}

.yrt-notes-icon:hover {
    background-color: #f0f0f0;
    transform: scale(1.1);
}

.yrt-notes-icon.has-note {
    background-color: #4CAF50;
    color: white;
    border-color: #4CAF50;
}

.yrt-notes-icon.has-note:hover {
    background-color: #45a049;
}

/* Modal Styles */
.yrt-modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
}

.yrt-modal-content {
    background-color: #fefefe;
    margin: 10% auto;
    padding: 20px;
    border-radius: 8px;
    width: 90%;
    max-width: 500px;
    position: relative;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.yrt-modal-close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    position: absolute;
    top: 10px;
    right: 15px;
}

.yrt-modal-close:hover {
    color: #000;
}

.yrt-modal h3 {
    margin-top: 0;
    margin-bottom: 15px;
    color: #333;
}

.yrt-modal textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: inherit;
    font-size: 14px;
    resize: vertical;
    margin-bottom: 15px;
    box-sizing: border-box;
}

.yrt-modal-buttons {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.yrt-btn {
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: background-color 0.2s;
}

.yrt-btn-primary {
    background-color: #16361c;
    color: white;
}

.yrt-btn-primary:hover {
    background-color: #0f2615;
}

.yrt-btn-danger {
    background-color: #d63384;
    color: white;
}

.yrt-btn-danger:hover {
    background-color: #b02a5b;
}

.yrt-btn-secondary {
    background-color: #6c757d;
    color: white;
}

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

/* Notification Styles */
.yrt-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 12px 20px;
    border-radius: 4px;
    color: white;
    font-weight: 500;
    z-index: 10001;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.yrt-notification-success {
    background-color: #28a745;
}

.yrt-notification-error {
    background-color: #dc3545;
}

.yrt-notification-loading {
    background-color: #007cba;
    animation: pulse-loading 1.5s ease-in-out infinite;
}

@keyframes pulse-loading {
    0% { opacity: 0.7; }
    50% { opacity: 1; }
    100% { opacity: 0.7; }
}

/* Responsive adjustments for notes */
@media (max-width: 768px) {
    .yrt-modal-content {
        margin: 5% auto;
        width: 95%;
        padding: 15px;
    }
    
    .yrt-modal-buttons {
        flex-direction: column;
    }
    
    .yrt-btn {
        width: 100%;
        margin-bottom: 5px;
    }
    
    .yrt-notes-icon {
        width: 18px;
        height: 18px;
        font-size: 10px;
    }
} 

/* Apply Rajdhani font to all elements */
* {
    font-family: 'Rajdhani', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-weight: 400;
}

/* Ensure titles still use League Spartan */
.tp-plan-card h3,
h1, h2, h3.league-spartan {
    font-family: 'League Spartan', 'Rajdhani', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif !important;
    font-weight: 800 !important;
    text-transform: uppercase;
} 