/**
 * Component styles - Buttons, modals, forms, and UI components
 */

/* Button Styles - Unified Design */
.btn {
    padding: 16px 32px;
    border: 2px solid var(--border-color);
    border-radius: 0;
    font-size: 1em;
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: 500;
    font-family: var(--font-heading);
    text-transform: none;
    letter-spacing: normal;
    min-width: 200px;
    min-height: 54px;
    width: 200px;
    height: auto;
    text-align: center;
    display: inline-block;
    box-sizing: border-box;
    word-wrap: break-word;
    hyphens: auto;
    line-height: 1.3;
    white-space: normal;
}

/* All buttons have the same base appearance */
.btn.primary, .btn.secondary {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border: 2px solid var(--border-color);
    font-family: var(--font-heading);
}

/* All buttons have the same hover effect - but not when disabled */
.btn.primary:hover:not(:disabled), .btn.secondary:hover:not(:disabled) {
    background: var(--text-primary);
    color: var(--bg-tertiary);
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

/* Disabled state - same for all buttons */
.btn:disabled {
    background: var(--bg-secondary);
    color: var(--text-secondary);
    border-color: var(--text-secondary);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
    opacity: 0.5;
}

.btn:disabled:hover {
    background: var(--bg-secondary);
    color: var(--text-secondary);
    transform: none;
    box-shadow: none;
}

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

/* Ensure proper centering for pushup popup modal */
.pushup-popup-modal {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background-color: var(--bg-tertiary);
    margin: 15% auto;
    padding: 20px;
    border: 3px solid var(--border-color);
    border-radius: 0;
    width: 90%;
    max-width: 500px;
    text-align: center;
    box-shadow: none;
    box-sizing: border-box;
    position: relative;
}

.modal-content p {
    font-family: var(--font-primary);
    font-size: .9em;
    color: var(--text-secondary);
    margin: 0;
}

.modal-content h2 {
    font-family: var(--font-heading);
    font-size: 1.2em;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.modal-icon {
    color: var(--collision-marker-color);
    flex-shrink: 0;
}

.modal-close {
    position: absolute;
    top: 10px;
    right: 15px;
    background: none;
    border: none;
    font-size: 24px;
    font-weight: normal;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s ease;
    font-family: var(--font-primary);
    opacity: 0.7;
}

.modal-close:hover {
    color: var(--text-primary);
    opacity: 1;
}

.modal-close:focus {
    outline: none;
    color: var(--text-primary);
    opacity: 1;
}

.modal-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 25px;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
}

.modal-buttons .btn {
    width: 180px;
    min-width: 180px;
    min-height: 48px;
    height: auto;
    max-width: 180px;
    font-size: 0.9em;
    padding: 12px 16px;
    flex: none;
    text-align: center;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* All modal buttons - clean, minimal appearance */
.modal-buttons .btn {
    background: transparent !important;
    border: none !important;
    font-family: var(--font-primary) !important;
    text-decoration: none !important;
    transform: none !important;
    box-shadow: none !important;
    box-sizing: border-box;
    white-space: nowrap !important;
    overflow: visible !important;
    min-width: auto !important;
    width: auto !important;
    max-width: none !important;
    padding: 12px 8px !important;
}

/* All modal buttons - consistent coloring */
.modal-buttons .btn.primary,
.modal-buttons .btn.secondary {
    color: var(--text-primary) !important;
}

.modal-buttons .btn.primary {
    order: 2;
}

.modal-buttons .btn.secondary {
    order: 1;
}

.modal-buttons .btn.primary:hover:not(:disabled),
.modal-buttons .btn.secondary:hover:not(:disabled) {
    color: var(--text-primary) !important;
    background: transparent !important;
    text-decoration: underline !important;
    text-underline-offset: 4px !important;
    text-decoration-thickness: 1px !important;
    transform: none !important;
    box-shadow: none !important;
}

/* Disabled state for modal buttons */
.modal-buttons .btn:disabled {
    color: var(--text-secondary) !important;
    background: transparent !important;
    text-decoration: none !important;
    cursor: not-allowed !important;
    opacity: 0.3 !important;
    transform: none !important;
    box-shadow: none !important;
}

/* All pushup buttons - clean, minimal appearance */
.pushup-buttons .btn {
    background: transparent !important;
    border: none !important;
    font-family: var(--font-primary) !important;
    text-decoration: none !important;
    transform: none !important;
    box-shadow: none !important;
    box-sizing: border-box;
    white-space: nowrap !important;
    overflow: visible !important;
    min-width: auto !important;
    width: auto !important;
    max-width: none !important;
    padding: 12px 8px !important;
}

/* All pushup buttons - consistent coloring */
.pushup-buttons .btn.primary,
.pushup-buttons .btn.secondary {
    color: var(--text-primary) !important;
}

.pushup-buttons .btn.primary {
    order: 2;
}

.pushup-buttons .btn.secondary {
    order: 1;
}

.pushup-buttons .btn.primary:hover:not(:disabled),
.pushup-buttons .btn.secondary:hover:not(:disabled) {
    color: var(--text-primary) !important;
    background: transparent !important;
    text-decoration: underline !important;
    text-underline-offset: 4px !important;
    text-decoration-thickness: 1px !important;
    transform: none !important;
    box-shadow: none !important;
}

/* Disabled state for pushup buttons */
.pushup-buttons .btn:disabled {
    color: var(--text-secondary) !important;
    background: transparent !important;
    text-decoration: none !important;
    cursor: not-allowed !important;
    opacity: 0.3 !important;
    transform: none !important;
    box-shadow: none !important;
}

/* All settings buttons - clean, minimal appearance */
.settings-buttons .btn {
    background: transparent !important;
    border: none !important;
    font-family: var(--font-primary) !important;
    text-decoration: none !important;
    transform: none !important;
    box-shadow: none !important;
    box-sizing: border-box;
    white-space: nowrap !important;
    overflow: visible !important;
    min-width: auto !important;
    width: auto !important;
    max-width: none !important;
    padding: 12px 8px !important;
}

/* All settings buttons - consistent coloring */
.settings-buttons .btn.primary,
.settings-buttons .btn.secondary {
    color: var(--text-primary) !important;
}

.settings-buttons .btn.primary {
    order: 2;
}

.settings-buttons .btn.secondary {
    order: 1;
}

.settings-buttons .btn.primary:hover:not(:disabled),
.settings-buttons .btn.secondary:hover:not(:disabled) {
    color: var(--text-primary) !important;
    background: transparent !important;
    text-decoration: underline !important;
    text-underline-offset: 4px !important;
    text-decoration-thickness: 1px !important;
    transform: none !important;
    box-shadow: none !important;
}

/* Disabled state for settings buttons */
.settings-buttons .btn:disabled {
    color: var(--text-secondary) !important;
    background: transparent !important;
    text-decoration: none !important;
    cursor: not-allowed !important;
    opacity: 0.3 !important;
    transform: none !important;
    box-shadow: none !important;
}

/* Line Direction Info Modal - Compact Styling with Better Centering */
#lineDirectionInfoModal .modal-content {
    margin: 20vh auto !important; /* Much better vertical centering */
    max-width: 450px !important; /* Increased width for more breathing room */
    padding: 24px !important; /* Increased padding for better spacing */
    min-height: auto !important; 
    height: auto !important;
    max-height: 280px !important; /* Force maximum height but allow more room */
    transform: scale(0.9) !important; /* Slightly smaller overall */
    
    /* Force compact layout */
    display: flex !important;
    flex-direction: column !important;
    justify-content: flex-start !important;
    align-items: stretch !important;
    position: relative !important; /* For close button positioning */
}

/* Ensure close button doesn't interfere with title centering */
#lineDirectionInfoModal .modal-close {
    position: absolute !important;
    top: 10px !important;
    right: 15px !important;
    z-index: 10 !important;
}

#lineDirectionInfoModal h2 {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
    margin: 5px 0 10px 0 !important; /* Much tighter margins */
    padding: 0 30px 0 0 !important; /* Add right padding to account for close button */
    line-height: 1.2 !important; /* Tighter line height */
    width: 100% !important;
    font-size: 1.1em !important; /* Slightly smaller font */
    position: relative !important; /* For better positioning */
}

#lineDirectionInfoModal .modal-text {
    margin: 5px 0 10px 0 !important; /* Much tighter margins */
    flex-grow: 0 !important; /* Don't let text area grow */
    flex-shrink: 1 !important; /* Allow shrinking */
}

#lineDirectionInfoModal .modal-text p {
    margin: 8px 0 !important; /* More paragraph spacing for breathing room */
    line-height: 1.5 !important; /* Better line height for readability */
    font-size: 0.95em !important; /* Slightly larger text */
}

#lineDirectionInfoModal .modal-text p:last-child {
    margin-bottom: 0 !important;
}

#lineDirectionInfoModal .modal-buttons {
    margin-top: 16px !important; /* Increased top margin for better spacing */
    margin-bottom: 0 !important;
    flex-grow: 0 !important; /* Don't let button area grow */
    flex-shrink: 0 !important; /* Don't let button area shrink */
}

#lineDirectionInfoModal .btn {
    padding: 12px 24px !important; /* Smaller button */
    font-size: 0.9em !important;
}

/* Save Canvas Info Modal - Compact Styling (matching Line Direction Modal) */
#saveCanvasInfoModal .modal-content {
    margin: 20vh auto !important; /* Better vertical centering */
    max-width: 450px !important; /* Increased width for more breathing room */
    padding: 24px !important; /* Increased padding for better spacing */
    min-height: auto !important; 
    height: auto !important;
    max-height: 280px !important; /* Reduced height to cut space below buttons */
    transform: scale(0.9) !important; /* Slightly smaller overall */
    
    /* Force compact layout */
    display: flex !important;
    flex-direction: column !important;
    justify-content: flex-start !important;
    align-items: stretch !important;
    position: relative !important; /* For close button positioning */
}

/* Ensure close button doesn't interfere with title centering */
#saveCanvasInfoModal .modal-close {
    position: absolute !important;
    top: 10px !important;
    right: 15px !important;
    z-index: 10 !important;
}

#saveCanvasInfoModal h2 {
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
    margin: 5px 0 10px 0 !important; /* Much tighter margins */
    padding: 0 30px 0 0 !important; /* Add right padding to account for close button */
    line-height: 1.2 !important; /* Tighter line height */
    width: 100% !important;
    font-size: 1.1em !important; /* Slightly smaller font */
    position: relative !important; /* For better positioning */
}

#saveCanvasInfoModal .modal-text {
    margin: 5px 0 10px 0 !important; /* Much tighter margins */
    flex-grow: 0 !important; /* Don't let text area grow */
    flex-shrink: 1 !important; /* Allow shrinking */
}

#saveCanvasInfoModal .modal-text p {
    margin: 8px 0 !important; /* More paragraph spacing for breathing room */
    line-height: 1.5 !important; /* Better line height for readability */
    font-size: 0.95em !important; /* Slightly larger text */
}

#saveCanvasInfoModal .save-canvas-list {
    margin: 8px 0 !important; /* Tight margins around list */
    padding-left: 20px !important; /* Standard indent for list */
    font-size: 0.9em !important; /* Smaller list text */
    line-height: 1.3 !important; /* Compact line height */
}

#saveCanvasInfoModal .save-canvas-list li {
    margin: 4px 0 !important; /* Very tight spacing between list items */
    color: var(--text-secondary) !important;
}

#saveCanvasInfoModal .modal-text p:last-child {
    margin-bottom: 0 !important;
}

#saveCanvasInfoModal .modal-buttons {
    margin-top: 16px !important; /* Increased top margin for better spacing */
    margin-bottom: 0 !important;
    flex-grow: 0 !important; /* Don't let button area grow */
    flex-shrink: 0 !important; /* Don't let button area shrink */
}

#saveCanvasInfoModal .btn {
    padding: 12px 24px !important; /* Smaller button */
    font-size: 0.9em !important;
}

/* Settings Modal Styles */
.settings-modal .modal-content {
    background: var(--bg-primary);
    border: 2px solid var(--border-color);
    border-radius: 0;
    padding: 30px;
    max-width: 90%;
    max-height: 90%;
    overflow-y: auto;
    position: relative;
    min-width: 400px;
    width: auto;
    margin: 5% auto;
}

.settings-modal-content {
    text-align: center;
}

.settings-modal h1 {
    font-family: var(--font-heading);
    color: var(--text-primary);
    margin-bottom: 30px;
    font-size: 1.8em;
}

.settings-modal .settings-section {
    text-align: left;
    margin: 20px 0;
}

.settings-modal .setting-group {
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
    align-items: center; /* Center the entire setting group content */
    gap: 8px;
}

.settings-modal .setting-group label {
    font-family: var(--font-primary);
    color: var(--text-primary);
    font-weight: 500;
}

.settings-modal .setting-group input {
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-family: var(--font-primary);
    border-radius: 0;
}

/* BEAUTIFUL SELECT WITH CHEVRON LIKE LANGUAGE PICKER */
select {
    /* Core styling */
    width: 100% !important;
    padding: 10px 12px !important;
    border: 2px solid var(--border-color) !important;
    background-color: var(--bg-tertiary) !important;
    color: var(--text-primary) !important;
    font-family: var(--font-primary) !important;
    font-size: 14px !important;
    cursor: pointer !important;
    
    /* Remove browser defaults */
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    appearance: none !important;
    border-radius: 0 !important;
    outline: none !important;
    box-sizing: border-box !important;
    
    /* Custom chevron like language picker */
    background-image: none !important;
    padding-right: 35px !important;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='currentColor' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e") !important;
    background-position: right 12px center !important;
    background-repeat: no-repeat !important;
    background-size: 12px !important;
}

/* BEAUTIFUL HORIZONTAL RADIO BUTTON GROUPS */
.radio-group-horizontal {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center; /* Center the radio buttons horizontally */
    margin-top: 8px;
}

.radio-option {
    display: flex;
    align-items: center;
    cursor: pointer;
    padding: 8px 12px;
    border: 2px solid var(--border-color);
    background: var(--bg-tertiary);
    transition: all 0.2s ease;
    min-width: 0;
    flex-shrink: 0;
}

.radio-option:hover {
    background: var(--hover-bg);
}

.radio-option input[type="radio"] {
    margin: 0 6px 0 0;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    width: 14px;
    height: 14px;
    border: 2px solid var(--border-color);
    border-radius: 50%;
    background-color: var(--bg-tertiary);
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* Unselected: Show circle */
.radio-option input[type="radio"]:not(:checked)::after {
    content: '○';
    color: var(--text-primary);
    font-size: 10px;
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
}

/* Selected: Replace with X */
.radio-option input[type="radio"]:checked::after {
    content: '✕';
    color: var(--text-primary);
    font-size: 10px;
    font-weight: bold;
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
}

/* Matrix theme - override colors only */
.theme-matrix .radio-option input[type="radio"] {
    background-color: #000000 !important;
    border-color: #00ff41;
}

.theme-matrix .radio-option input[type="radio"]:not(:checked)::after {
    color: #00ff41;
}

.theme-matrix .radio-option input[type="radio"]:checked::after {
    color: #00ff41;
}

.theme-matrix .radio-option {
    border-color: #00ff41;
    background-color: #000000;
}

.theme-matrix .radio-option:hover {
    background-color: #0a0a0a;
}

/* Removed bold styling for more subtle selection */

.radio-option:has(input[type="radio"]:checked) {
    background: var(--text-primary);
    color: var(--bg-tertiary);
}

.radio-label {
    font-family: var(--font-primary);
    font-size: 14px;
    color: inherit;
    cursor: pointer;
    white-space: nowrap;
}

/* BUTTON-STYLE RADIO GROUPS */
.button-group-horizontal {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    margin-top: 8px;
}

.radio-button {
    padding: 16px 32px;
    border: 2px solid var(--border-color);
    background: var(--bg-tertiary);
    color: var(--text-primary);
    font-family: var(--font-heading);
    font-size: 1em;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 200px;
    min-height: 54px;
    width: 200px;
    height: auto;
    text-align: center;
    display: inline-block;
    box-sizing: border-box;
    word-wrap: break-word;
    hyphens: auto;
    line-height: 1.3;
    white-space: normal;
    border-radius: 0;
    appearance: none;
    -webkit-appearance: none;
    text-transform: none;
    letter-spacing: normal;
}

.radio-button:hover:not(.selected) {
    background: var(--text-primary);
    color: var(--bg-tertiary);
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.radio-button.selected {
    background: var(--text-primary);
    color: var(--bg-tertiary);
    border-color: var(--text-primary);
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.radio-button:focus {
    outline: none;
    box-shadow: 0 0 0 2px var(--text-primary);
}

/* Theme-specific overrides for button-style radio groups */
.theme-matrix .radio-button {
    background: #000000;
    border-color: #00ff41;
    color: #00ff41;
}

.theme-matrix .radio-button:hover:not(.selected) {
    background: #00ff41;
    color: #000000;
    border-color: #00ff41;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.theme-matrix .radio-button.selected {
    background: #00ff41;
    color: #000000;
    border-color: #00ff41;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

/* Mars theme uses standard theme variables - no custom overrides needed */

/* Responsive design for radio buttons */
@media (max-width: 768px) {
    .button-group-horizontal {
        flex-direction: column;
        gap: 10px;
    }
    
    .radio-button {
        width: auto !important;
        min-width: 160px !important;
        max-width: 280px !important;
        font-size: 0.85em !important;
    }
}

@media (max-width: 480px) {
    .radio-button {
        width: auto !important;
        min-width: 140px !important;
        max-width: 240px !important;
        font-size: 0.8em !important;
    }
}

/* SIMPLE INFO ICON STYLING */
.info-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--text-primary);
    color: var(--bg-tertiary);
    font-family: var(--font-primary);
    font-size: 16px;
    font-weight: bold;
    text-align: center;
    line-height: 1;
}

.settings-modal .setting-group input[type="range"] {
    background: transparent;
    border: none;
    padding: 0;
}

.settings-modal .settings-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 30px;
    flex-wrap: nowrap;
    align-items: center;
}

/* Settings Modal Styles */
.settings-form {
    margin: 20px 0;
    text-align: left;
}

.setting-group {
    margin-bottom: 25px;
    padding: 15px;
    background: var(--bg-secondary);
    border-radius: 0;
}

.setting-group label {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
    color: var(--text-primary);
}

.setting-group .checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-primary);
    margin-top: 8px;
}

.setting-group .checkbox-label input[type="checkbox"] {
    width: 16px;
    height: 16px;
    margin: 0;
    cursor: pointer;
}

.setting-description {
    font-size: 0.9em;
    color: var(--text-secondary);
    margin-top: 5px;
    font-style: italic;
}

.settings-subgroup {
    margin-top: 15px;
    padding: 10px;
    background: var(--bg-primary);
    border-radius: 4px;
}

.setting-group input[type="range"] {
    width: 100%;
    margin: 10px 0;
}

.color-options {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.color-options input[type="color"] {
    width: 60px;
    height: 40px;
    border: none;
    border-radius: 0;
    cursor: pointer;
}

.preset-colors {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}



/* Completion Stats */
#completionStats {
    margin: 20px 0;
    padding: 20px;
    border-radius: 0;
    text-align: left;
}

.completion-stat {
    margin-bottom: 15px;
    font-family: var(--font-primary);
    color: var(--text-secondary);
}

.completion-stat strong {
    color: var(--text-primary);
    font-weight: bold;
}



/* Responsive Modal Design */
@media (max-width: 768px) {
    .modal-buttons {
        flex-direction: column;
        gap: 10px;
        flex-wrap: nowrap;
    }
    
    .modal-buttons .btn {
        width: auto !important;
        min-width: 160px !important;
        min-height: 48px;
        height: auto;
        max-width: 280px !important;
        font-size: 0.85em !important;
    }
    
    .pushup-buttons {
        flex-direction: column;
        gap: 10px;
        flex-wrap: nowrap;
    }
    
    .pushup-buttons .btn {
        width: auto !important;
        min-width: 160px !important;
        max-width: 280px !important;
        font-size: 0.85em !important;
    }
    
    .settings-modal .settings-buttons {
        flex-direction: column;
        gap: 10px;
        flex-wrap: nowrap;
    }
    
    .settings-modal .settings-buttons .btn {
        width: auto !important;
        min-width: 160px !important;
        max-width: 280px !important;
        font-size: 0.85em !important;
    }
    
    .preset-colors {
        justify-content: center;
    }
}

/* Old line info popup styles removed - now using fixed panel in sidebar */

@media (max-width: 480px) {
    .modal-content {
        margin: 10% auto;
        padding: 20px;
    }
    
    .setting-group {
        padding: 10px;
    }
    
    /* Old popup responsive styles removed */
    
    .line-info-content {
        padding: 12px;
    }
    
    /* Responsive Settings Modal Styles */
    .settings-modal .modal-content {
        min-width: 0;
        width: 95%;
        padding: 15px;
        margin: 5px auto;
    }
    
    .settings-modal h1 {
        font-size: 1.3em;
    }
    
    .settings-modal .settings-buttons {
        flex-direction: column;
        gap: 8px;
        flex-wrap: nowrap;
    }
    
    .settings-modal .settings-buttons .btn {
        width: auto !important;
        min-width: 140px !important;
        max-width: 240px !important;
        font-size: 0.8em !important;
    }
    
    .modal-buttons .btn {
        font-size: 0.8em !important;
        max-width: 240px !important;
    }
    
    .pushup-buttons .btn {
        font-size: 0.8em !important;
        max-width: 240px !important;
    }
}

/* Push-up Challenge Skip Option */
.pushup-skip-option {
    margin-bottom: 20px;
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.9em;
}

/* Push-up Challenge Popup Modal */
.pushup-popup-modal .welcome-content {
    position: relative;
    background-color: var(--bg-tertiary);
    margin: 0;
    padding: 20px;
    border: 3px solid var(--border-color);
    border-radius: 0;
    width: 90%;
    max-width: 500px;
    max-height: 80vh;
    overflow-y: auto;
    text-align: center;
    box-shadow: none;
    box-sizing: border-box;
}

.pushup-skip-option label {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
}

/* BEAUTIFUL CHECKBOX STYLING (matching radio buttons) */
.pushup-skip-option {
    display: flex;
    justify-content: center;
    margin: 15px 0;
}

.pushup-skip-option label {
    display: flex;
    align-items: center;
    cursor: pointer;
    padding: 8px 12px;
    border: 2px solid var(--border-color);
    background: var(--bg-tertiary);
    transition: all 0.2s ease;
}

.pushup-skip-option label:hover {
    background: var(--hover-bg);
}

.pushup-skip-option input[type="checkbox"] {
    margin: 0 8px 0 0;
    cursor: pointer;
    accent-color: var(--text-primary); /* Theme-aware checkbox color */
}

/* Matrix theme - fix UNSELECTED checkbox white backgrounds */
.theme-matrix .pushup-skip-option input[type="checkbox"]:not(:checked) {
    background-color: #000000 !important;
    border: 2px solid #00ff41;
    appearance: none;
    -webkit-appearance: none;
    width: 16px;
    height: 16px;
}

.theme-matrix .pushup-skip-option input[type="checkbox"]:checked {
    background-color: #00ff41;
    border: 2px solid #00ff41;
    position: relative;
}

.theme-matrix .pushup-skip-option input[type="checkbox"]:checked::after {
    content: '✓';
    color: #000000;
    position: absolute;
    left: 2px;
    top: -2px;
    font-size: 12px;
    font-weight: bold;
}

.theme-matrix .pushup-skip-option label {
    border-color: #00ff41;
    background-color: #000000;
}

.theme-matrix .pushup-skip-option label:hover {
    background-color: #0a0a0a;
}

.pushup-skip-option label:has(input[type="checkbox"]:checked) {
    background: var(--text-primary);
    color: var(--bg-tertiary);
}

.pushup-skip-option span {
    font-family: var(--font-primary);
    font-size: 14px;
    color: inherit;
    white-space: nowrap;
}

/* Delete confirmation input - wider to fit all language translations */
.delete-confirmation-input input {
    width: 120px; /* Wide enough for "supprimer" (French - longest at 9 chars) */
    text-align: center; /* Center the cursor and text in the modal */
}

/* Settings modal specific styles */
.settings-group {
    margin-bottom: 20px;
}

.settings-subtitle {
    font-family: var(--font-amarillo, "AmarilloUSAF", sans-serif);
    font-size: 16px;
    margin: 0 0 6px 0;
    color: var(--text-primary);
    font-weight: normal;
    letter-spacing: 0.5px;
}

.settings-group .pushup-input {
    margin: 0;
    padding: 0;
}

/* Settings range slider styling */
.settings-group input[type="range"] {
    width: 100%;
    height: 6px;
    background: var(--bg-secondary);
    border: 2px solid var(--border-color);
    border-radius: 0;
    outline: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    margin: 0;
    cursor: pointer;
    transition: all 0.2s ease;
}

/* Default theme slider with fill effect */
body.theme-default .settings-group input[type="range"] {
    background: linear-gradient(to right, #2c2c2c 0%, #2c2c2c var(--fill-percent, 50%), #f0f0f0 var(--fill-percent, 50%), #f0f0f0 100%);
}

/* Matrix theme slider with fill effect */
body.theme-matrix .settings-group input[type="range"] {
    background: linear-gradient(to right, #00ff41 0%, #00ff41 var(--fill-percent, 50%), #000000 var(--fill-percent, 50%), #000000 100%);
}

.settings-group input[type="range"]::-webkit-slider-track {
    height: 6px;
    background: var(--bg-secondary);
    border: none;
    border-radius: 0;
}

.settings-group input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    background: var(--bg-tertiary);
    border: 2px solid var(--border-color);
    border-radius: 0;
    cursor: pointer;
    transition: all 0.2s ease;
}

.settings-group input[type="range"]::-webkit-slider-thumb:hover {
    background: var(--text-primary);
    transform: scale(1.1);
}

.settings-group input[type="range"]::-moz-range-track {
    height: 6px;
    background: var(--bg-secondary);
    border: 2px solid var(--border-color);
    border-radius: 0;
}

.settings-group input[type="range"]::-moz-range-thumb {
    width: 16px;
    height: 16px;
    background: var(--bg-tertiary);
    border: 2px solid var(--border-color);
    border-radius: 0;
    cursor: pointer;
    transition: all 0.2s ease;
}

.settings-group input[type="range"]::-moz-range-thumb:hover {
    background: var(--text-primary);
    transform: scale(1.1);
}

.settings-group input[type="range"] + span {
    display: inline-block;
    margin-left: 10px;
    font-family: var(--font-primary);
    font-size: 14px;
    color: var(--text-primary);
    min-width: 40px;
    font-weight: 500;
}

/* Mars theme slider with fill effect */
body.theme-mars .settings-group input[type="range"] {
    background: linear-gradient(to right, #ff0000 0%, #ff0000 var(--fill-percent, 50%), #d8d7c2 var(--fill-percent, 50%), #d8d7c2 100%);
}

/* Mars theme slider thumb styling - matching default layout */
body.theme-mars .settings-group input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    background: #f0efdb;
    border: 2px solid #0f0f0f;
    border-radius: 0;
    cursor: pointer;
    transition: all 0.2s ease;
}

body.theme-mars .settings-group input[type="range"]::-webkit-slider-thumb:hover {
    background: #0f0f0f;
    transform: scale(1.1);
}

body.theme-mars .settings-group input[type="range"]::-moz-range-thumb {
    width: 16px;
    height: 16px;
    background: #f0efdb;
    border: 2px solid #0f0f0f;
    border-radius: 0;
    cursor: pointer;
    transition: all 0.2s ease;
}

body.theme-mars .settings-group input[type="range"]::-moz-range-thumb:hover {
    background: #0f0f0f;
    transform: scale(1.1);
}




