/* Variables */
:root {
    --dark-blue-color: #1a3863;
    --primary-button-background-color: #317df5;
    --primary-button-background-hover-color: #1a3863;
    --primary-button-foreground-color: white;
    --primary-button-foreground-hover-color: white;
    --secondary-button-background-color: #E7EFF5;
    --secondary-button-background-hover-color: #1a3863;
    --secondary-button-foreground-color: white;
    --tertiary-button-background-color: #dfe6eb;
    --tertiary-button-background-hover-color: #1a3863;
    --tertiary-button-foreground-color: #1a3863;
    --warning-color: #dc3545;
    --warning-hover-color: #bd2130;
    --primary-background-color: white;
    --primary-text-color: #1a3863;
    --secondary-text-color: #1a3863;
    --tertiary-text-color: #dfe6eb;
    --primary-background-mobile-color: #dfe6eb;
    --secondary-background-color: #dfe6eb;
    --tertiary-background-color: #E7EFF5;
    --footer-background-color: white;
    --square-img-background-color: #E7EFF5;
    --square-img-background-mobile-color: white;
    --preview-image-border-color: #317df5;
    --menu-background-color: #08184a;
    --drag-background-color: #DCFFDD;
    --workout-plan-type-selected-background-color: #30D158;
    --modal-background-color: #081726;
    --modal-header-background-color: #232e57;
    --modal-border-color: #317df5;
    --modal-text-color: white;
    --hero-text-color: #1a3863;
    --hero-background-color: #4FC6E8;
}

@media (prefers-color-scheme: dark) {
    :root {
        --dark-blue-color: #1a3863;
        --primary-button-background-color: #317df5;
        --primary-button-background-hover-color: white;
        --primary-button-foreground-color: white;
        --primary-button-foreground-hover-color: #317df5;
        --secondary-button-background-color: #232e57;
        --secondary-button-background-hover-color: white;
        --secondary-button-foreground-color: white;
        --tertiary-button-background-color: #232e57;
        --tertiary-button-background-hover-color: white;
        --tertiary-button-foreground-color: white;
        --warning-color: #dc3545;
        --warning-hover-color: #bd2130;
        --primary-background-color: #081726;
        --primary-text-color: white;
        --secondary-text-color: white;
        --tertiary-text-color: white;
        --primary-background-mobile-color: #081726;
        --secondary-background-color: #232e57;
        --tertiary-background-color: #232e57;
        --footer-background-color: #081726;
        --square-img-background-color: #232e57;
        --square-img-background-mobile-color: #232e57;
        --preview-image-border-color: white;
        --menu-background-color: #08184a;
        --drag-background-color: #30D158;
        --workout-plan-type-selected-background-color: #30D158;
        --modal-background-color: #081726;
        --modal-header-background-color: #232e57;
        --modal-border-color: #317df5;
        --modal-text-color: white;
        --hero-text-color: #1a3863;
        --hero-background-color: #4FC6E8;
    }
}

/* Global Styles */
html, body {
    margin: 0;
    padding: 0;
    height: 100%;
    overflow-x: hidden; /* Prevent horizontal scrolling */
    width: 100%;
}

body {
    background-color: var(--primary-background-color);
    color: var(--primary-text-color);
    font-family: 'Rubik', sans-serif;
    font-size: 0.8rem;
    font-weight: 400;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    max-width: 100vw; /* Ensure body doesn't exceed viewport width */
}

h2 {
    font-family: 'Rubik', sans-serif;
    color: var(--primary-text-color) !important;
}

/* Navigation Styles */
.nav-menu {
    background-color: var(--menu-background-color);
    border-bottom: 1px solid var(--menu-background-color);
    flex-shrink: 0;
    position: relative;
    z-index: 9999;
}

.navbar {
    padding: 0.5rem 1.5rem;
}

/* Hide navbar-brand text on mobile */
@media (max-width: 768px) {
    html, body {
        overflow-x: hidden;
        width: 100%;
        max-width: 100vw;
    }
    
    .main-content {
        overflow-x: hidden;
        width: 100%;
        max-width: 100vw;
    }
    
    .workout-plan-builder {
        overflow-x: hidden;
        width: 100%;
        max-width: 100vw;
    }
    
    .exercise-table {
        width: 100%;
        max-width: 100vw;
        overflow-x: auto; /* Allow horizontal scroll only for table content */
    }
    
    .navbar-brand {
        font-size: 0;
    }
    
    /* Hide workout notes completely on mobile */
    .workout-plan-notes {
        display: none;
    }
    
    /* Hide first 2 columns of exercise table on mobile */
    .exercise-table th:nth-child(1),
    .exercise-table th:nth-child(2),
    .exercise-table td:nth-child(1),
    .exercise-table td:nth-child(2) {
        display: none;
    }
    
    /* Hide the existing alert on mobile (but not the mobile-only alert) */
    .alert.alert-info:not(.mobile-only) {
        display: none;
    }
    
    /* Show mobile alert only on mobile */
    .alert.alert-info.mobile-only {
        display: flex !important;
    }
    
    /* Hide mobile alert when dismissed (no space taken) */
    .alert.alert-info.mobile-only.dismissed {
        display: none !important;
    }
}

/* Hide mobile alert on desktop */
@media (min-width: 769px) {
    .alert.alert-info.mobile-only {
        display: none !important;
    }
}

.navbar-collapse {
    display: flex;
    transition: all 0.3s ease-in-out;
}

@media (max-width: 767px) {
    .navbar-collapse {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background-color: var(--menu-background-color);
        padding: 0 1.5rem;
        margin: 0 -1.5rem;
    }

    .navbar-collapse.collapsing {
        height: 0;
        overflow: hidden;
        transition: height 0.3s ease;
    }

    .navbar-collapse.show {
        display: block;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
    }
}

.navbar-nav {
    display: flex;
    align-items: center;
    margin-left: auto;
    gap: 0.5rem;
    position: relative;
    z-index: 2;
}

@media (max-width: 767px) {
    .navbar-nav {
        flex-direction: column;
        align-items: flex-start;
        width: 100%;
        padding: 1rem 0;
    }

    .navbar-nav .nav-item {
        width: 100%;
    }

    .navbar-nav .nav-link {
        padding: 0.75rem 0 !important;
        justify-content: flex-start;
    }

    .navbar-nav .nav-item.d-flex {
        justify-content: flex-start !important;
    }

    .navbar-nav .nav-link.btn.btn-outline-light {
        justify-content: flex-start;
        margin: 0.5rem 0;
    }
}

.nav-item {
    display: flex;
    align-items: center;
    position: relative;
    z-index: 3;
}

.nav-link {
    color: rgba(255, 255, 255, 0.8) !important;
    padding: 0.5rem 1rem !important;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: flex !important;
    align-items: center;
    gap: 0.5rem;
    transition: color 0.3s ease;
    white-space: nowrap;
    position: relative;
    z-index: 4;
}

.nav-link:hover {
    color: #ffffff !important;
}

/* Icon buttons */
.nav-link i.bi {
    font-size: 1.4rem;
    transition: transform 0.3s ease;
}

.nav-link:hover .bi-gear-fill {
    transform: rotate(45deg);
}

.nav-link:hover .bi-person-circle {
    transform: scale(1.1);
}

/* Download button */
.nav-link.btn.btn-outline-light {
    border: 1px solid rgba(255, 255, 255, 0.8);
    border-radius: 10px;
    padding: 0.5rem 1.25rem !important;
    margin-left: 0.5rem;
}

.nav-link.btn.btn-outline-light:hover {
    background-color: #fff;
    color: var(--menu-background-color) !important;
    border-color: #fff;
}

/* Mobile styles */
@media (max-width: 576px) {
    .navbar-collapse {
        position: absolute;
        left: 0;
        right: 0;
        background-color: var(--menu-background-color);
        padding: 0 1.5rem;
        margin: 0 -1.5rem;
        top: 100%;
    }

    .navbar-collapse.collapsing {
        transform-origin: top;
        opacity: 0;
        height: 0;
    }

    .navbar-collapse.show {
        opacity: 1;
        height: auto;
    }

    .navbar-nav {
        padding: 1rem 0;
        flex-direction: column;
        align-items: flex-start;
        width: 100%;
    }

    .nav-item {
        width: 100%;
    }

    .nav-link {
        justify-content: flex-start;
        width: 100%;
        padding: 0.75rem 0 !important;
    }

    .nav-item.d-flex {
        justify-content: flex-start !important;
    }

    .nav-link.btn.btn-outline-light {
        margin: 0.5rem 0;
        justify-content: flex-start;
    }

    .sidebar {
        width: auto !important;
        max-width: none !important;
        resize: none !important;
        border-right: none;
        border-bottom: 1px solid #dee2e6;
        height: auto;
        min-height: 150px; /* Reduced from 200px */
        max-height: 30vh; /* Reduced from 35vh */
        padding: 0;
        margin: 0;
    }

    /* Completely disable resize functionality */
    .sidebar:hover {
        resize: none !important;
    }

    .sidebar::after {
        display: none !important;
    }

    .resize-handle,
    .resize-handle::before,
    .resize-handle::after {
        display: none !important;
    }

    /* Ensure search box and exercise list align with workout sections */
    .search-box-container {
        padding: 5px 10px 0px 10px; /* Eliminated bottom padding to reduce space to exercise list */
        margin: 0;
        width: auto;
        position: relative;
    }

    .exercise-list-container {
        padding: 0 10px 5px 10px; /* Reduced horizontal padding from 20px to 10px */
        margin: 0;
        margin-top: 2px; /* Reduced from 5px to 2px to decrease distance from search field */
        width: auto;
    }

    .search-box {
        width: 100%;
        padding-right: 40px; /* Ensure enough space for clear button */
        box-sizing: border-box;
    }

    /* Ensure clear button stays within search box on mobile */
    .clear-search {
        right: 32px; /* 20px container padding + 12px from input edge */
        top: calc(50% + 2px); /* Further reduced */
        transform: translateY(-50%);
        z-index: 10;
    }

    /* Hide all filter-related elements */
    .category-title,
    .tag-group,
    .tag,
    [data-filter-group="muscle"],
    [data-filter-group="equipment"] {
        display: none !important;
    }

    .workout-plan-builder {
        height: auto;
        min-height: 60vh; /* Reduced from 65vh */
    }

    .workout-plan-header {
        flex-direction: column;
        align-items: stretch;
        padding: 5px 12px; /* Added reduced padding */
    }

    .workout-plan-controls {
        justify-content: stretch;
        gap: 5px; /* Added reduced gap */
    }

    .workout-plan-controls .btn {
        flex: 1;
        justify-content: center;
        padding: 6px 8px; /* Reduced padding */
    }

    .workout-plan-title-input {
        width: 100%;
        padding: 4px 8px; /* Reduced padding */
    }

    /* Additional mobile spacing reductions */
    .exercise-list {
        gap: 3px; /* Further reduced from 5px */
        padding: 0 2px; /* Minimal horizontal padding */
    }

    .exercise-item {
        padding: 4px 8px; /* Further reduced */
        gap: 6px; /* Further reduced */
        margin-bottom: 2px; /* Added small margin */
        font-size: 0.85rem; /* Smaller exercise item font */
        margin-left: 0 !important; /* Remove left margin */
        margin-right: 0 !important; /* Remove right margin */
    }

    .exercise-list-container {
        margin-top: 0px; /* Further reduced */
    }

    .workout-day-section {
        margin-bottom: 3px !important; /* Increased from 1px for more breathing room */
        padding: 8px 10px !important; /* Changed horizontal padding from 8px to 10px to match search and exercise list */
        margin: 3px 10px !important; /* Override desktop margins to keep smaller left/right margins on mobile */
    }

    .workout-day-header {
        padding: 4px 4px 4px 0px !important; /* Reduced left padding from 4px to 0px to move title section further left */
        margin-bottom: 2px !important; /* Added small margin for separation */
    }

    .workout-day-content {
        padding: 4px 8px; /* Further reduced */
    }

    .exercise-table {
        margin-bottom: 4px; /* Further reduced */
    }

    .exercise-table th,
    .exercise-table td {
        padding: 3px 2px; /* Further reduced */
    }

    .dropzone {
        padding: 4px; /* Further reduced */
        margin: 2px 0; /* Further reduced */
        min-height: 30px; /* Reduced from default */
    }

    .alert {
        margin: 4px 10px 15px 10px !important; /* Changed bottom margin from 4px to 15px to match workout plan controls */
        padding: 0.5rem 1.5rem !important; /* Further reduced */
        font-size: 0.85rem !important; /* Smaller alert font */
    }

    .hero-section {
        display: none;
        margin: 15px 10px 2px 10px !important; /* Increased top margin from 10px to 15px for more spacing */
        padding: 10px 20px 5px 20px !important; /* Further reduced */
    }

    /* Additional aggressive reductions */
    .workout-plan-notes {
        margin-top: 5px; /* Reduced */
        padding: 5px 8px; /* Reduced */
    }

    .notes-header {
        padding: 4px 8px; /* Reduced */
    }

    .notes-content {
        padding: 4px 8px; /* Reduced */
    }

    .notes-input {
        padding: 4px 6px; /* Reduced */
        min-height: 60px; /* Reduced */
    }

    /* Make exercise thumbnails smaller on mobile */
    .exercise-thumbnail, .exercise-icon {
        width: 24px; /* Reduced from 32px */
        height: 24px; /* Reduced from 32px */
    }

    .exercise-icon {
        font-size: 1rem; /* Reduced from 1.2rem */
    }

    /* Reduce font sizes slightly for more compact layout */
    .exercise-name {
        font-size: 0.9rem; /* Slightly reduced */
    }

    .exercise-category {
        font-size: 0.75rem; /* Slightly reduced */
    }

    .workout-day-title {
        font-size: 1rem; /* Reduced */
        padding: 4px 8px; /* Reduced */
    }
}

@media (min-width: 992px) {
    .navbar > .container-fluid {
        position: static;
    }
    
    .navbar-collapse {
        width: auto;
    }
}

@media (max-width: 767px) {
    .navbar-collapse {
        position: absolute;
        left: 0;
        right: 0;
        background-color: var(--menu-background-color);
        padding: 0 1.5rem;
        margin: 0 -1.5rem;
        top: 100%;
    }

    .navbar-nav {
        padding: 1rem 0;
        flex-direction: column;
        align-items: flex-start;
        width: 100%;
    }

    .nav-item {
        width: 100%;
    }

    .nav-link {
        justify-content: flex-start;
        width: 100%;
        padding: 0.75rem 0 !important;
    }

    .nav-item.d-flex {
        justify-content: flex-start !important;
    }

    .auth-status {
        margin-left: 0;
    }

    .nav-link.btn.btn-outline-light {
        margin: 0.5rem 0;
        justify-content: flex-start;
    }
}

/* Main Content Layout */
.main-content {
    display: flex;
    flex: 1;
    min-height: 0;
    position: relative;
    z-index: 1;
}

/* Sidebar Styles */
.sidebar {
    width: 300px;
    min-width: 200px;
    max-width: 600px;
    padding: 20px;
    background-color: var(--primary-background-color);
    border-right: 1px solid #dee2e6;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
    resize: horizontal;
    flex-shrink: 0;
    height: calc(100vh - 56px);
    padding-bottom: 0;
}

/* Search Box Styles */
.search-box-container {
    position: relative;
    width: 100%;
}

.search-box {
    width: 100%;
    padding: 8px 32px 8px 12px;
    border: 1px solid var(--primary-button-background-color);
    border-radius: 10px;
    background-color: var(--primary-background-color);
    font-family: 'Rubik', sans-serif;
    color: var(--primary-text-color);
}

.clear-search {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    color: var(--primary-button-background-color);
    display: none;
    line-height: 1;
}

.clear-search:hover {
    color: var(--text-color);
}

.search-box:not(:placeholder-shown) + .clear-search {
    display: block;
}

/* Category Titles */
.category-title {
    font-size: 1.1rem;
    font-weight: 500;
    margin: 1.5rem 0 0.75rem;
    color: var(--text-color);
}

@media (max-width: 576px) {
    /* Global font size reduction for mobile */
    .main-content {
        font-size: 0.9rem; /* Reduce base font size */
    }

    .main-content {
        flex-direction: column;
        height: calc(100vh - var(--nav-height));
    }

    .sidebar {
        width: auto !important;
        max-width: none !important;
        resize: none !important;
        border-right: none;
        border-bottom: 1px solid #dee2e6;
        height: auto;
        min-height: 150px; /* Reduced from 200px */
        max-height: 30vh; /* Reduced from 35vh */
        padding: 0;
        margin: 0;
        font-size: 0.85rem; /* Smaller font for sidebar */
    }

    /* Ensure search box and exercise list align with workout sections */
    .search-box-container {
        padding: 5px 10px 0px 10px; /* Eliminated bottom padding to reduce space to exercise list */
        margin: 0;
        width: auto;
        position: relative;
    }

    .search-box {
        width: 100%;
        padding-right: 40px; /* Ensure enough space for clear button */
        box-sizing: border-box;
        font-size: 0.9rem; /* Smaller search box font */
    }

    .exercise-list-container {
        padding: 0 10px 5px 10px; /* Reduced horizontal padding from 20px to 10px */
        margin: 0;
        margin-top: 0px; /* Eliminated to minimize distance from search field */
        width: auto;
    }

    /* Ensure clear button stays within search box on mobile */
    .clear-search {
        right: 32px; /* 20px container padding + 12px from input edge */
        top: calc(50% + 2px); /* Further reduced */
        transform: translateY(-50%);
        z-index: 10;
    }

    /* Hide all filter-related elements */
    .category-title,
    .tag-group,
    .tag,
    [data-filter-group="muscle"],
    [data-filter-group="equipment"] {
        display: none !important;
    }

    .workout-plan-builder {
        height: auto;
        min-height: 60vh; /* Reduced from 65vh */
        font-size: 0.85rem; /* Smaller font for workout builder */
    }

    .workout-plan-header {
        flex-direction: column;
        align-items: stretch;
        padding: 5px 12px; /* Added reduced padding */
    }

    .workout-plan-controls {
        justify-content: stretch;
        gap: 5px; /* Added reduced gap */
    }

    .workout-plan-controls .btn {
        flex: 1;
        justify-content: center;
        padding: 6px 8px; /* Reduced padding */
        font-size: 0.8rem; /* Smaller button font */
    }

    .workout-plan-title-input {
        width: 100%;
        padding: 4px 8px; /* Reduced padding */
        font-size: 0.9rem; /* Smaller title font */
    }

    /* Additional mobile spacing reductions */
    .exercise-list {
        gap: 2px; /* Moderate reduction from 3px for better spacing */
        padding: 0 2px; /* Minimal horizontal padding */
    }

    .exercise-item {
        padding: 5px 6px; /* Further increased vertical padding */
        gap: 5px; /* Moderate reduction from 6px */
        margin-bottom: 1px; /* Keep reduced margin */
        font-size: 0.85rem; /* Smaller exercise item font */
        margin-left: 0 !important; /* Remove left margin */
        margin-right: 0 !important; /* Remove right margin */
        min-height: 42px; /* Further increased height for optimal fit */
    }
    
    /* Perfect circles for exercise images in exercise list on mobile only */
    .exercise-item .exercise-thumbnail,
    .exercise-item .exercise-icon {
        width: 28px !important; /* Even larger size for maximum visibility */
        height: 28px !important; /* Even larger size for maximum visibility */
        border-radius: 50% !important; /* Perfect circle */
        object-fit: cover !important; /* Ensure image fills circle properly */
    }

    .exercise-list-container {
        margin-top: 0px; /* Minimal spacing between search and exercise list */
    }

    .workout-day-section {
        margin-bottom: 3px !important; /* Increased from 1px for more breathing room */
        padding: 8px 10px !important; /* Changed horizontal padding from 8px to 10px to match search and exercise list */
        margin: 3px 10px !important; /* Override desktop margins to keep smaller left/right margins on mobile */
    }

    .workout-day-header {
        padding: 4px 4px 4px 0px !important; /* Reduced left padding from 4px to 0px to move title section further left */
        margin-bottom: 2px !important; /* Added small margin for separation */
    }

    .workout-day-content {
        padding: 4px 8px; /* Further reduced */
    }

    .exercise-table {
        margin-bottom: 4px; /* Further reduced */
        font-size: 0.8rem; /* Smaller table font */
    }

    .exercise-table th,
    .exercise-table td {
        padding: 3px 2px; /* Further reduced */
    }

    .dropzone {
        padding: 4px; /* Further reduced */
        margin: 2px 0; /* Further reduced */
        min-height: 30px; /* Reduced from default */
        font-size: 0.8rem; /* Smaller dropzone font */
    }

    .alert {
        margin: 4px 16px 15px 6px !important; /* Aligned to match button controls spacing: 4px left, 8px right */
        padding: 0.5rem 1.5rem !important; /* Further reduced */
        font-size: 0.85rem !important; /* Smaller alert font */
    }

    .hero-section {
        display: none;
        margin: 2px 10px 2px 10px !important; /* Changed horizontal margin from 20px to 10px to match other elements */
        padding: 10px 20px 5px 20px !important; /* Further reduced */
    }

    /* Additional aggressive reductions */
    .workout-plan-notes {
        margin-top: 5px; /* Reduced */
        padding: 5px 8px; /* Reduced */
        font-size: 0.85rem; /* Smaller notes font */
    }

    .notes-header {
        padding: 4px 8px; /* Reduced */
    }

    .notes-content {
        padding: 4px 8px; /* Reduced */
    }

    .notes-input {
        padding: 4px 6px; /* Reduced */
        min-height: 60px; /* Reduced */
        font-size: 0.85rem; /* Smaller input font */
    }

    /* Make exercise thumbnails smaller on mobile */
    .exercise-thumbnail, .exercise-icon {
        width: 20px; /* Further reduced for optimal fit within boundaries */
        height: 20px; /* Further reduced for optimal fit within boundaries */
    }

    .exercise-icon {
        font-size: 0.7rem; /* Further reduced for proportional sizing */
    }

    /* Reduce font sizes slightly for more compact layout */
    .exercise-name {
        font-size: 0.85rem; /* Further reduced */
    }

    .exercise-category {
        font-size: 0.7rem; /* Further reduced */
    }

    .workout-day-title {
        font-size: 0.9rem; /* Further reduced */
        padding: 4px 8px; /* Reduced */
    }

    /* Additional font size reductions for specific elements */
    .exercise-category-row {
        font-size: 0.75rem; /* Smaller category text */
    }

    .template-id {
        font-size: 0.7rem !important; /* Smaller template ID - force override desktop */
    }

    .position-number {
        font-size: 0.75rem; /* Smaller position numbers */
    }

    .input-suffix {
        font-size: 0.75rem; /* Smaller input suffixes */
    }

    .btn {
        font-size: 0.8rem; /* Smaller buttons */
    }

    .modal-title {
        font-size: 1.1rem; /* Smaller modal titles */
    }

    .modal-body {
        font-size: 0.85rem; /* Smaller modal content */
    }

    .toast {
        font-size: 0.8rem; /* Smaller toast messages */
    }

    .settings-label {
        font-size: 0.85rem; /* Smaller settings labels */
    }

    .settings-description {
        font-size: 0.75rem; /* Smaller settings descriptions */
    }

    /* Additional aggressive workout day section reductions */
    .workout-day-section {
        margin-bottom: 3px !important; /* Increased from 1px for more breathing room */
        padding: 8px 10px !important; /* Changed horizontal padding from 8px to 10px to match search and exercise list */
        margin: 3px 8px 3px 4px !important; /* Aligned to match button controls spacing: 4px left, 8px right */
    }

    .workout-day-header {
        padding: 4px 4px 4px 0px !important; /* Reduced left padding from 4px to 0px to move title section further left */
        margin-bottom: 2px !important; /* Added small margin for separation */
    }

    .workout-day-content {
        padding: 4px 4px !important; /* Increased vertical padding from 1px to 4px */
    }

    .exercise-table {
        margin-bottom: 3px !important; /* Increased from 1px for more breathing room */
        margin-left: 0 !important; /* Remove left margin */
        margin-right: 0 !important; /* Remove right margin */
        width: 100% !important; /* Full width */
    }

    .exercise-table th,
    .exercise-table td {
        padding: 3px 0 !important; /* Increased vertical padding from 1px to 3px */
    }

    .dropzone {
        padding: 3px !important; /* Increased from 1px for more breathing room */
        margin: 6px 0 !important; /* Increased from 2px to 6px for more separation from table */
        min-height: 30px !important; /* Increased from 20px for better visibility */
        font-size: 0.75rem !important; /* Smaller dropzone font */
    }

    /* Additional spacing for dropzones within workout day sections */
    .workout-day-content .dropzone {
        margin: 8px 0 !important; /* Even more separation within workout sections */
    }

    /* Ensure proper spacing between table and dropzone */
    .exercise-table + .dropzone {
        margin-top: 8px !important; /* Specific spacing when dropzone follows table */
    }

    .dropzone + .exercise-table {
        margin-top: 8px !important; /* Specific spacing when table follows dropzone */
    }

    .action-buttons .btn {
        padding: 1px 2px !important; /* Ultra-reduced */
        font-size: 0.7rem !important; /* Smaller */
    }

    .dropzone {
        padding: 1px !important; /* Ultra-reduced */
        margin: 0 !important; /* Remove margin */
        min-height: 20px !important; /* Ultra-reduced */
    }

    /* Reduce right margins for all lower area components to match mobile alert spacing */
    .workout-plan-header {
        padding: 1px 8px 1px 4px !important; /* Reduced right padding from 10px to 8px to match mobile alert spacing */
        margin-bottom: 1px !important; /* Ultra-reduced */
    }

    .workout-plan-controls {
        gap: 3px !important; /* Further reduced from 5px */
        padding: 0 8px 0 4px !important; /* Reduced right padding from 10px to 8px to match mobile alert spacing */
    }

    /* Reduce right padding for all major content areas to match mobile alert spacing */
    .workout-plan-builder {
        padding: 0 8px 0 4px !important; /* Reduced right padding from 10px to 8px to match mobile alert spacing */
    }

    .workout-content {
        padding: 0 8px 0 4px !important; /* Reduced right padding from 10px to 8px to match mobile alert spacing */
    }

    .workout-plan-controls .btn {
        padding: 6px 8px !important; /* Increased from 2px 4px */
        font-size: 0.8rem !important; /* Restored to normal size from 0.7rem */
    }

    .workout-plan-title-input {
        padding: 1px 3px !important; /* Ultra-reduced */
        font-size: 1.2rem !important; /* Increased from 0.8rem to 1.2rem to match desktop and be larger than workout day title */
        margin: 8px 4px 0 4px !important; /* Added 8px top margin for mobile spacing */
    }

    .workout-plan-notes {
        margin-top: 1px !important; /* Ultra-reduced */
        padding: 1px 4px !important; /* Match workout day content padding */
    }

    .notes-header {
        padding: 1px 4px !important; /* Match workout day header padding */
    }

    .notes-content {
        padding: 1px 4px !important; /* Match workout day content padding */
    }

    .notes-input {
        padding: 1px 2px !important; /* Ultra-reduced */
        min-height: 40px !important; /* Ultra-reduced */
        margin: 0 4px !important; /* Match workout day content padding */
    }

    /* Reduce horizontal spacing between table and workout day container */
    .workout-day-content {
        padding: 1px 1px !important; /* Ultra-reduced horizontal padding from 3px to 1px */
    }

    .exercise-table {
        margin-bottom: 1px !important; /* Ultra-reduced */
        margin-left: 0 !important; /* Remove left margin */
        margin-right: 0 !important; /* Remove right margin */
        width: 100% !important; /* Full width */
    }

    .exercise-table th,
    .exercise-table td {
        padding: 1px 0 !important; /* Ultra-reduced */
    }

    /* Reduce padding on first and last columns to minimize horizontal spacing */
    .exercise-table th:first-child,
    .exercise-table td:first-child {
        padding-left: 1px !important; /* Minimal left padding */
    }

    .exercise-table th:last-child,
    .exercise-table td:last-child {
        padding-right: 1px !important; /* Minimal right padding */
    }

    /* Reduce spacing in plan cells */
    .plan-cell {
        padding: 1px 0 !important; /* Minimal horizontal padding */
    }

    .plan-cell input {
        padding: 0 1px !important; /* Ultra-reduced */
        font-size: 0.7rem !important; /* Smaller */
    }

    /* Reduce action buttons spacing */
    .action-buttons {
        gap: 1px !important; /* Ultra-reduced gap */
        padding: 0 1px !important; /* Minimal padding */
    }

    .action-buttons .btn {
        padding: 4px 6px !important; /* Increased from 1px 2px for better touch targets */
        font-size: 0.7rem !important; /* Smaller */
    }

    /* Increase padding for other buttons in mobile */
    .btn {
        font-size: 0.85rem !important; /* Restored to normal size from 0.75rem */
        padding: 6px 8px !important; /* Increased padding for better touch targets */
    }

    .collapse-button {
        padding: 4px 6px !important; /* Increased from 1px 2px */
        min-width: 28px !important; /* Increased from 20px */
        height: 28px !important; /* Increased from 20px */
    }

    .delete-workout-day-button {
        padding: 4px 6px !important; /* Increased from 1px 3px */
        font-size: 0.8rem !important; /* Restored to normal size from 0.7rem */
        gap: 3px !important; /* Increased from 2px */
    }

    .workout-plan-controls .btn {
        padding: 6px 8px !important; /* Increased from 2px 4px */
        font-size: 0.8rem !important; /* Restored to normal size from 0.7rem */
    }

    .action-buttons .btn {
        padding: 4px 6px !important; /* Increased from 1px 2px for better touch targets */
        font-size: 0.8rem !important; /* Restored to normal size from 0.7rem */
    }
}

/* Tag Styles */
.tag-group {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag {
    padding: 6px 12px;
    background-color: var(--primary-background-color);
    border: 1px solid var(--primary-button-background-color);
    border-radius: 10px;
    cursor: pointer;
    user-select: none;
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--text-color);
    transition: background-color 0.3s ease;
    text-transform: uppercase;
    font-weight: 400;
}

.tag:hover {
    background-color: var(--primary-button-background-color);
    color: var(--primary-background-color);
}

.tag.selected {
    background-color: var(--primary-button-background-color);
    border-color: var(--primary-button-background-color);
    color: white;
}

.checkmark {
    display: none;
}

.tag.selected .checkmark {
    display: inline;
}

/* Exercise List Container */
.exercise-list-container {
    flex-grow: 1;
    overflow: hidden;
    margin-top: 15px;
    width: 100%;
    min-height: 0;
    display: flex;
    flex-direction: column;
}

.exercise-list {
    flex: 1;
    overflow-y: scroll;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE and Edge */
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
    min-height: 0;
}

/* Hide scrollbar for Chrome, Safari and Opera */
.exercise-list::-webkit-scrollbar {
    display: none;
}

/* Exercise List Item */
.exercise-item {
    background-color: var(--tertiary-background-color);
    border: 1px solid var(--tertiary-background-color);
    border-radius: 10px;
    padding: 8px 12px;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: move;
    font-size: 1rem;
    transition: all 0.3s ease;
    width: 100%;
}

.exercise-item:hover {
    border-color: var(--primary-button-background-color);
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.exercise-item.dragging {
    opacity: 0.9;
    border: 2px solid var(--primary-button-background-color);
    background-color: var(--tertiary-background-color);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.exercise-thumbnail, .exercise-icon {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--primary-button-background-color);
    border-radius: 50%;
    background-color: white;
}

.exercise-thumbnail {
    object-fit: cover;
}

.exercise-icon {
    font-size: 1.2rem;
}

/* Exercise Info Layout */
.exercise-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.exercise-category-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.template-id {
    color: var(--text-muted);
    font-size: 0.9rem;
    opacity: 0.8;
}

.exercise-name {
    font-weight: 500;
}

.exercise-category {
    font-size: 0.8rem;
    color: #6c757d;
}

/* Workout Builder Styles */
.workout-plan-builder {
    flex: 1;
    min-width: 400px;
    position: relative;
    height: calc(100vh - 56px);
    overflow-y: auto;
}

/* Hide scrollbar for Chrome, Safari and Opera */
.workout-plan-builder::-webkit-scrollbar {
    display: none;
}

.workout-plan-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding: 20px 20px 0 20px;
    background-color: var(--primary-background-color);
}

.workout-plan-notes {
    background-color: var(--primary-background-color);
    border: 2px solid var(--secondary-background-color);
    border-radius: 10px;
    padding: 15px;
    margin: 20px;
}

.workout-content {
    padding: 0;
    margin-bottom: 80px; /* Space for floating button */
}

.workout-plan-title {
    margin: 0;
    flex: 1;
    min-width: 200px;
    display: flex;
}

.workout-plan-title-input {
    font-size: 1.2rem; /* Increased from 1.1rem to 1.2rem to make it larger than workout day title input */
    font-weight: 500;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 4px;
    padding: 4px 8px;
    width: 400px;
    color: inherit;
    font-family: inherit;
}

.workout-plan-title-input:hover {
    border-color: var(--primary-button-background-color);
    background-color: var(--primary-background-color);
}

.workout-plan-title-input:focus {
    border-color: var(--primary-button-background-color);
    background-color: var(--primary-background-color);
    outline: none;
}

.workout-plan-controls {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 15px; /* Reduced from 20px to 15px for smaller spacing */
}

.workout-plan-controls .btn {
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

@media (max-width: 576px) {
    .workout-plan-header {
        flex-direction: column;
        align-items: stretch;
    }

    .workout-plan-controls {
        justify-content: stretch;
    }

    .workout-plan-controls .btn {
        flex: 1;
        justify-content: center;
    }

    .workout-plan-title-input {
        width: 100%;
    }
}

/* Hide filter sections for iPad and medium screen sizes */
@media (min-width: 577px) and (max-width: 1024px) {
    .category-title,
    .tag-group {
        display: none !important;
    }
    
    /* Only hide dismissed hero, let normal hero show */
    .hero-section.dismissed {
        display: none !important;
        margin: 0 !important;
        padding: 0 !important;
        height: 0 !important;
    }
    
    .sidebar {
        padding-bottom: 0 !important;
        display: flex;
        flex-direction: column;
    }
    
    .search-box-container {
        margin-bottom: 15px !important;
        flex-shrink: 0;
    }
    
    .exercise-list-container {
        flex: 1 1 auto;
        margin-top: 0 !important;
        margin-bottom: 0 !important;
        overflow: hidden;
        min-height: 0;
        display: flex;
        flex-direction: column;
    }
    
    .exercise-list {
        flex: 1;
        overflow-y: auto;
        padding-bottom: 20px;
        min-height: 0;
    }
}

/* Button Styles */
.save-plan-button,
.export-plan-button,
.floating-button {
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border: none;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.save-plan-button {
    background-color: var(--primary-button-background-color);
    color: white;
}

.export-plan-button {
    background-color: var(--secondary-button-background-color);
    color: white;
}

.save-plan-button:hover {
    background-color: var(--primary-button-background-hover-color);
    color: var(--primary-button-foreground-color);
}

.export-plan-button:hover {
    background-color: var(--primary-button-background-hover-color);
    color: var(--primary-button-foreground-color);
}

.save-plan-button i,
.export-plan-button i,
.floating-button i {
    font-size: 1.1em;
}

/* Floating button position */
.floating-button {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 1001;
    pointer-events: auto;
    cursor: pointer;
    background-color: var(--primary-button-background-color);
    color: white;
}

.floating-button:hover {
    background-color: var(--primary-button-background-hover-color);
    color: var(--primary-button-foreground-color);
}

/* Footer Styles */
.footer {
    position: relative;
    z-index: 1;
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    text-align: center;
    padding-bottom: 5rem; /* Add space for floating button */
}

.copyright {
    color: var(--primary-text-color);
    font-size: 0.8rem;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
}

.footer-link {
    text-decoration: none;
    font-size: 0.8rem;
    font-weight: 400;
    letter-spacing: 0.5px;
    transition: color 0.2s ease;
    color: var(--primary-button-background-color);
}

.footer-link:hover {
    color: var(--primary-button-background-color);
    text-decoration: underline;
}

/* Print styles moved to print.css */

/* Day Section Styles */
.workout-day-section {
    background-color: var(--primary-background-color);
    border: 2px solid var(--secondary-background-color);
    border-radius: 10px;
    padding: 15px;
    margin: 20px; /* Changed to match workout-plan-notes margins */
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.workout-day-section.removing {
    opacity: 0;
    transform: translateY(-10px);
}

.workout-day-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    min-width: 0; /* Ensure flex container can shrink below content size */
}

.workout-workout-day-title-section {
    flex: 1;
    min-width: 0; /* Allow title section to shrink */
    margin-right: 1rem; /* Add space between title and controls */
    margin-left: -4px; /* Negative margin to move title section further left to align with table */
}

.workout-day-title {
    margin: 0;
    min-width: 0; /* Allow title to shrink */
}

.workout-day-header-controls {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0; /* Prevent controls from shrinking */
}

.workout-day-title-input {
    font-size: 1.1rem;
    font-weight: 500;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 4px;
    padding: 4px 8px;
    width: 100%;
    max-width: 400px;
    color: inherit;
    font-family: inherit;
    min-width: 0; /* Allow input to shrink */
}

.workout-day-title-input:hover {
    border-color: var(--border-color);
    background-color: var(--primary-background-color);
}

.workout-day-title-input:focus {
    border-color: var(--primary-button-background-color);
    background-color: var(--primary-background-color);
    outline: none;
    box-shadow: 0 0 0 0.2rem rgba(74,144,226,0.25);
}

@media (max-width: 576px) {
    .workout-day-title-input {
        width: 100%; /* Make title input responsive on mobile */
    }
    
    .workout-day-header {
        flex-wrap: wrap; /* Allow wrapping on mobile */
    }

    .workout-workout-day-title-section {
        margin-left: -18px !important; /* Move title section further left to align with table on mobile */
    }
}

.workout-day-content {
    transition: max-height 0.3s ease-out, opacity 0.3s ease-out, margin 0.3s ease-out;
    max-height: 2000px;
    opacity: 1;
    overflow: hidden;
}

.workout-day-section.collapsed .workout-day-content {
    max-height: 0;
    opacity: 0;
    margin-top: 0;
}

.workout-day-section.collapsed .collapse-icon {
    transform: rotate(180deg);
}

/* Shared collapse button styles */
.collapse-button {
    background: none;
    border: none;
    padding: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-text-color);
    transition: color 0.3s ease;
    min-width: 32px;
    height: 32px;
}

.collapse-button:hover {
    color: var(--primary-button-background-color);
}

.collapse-button:focus {
    outline: none;
    color: var(--primary-button-background-color);
}

.collapse-icon {
    font-size: 1.2em;
    transition: transform 0.3s ease;
}

.delete-workout-day-button {
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    background-color: var(--tertiary-button-background-color);
    color: var(--tertiary-button-foreground-color);
    border: none;
    gap: 6px;
    padding: 8px 16px;
    transition: all 0.3s ease;
}

.delete-workout-day-button:hover {
    background-color: var(--warning-color);
    color: white;
}

.delete-workout-day-button:active {
    background-color: var(--warning-hover-color);
}

.delete-workout-day-button i {
    font-size: 1.1em;
    color: inherit;
    display: inline-flex;
    align-items: center;
}

/* Exercise Table Styles */
.exercise-table {
    width: 100%;
    margin-bottom: 20px;
    border-collapse: separate;
    border-spacing: 0;
    table-layout: fixed;
}

/* Basic cell styling */
.exercise-table th,
.exercise-table td {
    padding: 12px;
    border-bottom: 1px solid var(--tertiary-background-color);
    vertical-align: middle;
    font-size: 1rem;
}

/* Column widths */
.exercise-table th:nth-child(1) { 
    width: 45px;  /* Position */
    padding-right: 0;
}
.exercise-table th:nth-child(2) { 
    width: 55px;  /* Image */
    padding-left: 0;
    padding-right: 0;
}
.exercise-table th:nth-child(3) { 
    width: calc(100% - 340px);  /* Name - reduced by increasing total fixed width */
    padding-left: 8px;
}

/* Sets and Plan columns */
.exercise-table th:nth-child(4) { 
    width: 65px;  /* Sets */
    text-align: center;
    padding-left: 4px;
    padding-right: 4px;
}
.exercise-table th.header-plan { 
    width: 90px;  /* Plan - increased */
    text-align: center;
    padding-left: 4px;
    padding-right: 4px;
}
.exercise-table th:last-child { 
    width: 85px;  /* Actions - increased */
    text-align: center;
    padding-left: 4px;
    padding-right: 4px;
}

/* Column cell padding adjustments */
.exercise-table td:nth-child(1) { padding-right: 0; }
.exercise-table td:nth-child(2) { padding-left: 0; padding-right: 0; }
.exercise-table td:nth-child(3) { padding-left: 8px; }
.exercise-table td:nth-child(4),
.exercise-table td:nth-child(5),
.exercise-table td:last-child {
    padding-left: 4px;
    padding-right: 4px;
}

/* Sets column cells */
.exercise-table td:nth-child(4) {
    text-align: center;
    width: 65px;  /* Match header width */
}

/* Plan column */
.exercise-table td:nth-last-child(2) {
    text-align: center;
    width: 90px;  /* Match header width */
    position: relative;
}

/* Plan cell with suffix */
.plan-cell {
    position: relative;
    text-align: center;
}

.plan-cell .weight-input-group {
    gap: 0 !important;
}

.plan-cell .weight-input-group > div {
    flex: 1;
    min-width: 0;
}

.plan-cell .multiplication-symbol {
    flex: 0 0 24px;
    font-size: 16px;
    font-weight: 500;
    color: var(--text-muted);
    margin: 0 4px;
    width: 24px;
    height: 24px;
    min-width: 24px;
    min-height: 24px;
    max-width: 24px;
    max-height: 24px;
    line-height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--secondary-background-color);
    border-radius: 50%;
    transform: translateY(-5px);
    padding: 0;
}

.plan-cell input {
    width: 100%;
    text-align: center;
    padding: 4px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 16px;
    min-width: 0;
}

.plan-cell input:focus {
    outline: none;
    border-color: #0056b3;
}

.input-suffix {
    display: block;
    font-size: 12px;
    color: #666;
    text-align: center;
    margin-top: 2px;
}

/* Duration input needs special handling */
.plan-cell input.editable-input[data-type="duration"] {
    width: 100%;  /* Duration inputs take full width */
}

/* Actions column */
.exercise-table td:last-child {
    text-align: center;
    width: 85px;
    padding-left: 4px;
    padding-right: 4px;
}

/* Input styling */
.exercise-table td input.editable-input {
    width: 100%;
    box-sizing: border-box;
    text-align: center;
    background: transparent;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 4px;
    color: var(--text-color);
    margin: 0;
}

/* Hide number input spinners for all browsers */
.exercise-table td input[type="number"].editable-input {
    -moz-appearance: textfield; /* Firefox */
}

.exercise-table td input[type="number"].editable-input::-webkit-outer-spin-button,
.exercise-table td input[type="number"].editable-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Touch-specific styles */
@media (hover: none) and (pointer: coarse) {
    .exercise-table td input[type="number"].editable-input {
        font-size: 16px; /* Prevent iOS zoom on focus */
        padding: 8px 4px; /* Larger touch target */
    }
}

/* Input with suffix styling */
.exercise-table td input.editable-input[data-suffix] {
    padding-right: 30px; /* Make room for suffix */
}

/* Focus styles for all inputs */
.exercise-table td input.editable-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(var(--primary-color-rgb), 0.2);
}

/* Ensure duration input remains contained when focused */
.exercise-table td input.editable-input[data-type="duration"]:focus {
    background-color: var(--background-color);
}

/* Action buttons */
.action-buttons {
    display: flex;
    gap: 4px;
    margin-left: auto;
}

.action-buttons .btn {
    padding: 4px 8px;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Position number styles */
.position-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    background-color: var(--secondary-background-color);
    border-radius: 50%;
    font-size: 0.8rem;
    font-weight: 500;
    margin: 0 auto;
}

.exercise-table .exercise-thumbnail,
.exercise-table .exercise-icon {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--primary-button-background-color);
    border-radius: 50%;
    background-color: white;
}

.exercise-table .exercise-thumbnail {
    object-fit: cover;
}

.exercise-table .exercise-icon {
    font-size: 1.2rem;
}

/* Input Styles */
.editable-input {
    width: 100%;
    padding: 4px 8px;
    border: 1px solid transparent;
    border-radius: 4px;
    background: transparent;
    text-align: center;
    font-family: inherit;
    color: inherit;
    transition: all 0.3s ease;
}

.editable-input:hover {
    border-color: var(--border-color);
    background-color: var(--primary-background-color);
}

.editable-input:focus {
    border-color: var(--primary-button-background-color);
    background-color: var(--primary-background-color);
    outline: none;
    box-shadow: 0 0 0 0.2rem rgba(74,144,226,0.25);
}

/* Action Buttons */
.btn {
    font-size: inherit;
    font-weight: 400;
    text-transform: uppercase;
    padding: 0.375rem 1.35rem;
    transition: all 0.3s ease;
    border-radius: 10px;
}

.btn-custom {
    background-color: var(--primary-button-background-color);
    color: var(--primary-button-foreground-color);
    border: none;
    /* Remove border */
}

.btn-custom:hover {
    background-color: var(--primary-button-background-hover-color);
    color: var(--primary-button-foreground-hover-color);
}

.action-buttons {
    display: flex;
    gap: 6px;
    justify-content: center;
}

.action-buttons .btn {
    padding: 4px 8px;
}

/* Dropzone Styles */
.dropzone {
    border: 2px dashed var(--secondary-background-color);
    border-radius: 10px;
    padding: 20px;
    text-align: center;
    color: var(--tertiary-text-color);
    background-color: var(--primary-background-color);
    transition: all 0.3s ease;
    margin-top: 10px;
}

.dropzone:hover {
    border-color: var(--primary-button-background-color);
}

.dropzone p {
    margin: 0;
    font-size: 1rem;
    color: var(--tertiary-text-color);
}

/* Scrollbar Styles */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--secondary-background-color);
}

::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #666;
}

/* Utility Classes */
.icon-white {
    color: white;
}

/* Drag and Drop Styles */
.move-handle {
    cursor: move;
}

.move-handle:active {
    cursor: grabbing;
}

/* Table Row States */
.exercise-table tbody tr {
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.exercise-table tr.dragging {
    opacity: 0.5;
    background-color: var(--drag-background-color);
}

.exercise-table tr.drag-over-above {
    border-top: 2px solid var(--primary-button-background-color);
}

.exercise-table tr.drag-over-below {
    border-bottom: 2px solid var(--primary-button-background-color);
}

.exercise-table tr[draggable="true"] {
    cursor: move;
}

/* Animations */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Table Row Animations */
.exercise-tbody tr {
    animation: slideIn 0.3s ease-out forwards;
}

.exercise-tbody tr.removing {
    animation: slideOut 0.3s ease-out forwards;
}

/* Dropzone States */
.dropzone.drag-over {
    background-color: rgba(74,144,226,0.1);
    border-color: var(--primary-button-background-color);
    border-style: solid;
}

/* Box Shadow Transition */
.workout-day-section,
.exercise-item {
    transition: box-shadow 0.3s ease;
}

/* Resize Handle */
.resize-handle {
    position: absolute;
    right: -6px;
    top: 0;
    bottom: 0;
    width: 12px;
    cursor: col-resize;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    transition: all 0.2s ease;
    z-index: 10;
}

.resize-handle::before {
    content: "";
    position: absolute;
    left: 5px;
    width: 2px;
    height: 100%;
    background: var(--border-color);
    transition: all 0.2s ease;
}

/* Resize dots pattern */
.resize-handle::after {
    content: "⋮";
    font-size: 1rem;
    line-height: 1;
    transition: all 0.2s ease;
    transform: rotate(90deg);
    letter-spacing: -1px;
}

/* Hover and active states */
.resize-handle:hover::before,
.resize-handle.active::before {
    background: var(--primary-button-background-color);
    box-shadow: 0 0 0 1px var(--primary-button-background-color);
}

.resize-handle:hover::after,
.resize-handle.active::after {
    color: var(--primary-button-background-color);
    text-shadow: 0 0 3px rgba(74, 144, 226, 0.3);
}

/* Visual feedback when resizing */
.resizing .sidebar {
    transition: none;
    border-right-color: var(--primary-button-background-color);
}

.resizing .resize-handle::before {
    background: var(--primary-button-background-color);
    box-shadow: 0 0 8px rgba(74, 144, 226, 0.5);
}

/* Resize overlay to prevent iframes/elements interference */
.resize-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999;
}

.resizing .resize-overlay {
    display: block;
}

/* Prevent text selection while resizing */
.resizing {
    user-select: none;
    cursor: col-resize;
}

/* Exercise name styles */
.exercise-name[role="button"] {
    cursor: pointer;
    color: var(--primary-button-background-color);
    transition: color 0.2s ease;
}

.exercise-name[role="button"]:hover {
    color: var(--primary-button-hover-color);
    text-decoration: underline;
}

/* Modal styles */
.modal {
    z-index: 99999 !important;
}

.modal-backdrop {
    z-index: 99990 !important;
}

.modal-content {
    border: none;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    background-color: var(--primary-background-color);
    color: var(--primary-text-color);
}

.modal-header {
    background-color: var(--secondary-background-color);
    border-bottom: 1px solid var(--border-color);
    padding: 1.5rem;
    color: var(--primary-text-color);
}

.modal-body {
    padding: 12px;
    background-color: var(--primary-background-color);
    color: var(--primary-text-color);
}

.modal-body .row {
    margin: 0;
}

.modal-body .col-md-6 {
    padding: 0 12px;
}

.exercise-details {
    padding-right: 12px;
}

.exercise-image-container {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--primary-background-color);
    border-radius: 0.5rem;
    overflow: hidden;
}

.exercise-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    background-color: var(--primary-background-color);
}

.exercise-image-large {
    width: 100%;
    max-height: 400px;
    object-fit: contain;
    background-color: var(--primary-background-color);
}

.exercise-image-medium {
    width: 100%;
    max-height: 300px;
    object-fit: contain;
    background-color: var(--primary-background-color);
}

.modal-header .close,
.modal-header button.close {
    padding: 8px !important;
    margin: -8px !important;
    opacity: 1 !important;
    transition: all 0.3s ease !important;
    border: none !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: auto !important;
    height: auto !important;
    line-height: 1 !important;
    cursor: pointer !important;
    /*color: var(--primary-button-background-color) !important;*/
    background-color: var(--primary-button-background-color) !important;
    color: var(--primary-button-foreground-color) !important;
}

.modal-header .close:hover,
.modal-header button.close:hover {
    opacity: 1 !important;
    text-decoration: none !important;
    /*color: var(--primary-button-background-hover-color) !important;*/
    background-color: var(--primary-button-background-hover-color) !important;
    color: var(--primary-button-foreground-hover-color) !important;
}

.modal-header .close i,
.modal-header button.close i {
    font-size: 1.2rem !important;
    line-height: 1 !important;
    font-weight: normal !important;
    color: inherit !important;
}

.modal-title {
    font-weight: 500;
    font-size: 1.2rem;
}

/* Exercise details styles */
.exercise-details strong {
    display: inline-block;
    margin-right: 0.5rem;
    font-size: 1rem;
}

.exercise-details h6 {
    font-weight: 500;
    margin-bottom: 1rem;
    font-size: 1rem;
}

.exercise-details .description-text {
    line-height: 1.6;
}

/* Learn More Link Styles */
.learn-more-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--primary-button-background-color);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.learn-more-link:hover {
    color: var(--primary-button-hover-color);
    text-decoration: none;
}

.learn-more-link i {
    font-size: 1rem;
}

/* Modal Exercise Images */
.exercise-image-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background-color: var(--primary-background-color);
    color: var(--primary-text-color);
    border-radius: 0.5rem;
    padding: 1rem;
}

.exercise-image-placeholder i {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.exercise-image-placeholder p {
    margin: 0;
    text-align: center;
    font-size: 0.9rem;
}

/* Toast Container */
.toast-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
    pointer-events: none;
}

.toast {
    pointer-events: auto;
    margin-bottom: 1rem;
    background-color: var(--primary-background-color);
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    min-width: 300px;
    opacity: 0;
    display: none;
}

.toast.show {
    opacity: 1;
    display: block;
}

.toast-header {
    background-color: var(--secondary-background-color);
    border-bottom: 1px solid var(--border-color);
    color: var(--text-color);
    display: flex;
    align-items: center;
    padding: 8px 12px;
    gap: 8px;
}

.toast-header .toast-icon {
    font-size: 16px;
    line-height: 1;
    margin: 0;
}

.toast-header .toast-title {
    margin: 0;
    line-height: 1;
}

.toast-header .mr-auto {
    margin-right: auto;
}

.toast-icon.bi-check-circle-fill {
    color: #28a745;
}

.toast-icon.bi-exclamation-circle-fill {
    color: #dc3545;
}

.toast-icon.bi-info-circle-fill {
    color: #17a2b8;
}

.toast-body {
    color: var(--text-color);
    padding: 12px;
}

/* Workout Notes Styles */
.notes-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.notes-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 400;
    font-size: 1rem;
    text-transform: uppercase;
    color: var(--primary-text-color);
}

.notes-title i {
    font-size: 1.2em;
    color: var(--primary-text-color);
}

.workout-plan-notes.collapsed .collapse-icon {
    transform: rotate(180deg);
}

.notes-content {
    transition: max-height 0.3s ease-out, opacity 0.3s ease-out, margin 0.3s ease-out;
    max-height: 500px;
    opacity: 1;
    overflow: hidden;
    margin-top: 12px;
}

.workout-plan-notes.collapsed .notes-content {
    max-height: 0;
    opacity: 0;
    margin-top: 0;
}

.notes-input {
    width: 100%;
    min-height: 100px;
    padding: 12px;
    border: none;
    border-radius: 10px;
    font-family: inherit;
    font-size: 0.8rem;
    line-height: 1.5;
    resize: vertical;
    background-color: var(--primary-background-color);
    color: var(--primary-text-color);
}

.notes-input:focus {
    outline: none;
}

/* Print styles moved to print.css */

.btn-outline-light {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 0.375rem 1.35rem;
}

.btn-outline-light i {
    font-size: 1.2em;
    line-height: 1;
    margin: 0;
}

/* Workout Type Tags */
.workout-type-tags {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
}

.workout-type-tag {
    position: relative;
    padding: 6px 12px 6px 32px;
    background-color: var(--primary-background-color);
    border: 1px solid var(--primary-button-background-color);
    border-radius: 10px;
    cursor: pointer;
    user-select: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    color: var(--primary-text-color);
    transition: all 0.3s ease;
    font-size: 0.8rem;
    font-weight: 400;
    min-height: 32px;
}

.workout-type-tag:hover {
    background-color: var(--workout-plan-type-selected-background-color);
    color: white;
}

.workout-type-tag:hover .type-icon {
    color: white;
}

.workout-type-checkbox {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.workout-type-tag .checkmark {
    position: absolute;
    left: 10px;
    color: white;
    opacity: 0;
    transition: opacity 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    top: 50%;
    transform: translateY(-50%);
}

.workout-type-tag .type-icon {
    font-size: 1em;
    color: var(--primary-text-color);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
}

.workout-type-checkbox:checked + .checkmark {
    opacity: 1;
}

.workout-type-checkbox:checked ~ .type-icon {
    color: white;
}

.workout-type-checkbox:checked + .checkmark + .type-icon + span {
    color: white;
}

.workout-type-tag:has(.workout-type-checkbox:checked) {
    background-color: var(--workout-plan-type-selected-background-color);
    border-color: var(--workout-plan-type-selected-background-color);
    color: white;
}

.nav-link .bi-gear-fill,
.nav-link .bi-person-circle {
    font-size: 1.2rem;
    transition: transform 0.3s ease;
    vertical-align: -0.2em;
    line-height: 1;
}

.nav-link:hover .bi-gear-fill {
    transform: rotate(45deg);
}

.nav-link:hover .bi-person-circle {
    transform: scale(1.1);
}

/* Ensure consistent nav-link height */
.nav-item .nav-link {
    display: flex;
    align-items: center;
    height: 100%;
    padding: 0.5rem 1rem;
}

/* Specific alignment for the settings nav item */
.nav-item:has(.bi-gear-fill) .nav-link {
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
}

/* Exercise List Images */
.exercise-thumbnail {
    width: 50px;
    height: 50px;
    border-radius: 8px;
    object-fit: cover;
    margin-right: 12px;
}

/* Share Modal Styles */
.share-section {
    padding: 1rem;
}

.share-link-container label,
.share-options label {
    display: block;
    color: var(--text-color);
}

.share-buttons {
    display: flex;
    gap: 1rem;
    margin-top: 0.5rem;
}

.share-button {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
}

.share-button i {
    font-size: 1.2rem;
}

#shareLink {
    background-color: var(--secondary-background-color);
    color: var(--text-color);
    border: 1px solid var(--border-color);
    padding: 0.5rem;
}

#copyLinkBtn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

#copyLinkBtn i {
    font-size: 1.1rem;
}

.toast-header .close,
.toast-header button.close,
.toast-header .close:not(:disabled):not(.disabled) {
    background: none;
    border: none;
    padding: 0.5rem 0.75rem;
    margin: -0.5rem -0.75rem -0.5rem auto;
    background-color: transparent;
    border: 0;
    appearance: none;
    float: right;
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1;
    color: var(--text-color);
    text-shadow: 0 1px 0 #fff;
    opacity: 0.5;
    transition: opacity 0.15s ease;
}

.toast-header .close:hover,
.toast-header button.close:hover,
.toast-header .close:not(:disabled):not(.disabled):hover {
    color: var(--text-color);
    text-decoration: none;
    opacity: 0.75;
}

.toast-header .close:active {
    transform: scale(0.95);
}

.toast-header .close span {
    display: none;
}

.toast-header .close::after {
    content: "\f057";
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    font-size: 24px;
}

/* Override any Bootstrap close button styles */
.close:not(:disabled):not(.disabled):focus,
.close:not(:disabled):not(.disabled):hover {
    opacity: 1;
}

/* Toast close button */
.toast .close {
    width: 24px;
    height: 24px;
    min-width: 24px;
    padding: 0;
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--primary-button-background-color);
    color: white;
    opacity: 1;
    margin: 0;
    line-height: 1;
    transition: all 0.2s ease;
}

.toast .close:hover {
    background-color: var(--secondary-button-background-hover-color);
    color: white;
    opacity: 1;
}

.toast .close span {
    display: none;
}

.toast .close::after {
    content: "\f00d";  /* Changed to simple X icon */
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    font-size: 14px;
}

/* Override Bootstrap margins */
.toast-header .mr-2,
.toast-header .ml-2,
.toast-header .mb-1 {
    margin: 0 !important;
}

.modal .close {
    width: 24px;
    height: 24px;
    min-width: 24px;
    padding: 0;
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--primary-button-background-color);
    color: white;
    opacity: 1;
    margin: 0;
    line-height: 1;
    transition: all 0.2s ease;
    position: relative;
    z-index: 2;
}

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

.modal .close i {
    font-size: 1.2rem;
    line-height: 1;
    display: block;
}

.modal .close span {
    display: none;
}

.modal .close::after {
    display: none;
}

.exercise-table th.header-plan {
    text-align: center;
    min-width: 120px;  /* Wider minimum width for Plan column */
}

.exercise-table td input.editable-input {
    width: 100%;
    min-width: 80px;  /* Match the header minimum width */
    text-align: center;
    background: transparent;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 4px 8px;
    color: var(--text-color);
}

.exercise-table td input.editable-input[data-type="duration"] {
    min-width: 100px;  /* Slightly wider for duration inputs */
    font-family: monospace;  /* Better alignment for time format */
}

.exercise-table th.header-center,
.exercise-table th.header-plan {
    text-align: center;  /* Center the Sets and Plan headers */
}

/* Settings Modal Styles */
.settings-section {
    padding: 0 0 20px;
}

.settings-section:last-child {
    padding-bottom: 0;
}

.settings-section-title {
    color: var(--primary-text-color);
    font-size: 1.1rem;
    font-weight: 500;
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border-color);
}

.settings-option {
    margin-bottom: 24px;
}

.settings-option:last-child {
    margin-bottom: 0;
}

.settings-option-header {
    margin-bottom: 12px;
}

.settings-label {
    font-weight: 500;
    color: var(--primary-text-color);
    margin: 0;
}

.settings-description {
    color: var(--secondary-text-color);
    font-size: 0.9rem;
    margin: 0;
    line-height: 1.5;
}

.default-sets-input {
    max-width: 120px;
    margin-bottom: 8px;
}

.default-sets-input input {
    text-align: center;
    font-size: 16px;
    padding: 8px;
    height: auto;
}

/* Weight Unit Toggle Styles */
.weight-unit-toggle {
    width: 100%;
    margin-top: 8px;
}

.weight-unit-toggle .btn {
    flex: 1;
    padding: 8px 16px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.weight-unit-toggle .btn.active {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

.weight-unit-toggle .btn:not(.active):hover {
    background-color: rgba(0, 86, 179, 0.1);
}

/* Modal Header Icon */
.modal-title i {
    margin-right: 8px;
    color: var(--primary-color);
}

/* Auth Status Styles */
.auth-status {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 4px 8px;
    border-radius: 15px;
    background-color: rgba(255, 255, 255, 0.1);
    font-size: 0.85rem;
    cursor: default;
    margin-right: 5px;
    transition: background-color 0.2s ease;
    max-width: 200px;
    overflow: hidden;
}

.auth-status .status-text {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.8);
    margin-left: 4px;
    display: inline-block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.auth-status:hover .status-text {
    color: #ffffff;
}

.auth-status:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

.auth-status i {
    font-size: 0.6rem;
    flex-shrink: 0;
}

.auth-status i.text-danger {
    color: #dc3545;
}

.auth-status i.text-success {
    color: #28a745;
}

.auth-status .status-text {
    color: #fff;
    user-select: none;
}

/* Exercise Table Styles */
.exercise-table input[type="text"],
.exercise-table input[type="number"] {
    border: none;
    background: transparent;
    width: 100%;
    padding: 4px;
    color: var(--primary-text-color);
    font-size: inherit;
    text-align: center;
}

.exercise-table input[type="text"]:focus,
.exercise-table input[type="number"]:focus {
    outline: none;
}

.popularity-stars {
    display: inline-block;
    margin-left: 0.5rem;
}

.popularity-stars i {
    color: var(--secondary-text-color);
    margin-right: 0.25rem;
}

.popularity-stars i.text-warning {
    color: #ffc107;
}

.popularity-text {
    display: block;
    margin-top: 0.5rem;
    color: var(--secondary-text-color);
    font-size: 0.875rem;
}

/* Image Loading Styles */
.image-container {
    position: relative;
    overflow: hidden;
    background-color: #f8f9fa;
    border-radius: 8px;
    transition: all 0.3s ease;
    aspect-ratio: 1;
}

.image-container picture {
    display: block;
    width: 100%;
    height: 100%;
}

.image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: filter 0.3s ease;
    display: block;
}

.image-container img.blur-up {
    filter: blur(10px);
    transform: scale(1.1);
}

.image-container img.loaded {
    filter: blur(0);
    transform: scale(1);
}

/* Loading animation */
@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

.image-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, 0.2) 50%,
        rgba(255, 255, 255, 0) 100%
    );
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    z-index: 1;
}

.image-container.loaded::before {
    display: none;
}

.image-container img.loaded + .image-container::before {
    display: none;
}

/* Exercise Image Sizes */
.exercise-image {
    width: 80px;
    height: 80px;
}

.exercise-image-large {
    width: 200px;
    height: 200px;
}

.exercise-image-medium {
    width: 160px;
    height: 160px;
}

/* Modal-specific image sizes */
#exerciseModal .modal-body .exercise-image-container {
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    padding: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    overflow: hidden;
}

#exerciseModal .modal-body .exercise-image-medium,
#exerciseModal .modal-body .exercise-image {
    width: 100%;
    height: auto;
    max-height: 600px;
    object-fit: contain;
    border-radius: 10px;
}

/* Responsive Image Sizes */
@media (max-width: 768px) {
    .exercise-image {
        width: 60px;
        height: 60px;
    }
    
    .exercise-image-large {
        width: 160px;
        height: 160px;
    }
    
    .exercise-image-medium {
        width: 120px;
        height: 120px;
    }

    #exerciseModal .modal-body .exercise-image-container {
        max-width: 500px;
        padding: 20px;
    }

    #exerciseModal .modal-body .exercise-image-medium,
    #exerciseModal .modal-body .exercise-image {
        max-height: 400px;
    }
}

/* Popularity stars styles */
.exercise-popularity {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1rem;
}

.popularity-label {
    font-weight: 500;
    color: #666;
}

.popularity-stars {
    display: flex;
    gap: 0.25rem;
}

.popularity-stars .fa-star {
    font-size: 1.1rem;
}

.popularity-stars .text-warning {
    color: #ffc107;
}

.popularity-stars .text-muted {
    color: #dee2e6;
}

.alert {
    display: flex;
    align-items: center;
    padding: 1rem 1.5rem;
    margin: 1rem 1.5rem;
    border-radius: 0.5rem;
    background-color: var(--tertiary-background-color);
    color: var(--primary-text-color);
    border: none;
    position: relative;
}

.alert-info {
    background-color: var(--tertiary-background-color);
    color: var(--primary-text-color);
}

.alert i {
    margin-right: 0.5rem;
    flex-shrink: 0;
}

.alert .alert-message {
    flex-grow: 1;
    text-align: left;
    margin-right: 2rem;
}

.alert .btn-close {
    background: none;
    border: none;
    padding: 0;
    color: var(--primary-button-background-color);
    opacity: 1;
    transition: color 0.2s ease;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 1.5rem;
    height: 1.5rem;
    position: absolute;
    right: 1rem;
    top: 1rem;
    transform: none;
}

.alert .btn-close:hover {
    color: var(--primary-button-background-color);
}

.alert .btn-close:focus {
    outline: none;
    box-shadow: none;
}

.alert .btn-close::after {
    content: "×";
    font-size: 1.5rem;
    line-height: 1;
    font-weight: normal;
}

/* Hide unused buttons for future use */
.save-plan-button,
.share-plan-button,
.nav-item:has(.bi-person-circle) .nav-link,
.auth-status {
    display: none !important;
}

/* Hero Section Styles */
.hero-section {
    padding: 20px 20px 15px 20px;
    text-align: center;
    border: 1px solid var(--secondary-background-color);
    border-radius: 10px;
    margin: 10px 0 10px 0; /* Reduced top margin from 20px to 10px */
    background-color: var(--hero-background-color);
    position: relative;
    transition: opacity 0.3s ease, transform 0.3s ease;
    display: none; /* Hidden by default */
}

.hero-section.show {
    display: block; /* Only show when JavaScript adds this class */
}

.hero-section.dismissed {
    opacity: 0;
    transform: translateY(-10px);
    pointer-events: none;
}

.hero-close-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    background: none;
    border: none;
    color: var(--hero-text-color);
    cursor: pointer;
    padding: 4px;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s ease;
    opacity: 0.6;
}

.hero-close-btn:hover {
    background-color: var(--hero-text-color);
    opacity: 1;
    color: white;
}

.hero-close-btn i {
    font-size: 14px;
}

.hero-title {
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--hero-text-color);
    margin: 0 0 8px 0;
    line-height: 1.3;
    padding-right: 20px; /* Make room for close button */
}

.hero-subtitle {
    font-size: 0.9rem;
    color: var(--hero-text-color);
    margin: 0;
    line-height: 1.4;
    opacity: 0.8;
}

/* Hide hero section on mobile */
@media (max-width: 576px) {
    .hero-section {
        display: none;
        margin: 5px 20px 5px 20px; /* Reduced from 10px 20px 10px 20px */
    }
}

/* Workout Hero Section Styles */
.workout-hero-section {
    padding: 20px 20px 15px 20px;
    text-align: center;
    border: 1px solid var(--secondary-background-color);
    border-radius: 10px;
    margin: 30px 20px -14px 20px; /* 30px top to align with sidebar hero, -14px bottom to compensate for workout-plan-header margin */
    background-color: var(--hero-background-color);
    position: relative;
    transition: opacity 0.3s ease, transform 0.3s ease;
    display: none; /* Hidden by default */
}

.workout-hero-section.show {
    display: block; /* Only show when JavaScript adds this class */
}

.workout-hero-section.dismissed {
    opacity: 0;
    transform: translateY(-10px);
    pointer-events: none;
}

.workout-hero-close-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    background: none;
    border: none;
    color: var(--hero-text-color);
    cursor: pointer;
    padding: 4px;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s ease;
    opacity: 0.6;
}

.workout-hero-close-btn:hover {
    background-color: var(--hero-text-color);
    opacity: 1;
    color: white;
}

.workout-hero-close-btn i {
    font-size: 14px;
}

.workout-hero-items {
    display: flex;
    justify-content: space-evenly;
    gap: 20px;
    margin: 0;
    flex-wrap: wrap;
}

.workout-hero-item {
    flex: 1;
    min-width: 120px;
    text-align: center;
    position: relative;
}

.workout-hero-item:not(:last-child)::after {
    content: '';
    position: absolute;
    right: -10px;
    top: 50%;
    transform: translateY(-50%);
    width: 1px;
    height: 60%;
    background-color: var(--hero-text-color);
    opacity: 0.3;
}

.workout-hero-item-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--hero-text-color) !important; /* Override global h2 color */
    margin: 0 0 8px 0;
    line-height: 1.3;
}

.workout-hero-item-title i {
    margin-right: 8px;
    opacity: 0.9;
    color: inherit; /* Ensure icons inherit the hero text color from parent */
}

.workout-hero-item-subtitle {
    font-size: 0.85rem;
    color: var(--hero-text-color);
    margin: 0;
    line-height: 1.3;
    opacity: 0.8;
}

/* Hide workout hero section on mobile */
@media (max-width: 576px) {
    .workout-hero-section {
        display: none !important;
    }
}

/* Hide workout hero section when printing */
@media print {
    .workout-hero-section,
    .hero-section {
        display: none !important;
    }
}