/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: #f5f5f5;
    color: #333;
    line-height: 1.6;
}

.container {
    max-width: 100%;
    margin: 0 auto;
    padding: 0;
    width: 100%;
    overflow-x: auto;
}

/* Calendar Container */
.calendar-container {
    background: white;
    min-height: 100vh;
    width: 100%;
    overflow-x: auto;
}

/* Calendar Header */
.calendar-header {
    background: #fff;
    padding: 16px;
    border-bottom: 1px solid #e0e0e0;
    position: sticky;
    top: 0;
    z-index: 10;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
}

.date-range {
    font-size: 12px;
    color: #5f6368;
    text-align: left;
}

.view-user-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.view-user-info {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #5f6368;
}

.view-user-label {
    font-weight: 500;
}

.view-user-name {
    font-weight: 600;
    color: #202124;
}

.logout-button {
    position: absolute;
    top: 50%;
    right: 16px;
    transform: translateY(-50%);
    font-size: 14px;
    color: white;
    background-color: #1a73e8;
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 4px;
    font-weight: 500;
    transition: background-color 0.2s;
    border: none;
    cursor: pointer;
}

.logout-button:hover {
    background-color: #1557b0;
    text-decoration: none;
    color: white;
}

.logout-button:active {
    background-color: #0d47a1;
}

/* User Menu */
.user-menu-container {
    position: absolute;
    top: 50%;
    right: 16px;
    transform: translateY(-50%);
}

.user-menu-button {
    font-size: 14px;
    color: white;
    background-color: #1a73e8;
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 4px;
    font-weight: 500;
    transition: background-color 0.2s;
    border: none;
    cursor: pointer;
    font-family: inherit;
    display: flex;
    align-items: center;
    gap: 6px;
}

.user-menu-button:hover {
    background-color: #1557b0;
}

.user-menu-button:active {
    background-color: #0d47a1;
}

.user-menu-button::after {
    content: '▼';
    font-size: 10px;
    margin-left: 4px;
    transition: transform 0.2s;
}

.user-menu-button[aria-expanded="true"]::after {
    transform: rotate(180deg);
}

.user-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: white;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    min-width: 180px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity 0.2s, visibility 0.2s, transform 0.2s;
    z-index: 1000;
    padding: 4px 0;
}

.user-menu.user-menu-open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.user-menu-item {
    display: block;
    padding: 10px 16px;
    font-size: 14px;
    color: #202124;
    text-decoration: none;
    transition: background-color 0.2s;
    cursor: pointer;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
    font-family: inherit;
}

.user-menu-item:hover {
    background-color: #f5f5f5;
}

.user-menu-name {
    font-weight: 700;
    font-size: 12px;
    color: #5f6368;
    cursor: default;
    border-bottom: 1px solid #e0e0e0;
    margin-bottom: 4px;
    padding-bottom: 8px;
}

.user-menu-name:hover {
    background-color: transparent;
}

.user-menu-link {
    cursor: pointer;
}

.user-menu-divider {
    height: 1px;
    background-color: #e0e0e0;
    margin: 4px 0;
}

@media (max-width: 768px) {
    .user-menu-container {
        right: 12px;
    }

    .user-menu-button {
        padding: 6px 12px;
        font-size: 13px;
    }

    .user-menu {
        min-width: 160px;
        right: 0;
    }
}

/* Calendar Grid */
.calendar-grid {
    display: flex;
    flex-direction: column;
    padding: 0;
    width: 100%;
    overflow-x: auto;
    min-width: 0;
}

/* Day names header row */
.calendar-week-header {
    display: -webkit-grid;
    display: grid;
    -webkit-grid-template-columns: repeat(7, 1fr);
    grid-template-columns: repeat(7, 1fr);
    border-bottom: 2px solid #e0e0e0;
    background-color: #fafafa;
    position: sticky;
    top: 0;
    z-index: 5;
    width: 100%;
    grid-auto-flow: row;
}

.calendar-day-header {
    border-right: 1px solid #e0e0e0;
    padding: 8px;
    display: -webkit-flex;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 500;
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
    flex-shrink: 0;
    width: 100%;
    box-sizing: border-box;
    -webkit-box-sizing: border-box;
    position: relative;
}

.calendar-day-header .day-name {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 100%;
    text-align: center;
    display: block;
    box-sizing: border-box;
}

.calendar-day-header:last-child {
    border-right: none;
}

.calendar-week {
    display: -webkit-grid;
    display: grid;
    -webkit-grid-template-columns: repeat(7, 1fr);
    grid-template-columns: repeat(7, 1fr);
    border-bottom: 1px solid #e0e0e0;
    width: 100%;
}

/* Calendar Day */
.calendar-day {
    border-right: 1px solid #e0e0e0;
    padding: 8px;
    min-height: 120px;
    height: 100%;
    display: flex;
    flex-direction: column;
    transition: opacity 0.2s;
    position: relative;
    overflow: hidden;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* Remove border between days in the same block (header area) */
.calendar-day.block-continues {
    border-right: none;
}

/* Add border back in the day-content area to separate activities */
.calendar-day.block-continues .day-content {
    border-right: 1px solid #e0e0e0;
    margin-right: -8px;
    padding-right: 8px;
}

.calendar-day:last-child {
    border-right: none;
}

.calendar-day:hover {
    background-color: rgba(0, 0, 0, 0.02);
}

/* Block Colors */
/* Training - Green tinted based on odd/even block number */
.calendar-day.block-training-odd .day-header {
    background-color: #c8e6c9;
    padding: 3px 8px;
    margin: -8px -8px 6px -8px;
    /* Light green for odd-numbered training blocks */
}

.calendar-day.block-training-even .day-header {
    background-color: #81c784;
    padding: 3px 8px;
    margin: -8px -8px 6px -8px;
    /* Dark green for even-numbered training blocks */
}

/* Rounded corners for block boundaries */
.calendar-day.block-start .day-header {
    border-top-left-radius: 8px;
    border-bottom-left-radius: 8px;
}

.calendar-day.block-end .day-header {
    border-top-right-radius: 8px;
    border-bottom-right-radius: 8px;
}

/* Rest - Very faint white */
.calendar-day.block-rest-even .day-header {
    background-color: #fafafa;
    padding: 3px 8px;
    margin: -8px -8px 6px -8px;
    /* Very light white for even rest blocks */
}

.calendar-day.block-rest-odd .day-header {
    background-color: #f5f5f5;
    padding: 3px 8px;
    margin: -8px -8px 6px -8px;
    /* Slightly darker white for odd rest blocks */
}

/* Tapering - Grey tinted */
.calendar-day.block-tapering-even .day-header {
    background-color: #f5f5f5;
    padding: 3px 8px;
    margin: -8px -8px 6px -8px;
    /* Light grey for even tapering blocks */
}

.calendar-day.block-tapering-odd .day-header {
    background-color: #e0e0e0;
    padding: 3px 8px;
    margin: -8px -8px 6px -8px;
    /* Darker grey for odd tapering blocks */
}

/* Sick - Red tinted */
.calendar-day.block-sick-even .day-header {
    background-color: #ffebee;
    padding: 3px 8px;
    margin: -8px -8px 6px -8px;
    /* Light red/pink for even sick blocks */
}

.calendar-day.block-sick-odd .day-header {
    background-color: #ffcdd2;
    padding: 3px 8px;
    margin: -8px -8px 6px -8px;
    /* Darker red/pink for odd sick blocks */
}

/* Fallback colors (for backwards compatibility) */
.calendar-day.block-even .day-header {
    background-color: #e8e8e8;
    padding: 3px 8px;
    margin: -8px -8px 6px -8px;
}

.calendar-day.block-odd .day-header {
    background-color: #d0d0d0;
    padding: 3px 8px;
    margin: -8px -8px 6px -8px;
}

.calendar-day.today {
    border-left: 3px solid #1a73e8;
}

.calendar-day.drag-over {
    background-color: rgba(26, 115, 232, 0.15) !important;
    border: 2px dashed #1a73e8;
    box-shadow: inset 0 0 10px rgba(26, 115, 232, 0.2);
}

/* Day Header */
.day-header {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    margin-bottom: 6px;
    min-height: 15px;
}

.day-number-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 15px;
    min-height: 15px;
}

.day-number {
    font-size: 10px;
    font-weight: 500;
    color: #202124;
}

.day-number.today-number {
    background-color: #1a73e8;
    color: white;
    width: 15px;
    height: 15px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
}

.day-name {
    font-size: 10px;
    font-weight: 500;
    color: #5f6368;
    text-transform: uppercase;
}

/* Day Content */
.day-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 11px;
    overflow: hidden;
    min-width: 0;
    /* Allows flex children to shrink below content size */
}

/* Past day diagonal stripe pattern */
.calendar-day.past .day-content {
    background-image: repeating-linear-gradient(45deg,
            transparent,
            transparent 10px,
            rgba(0, 0, 0, 0.025) 10px,
            rgba(0, 0, 0, 0.025) 20px);
}

/* Events */
.day-events {
    margin-bottom: 4px;
    min-width: 0;
    /* Allows flex children to shrink */
}

.event-item {
    font-size: 9px;
    font-weight: 500;
    color: #5f6368;
    margin-bottom: 2px;
    word-wrap: break-word;
    overflow-wrap: break-word;
    cursor: pointer;
    padding: 2px 4px;
    border-radius: 3px;
    transition: background-color 0.2s;
    line-height: 1.3;
    max-width: 100%;
}

.event-item:hover {
    background-color: rgba(26, 115, 232, 0.1);
}

/* Activities */
.day-activities {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
    /* Allows flex children to shrink */
}

.activity-item {
    padding: 4px 6px;
    background-color: rgba(255, 255, 255, 0.7);
    border-left: 3px solid;
    border-top: 1px solid #f0f0f0;
    border-right: 1px solid #f0f0f0;
    border-bottom: 1px solid #f0f0f0;
    border-radius: 2px;
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
    /* Allows flex children to shrink */
    overflow: hidden;
    cursor: pointer;
    transition: background-color 0.2s;
}

.activity-item.completed {
    border-top: none;
    border-right: none;
    border-bottom: none;
    /* Background color will be set by JavaScript for cross-browser compatibility */
}

.activity-item:hover {
    background-color: rgba(26, 115, 232, 0.1);
}

.activity-item.completed {
    /* Background color will be set by JavaScript for cross-browser compatibility */
}

.activity-item.completed:hover {
    /* Hover effect handled by JavaScript */
}

.activity-item.dragging {
    opacity: 0.5;
    cursor: grabbing;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    -webkit-touch-callout: none;
    position: relative;
    z-index: 1000;
}

/* Only disable pointer events on touch devices during drag */
@media (hover: none) and (pointer: coarse) {
    .activity-item.dragging {
        pointer-events: none;
        /* Allow clicks to pass through while dragging on touch devices */
    }
}

.activity-item.draggable-activity {
    cursor: grab;
}

.activity-item.draggable-activity:active {
    cursor: grabbing;
}

.activity-name {
    font-weight: 500;
    color: #202124;
    font-size: 11px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.3;
    display: block;
    width: 100%;
}

[data-activity-strava-id]:not([data-activity-strava-id=""]) .activity-name {
    border-bottom: 1px solid currentColor;
}

.activity-metric {
    font-size: 9px;
    color: #5f6368;
    font-weight: 400;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .calendar-week {
        -webkit-grid-template-columns: repeat(7, 1fr);
        grid-template-columns: repeat(7, 1fr);
    }

    .calendar-week-header {
        display: -webkit-grid !important;
        display: grid !important;
        -webkit-grid-template-columns: repeat(7, 1fr) !important;
        grid-template-columns: repeat(7, 1fr) !important;
        width: 100% !important;
        grid-auto-flow: row !important;
    }

    .calendar-day-header {
        padding: 6px 4px;
        min-width: 0;
        max-width: 100%;
        display: -webkit-flex !important;
        display: flex !important;
        flex-shrink: 0;
        width: 100% !important;
        box-sizing: border-box;
        -webkit-box-sizing: border-box;
    }

    .calendar-day {
        padding: 6px 4px;
        min-height: 100px;
        max-width: 100%;
    }

    /* Adjust day-header margins for tablet */
    .calendar-day.block-training-odd .day-header,
    .calendar-day.block-training-even .day-header,
    .calendar-day.block-rest-even .day-header,
    .calendar-day.block-rest-odd .day-header,
    .calendar-day.block-tapering-even .day-header,
    .calendar-day.block-tapering-odd .day-header,
    .calendar-day.block-sick-even .day-header,
    .calendar-day.block-sick-odd .day-header,
    .calendar-day.block-even .day-header,
    .calendar-day.block-odd .day-header {
        margin: -6px -4px 6px -4px;
        padding: 3px 8px;
    }

    /* Adjust day-content border for tablet */
    .calendar-day.block-continues .day-content {
        margin-right: -4px;
        padding-right: 4px;
    }

    .day-header {
        min-height: 14px;
    }

    .day-number-container {
        min-width: 14px;
        min-height: 14px;
    }

    .day-number {
        font-size: 8px;
    }

    .day-name {
        font-size: 9px;
    }

    .activity-name {
        font-size: 10px;
    }

    .activity-metric {
        font-size: 8px;
    }

    .event-item {
        font-size: 8px;
        line-height: 1.2;
    }
}

@media (max-width: 480px) {
    .calendar-header {
        padding: 16px 12px;
    }

    .calendar-header h1 {
        font-size: 20px;
    }

    .calendar-week-header {
        display: -webkit-grid !important;
        display: grid !important;
        -webkit-grid-template-columns: repeat(7, 1fr) !important;
        grid-template-columns: repeat(7, 1fr) !important;
        width: 100% !important;
        grid-auto-flow: row !important;
    }

    .calendar-day-header {
        padding: 4px 2px;
        min-width: 0;
        max-width: 100%;
        display: -webkit-flex !important;
        display: flex !important;
        flex-shrink: 0;
        width: 100% !important;
        box-sizing: border-box;
        -webkit-box-sizing: border-box;
    }

    .calendar-day {
        padding: 4px 2px;
        min-height: 90px;
        max-width: 100%;
    }

    /* Adjust day-header margins for mobile */
    .calendar-day.block-training-odd .day-header,
    .calendar-day.block-training-even .day-header,
    .calendar-day.block-rest-even .day-header,
    .calendar-day.block-rest-odd .day-header,
    .calendar-day.block-tapering-even .day-header,
    .calendar-day.block-tapering-odd .day-header,
    .calendar-day.block-sick-even .day-header,
    .calendar-day.block-sick-odd .day-header,
    .calendar-day.block-even .day-header,
    .calendar-day.block-odd .day-header {
        margin: -4px -2px 6px -2px;
        padding: 3px 8px;
    }

    /* Adjust day-content border for mobile */
    .calendar-day.block-continues .day-content {
        margin-right: -2px;
        padding-right: 2px;
    }

    .day-header {
        min-height: 14px;
    }

    .day-number-container {
        min-width: 14px;
        min-height: 14px;
    }

    .day-number {
        font-size: 8px;
    }

    .day-number.today-number {
        width: 14px;
        height: 14px;
    }

    .event-item {
        font-size: 7px;
        padding: 1px 2px;
        line-height: 1.2;
    }

    .activity-name {
        font-size: 9px;
    }

    .activity-metric {
        font-size: 7px;
    }
}

/* Week Navigation */
.week-navigation {
    display: flex;
    background-color: white;
    border-top: 1px solid #e0e0e0;
    position: relative;
    z-index: 101;
}

.nav-button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 10vw;
    height: 36px;
    background-color: #1a73e8;
    color: white;
    text-decoration: none;
    font-size: 24px;
    font-weight: 500;
    transition: all 0.2s;
    border: none;
}

.nav-button:hover {
    background-color: #1557b0;
}

.nav-button:active {
    background-color: #0d47a1;
}

.nav-button-prev {
    border-right: 1px solid rgba(255, 255, 255, 0.2);
}

.nav-button-current {
    flex: 1;
    font-size: 14px;
    border-left: 1px solid rgba(255, 255, 255, 0.2);
    border-right: 1px solid rgba(255, 255, 255, 0.2);
}

.nav-button-next {
    margin-left: auto;
}

@media (max-width: 480px) {
    .nav-button {
        height: 30px;
        font-size: 20px;
    }

    .nav-button-current {
        font-size: 12px;
    }
}

/* Block Progress Bar */
.block-progress-container {
    width: 100%;
    background-color: white;
    border-top: 1px solid #e0e0e0;
    padding: 12px 0;
    position: relative;
    z-index: 100;
}

.block-progress-bar {
    width: 100%;
    height: 40px;
    background-color: white;
    position: relative;
    display: flex;
    align-items: center;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    overflow: hidden;
}

.block-progress-filled {
    height: 100%;
    background-color: #006400;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding-left: 12px;
    transition: width 0.3s ease;
    min-width: 0;
}

.block-progress-text {
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
}

.block-progress-text-completed {
    color: #fff;
    left: 12px;
    z-index: 2;
}

.block-progress-text-completed-outside {
    color: #000;
    left: 12px;
    z-index: 2;
    font-weight: 600;
}

.block-progress-text-remaining {
    color: #333;
    right: 12px;
    z-index: 1;
}

@media (max-width: 480px) {
    .block-progress-container {
        padding: 8px 0;
    }

    .block-progress-bar {
        height: 32px;
    }

    .block-progress-text {
        font-size: 12px;
    }

    .block-progress-text-completed,
    .block-progress-text-completed-outside {
        left: 8px;
    }

    .block-progress-text-remaining {
        right: 8px;
    }

    .block-progress-filled {
        padding-left: 8px;
    }
}

/* Modal duration progress bars */
#viewDurationBars {
    padding: 0 0 4px;
}

.modal-duration-bar-group {
    margin-bottom: 8px;
}

.modal-duration-bar-label {
    font-size: 12px;
    color: #666;
    margin-bottom: 3px;
}

.modal-duration-bar {
    width: 100%;
    height: 28px;
    display: flex;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    overflow: hidden;
}

.modal-duration-bar-other {
    height: 100%;
    background-color: #006400;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: width 0.3s ease;
    min-width: 0;
    overflow: hidden;
}

.modal-duration-bar-current {
    height: 100%;
    background-color: #4caf50;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: width 0.3s ease;
    min-width: 0;
    overflow: hidden;
}

.modal-duration-bar-remaining {
    height: 100%;
    background-color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: width 0.3s ease;
    min-width: 0;
    overflow: hidden;
}

.modal-duration-bar-text {
    font-size: 11px;
    font-weight: 500;
    white-space: nowrap;
    color: #fff;
}

.modal-duration-bar-remaining .modal-duration-bar-text {
    color: #333;
}

@media (max-width: 480px) {
    .modal-duration-bar {
        height: 24px;
    }

    .modal-duration-bar-text {
        font-size: 10px;
    }
}

/* Messages */
.messages {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    max-width: 400px;
}

.message {
    padding: 12px 16px;
    margin-bottom: 8px;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    animation: slideIn 0.3s ease-out;
    transition: opacity 0.3s ease-out, transform 0.3s ease-out;
}

.message-success {
    background-color: #4caf50;
    color: white;
}

.message-error {
    background-color: #f44336;
    color: white;
}

.message-info {
    background-color: #2196f3;
    color: white;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Floating Action Button */
.fab {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background-color: #1a73e8;
    color: white;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 999;
    transition: all 0.3s ease;
}

.fab:hover {
    background-color: #1557b0;
    transform: scale(1.1);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
}

.fab:active {
    transform: scale(0.95);
}

.fab svg {
    stroke: white;
}

.fab.hidden {
    display: none;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.2s ease-out;
}

.modal.show {
    display: flex;
}

#reportModal.modal {
    align-items: stretch;
    justify-content: stretch;
    padding: 0;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.modal-content {
    background-color: white;
    border-radius: 8px;
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.3s ease-out;
}

/* Ensure nested modals appear above parent modals */
#addActivityTargetModal.modal {
    z-index: 1001;
}

.report-modal-content.modal-content {
    width: 100%;
    max-width: 100%;
    border-radius: 0;
    box-shadow: none;
}

@keyframes slideUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid #e0e0e0;
}

.modal-header:has(button:only-child) {
    justify-content: flex-end;
    padding: 12px 16px;
}

.modal-header h2 {
    margin: 0;
    font-size: 20px;
    font-weight: 500;
    color: #202124;
}

.modal-close {
    background: none;
    border: none;
    font-size: 28px;
    color: #5f6368;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.2s;
}

.modal-close:hover {
    background-color: #f5f5f5;
}

/* Form Styles */
form {
    padding: 24px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 500;
    color: #202124;
}

.form-group input[type="text"],
.form-group input[type="date"],
.form-group input[type="time"],
.form-group input[type="number"],
.form-group select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #dadce0;
    border-radius: 4px;
    font-size: 14px;
    font-family: inherit;
    transition: border-color 0.2s;
    box-sizing: border-box;
}

/* Color Palette */
.hsv-picker {
    margin-top: 8px;
}

.hsv-controls {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.hsv-sliders {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 10px;
    justify-content: center;
}

.hsv-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.hsv-label {
    width: 12px;
    font-size: 13px;
    font-weight: 500;
    color: #5f6368;
}

.hsv-slider {
    flex: 1;
    height: 6px;
    cursor: pointer;
    border-radius: 3px;
    -webkit-appearance: none;
    appearance: none;
    outline: none;
    background: #e0e0e0;
    border: none;
    padding: 0;
}

.hsv-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: white;
    border: 2px solid #1a73e8;
    cursor: pointer;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.hsv-slider::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: white;
    border: 2px solid #1a73e8;
    cursor: pointer;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
    border-box: unset;
}

.hsv-slider::-moz-range-track {
    height: 6px;
    border-radius: 3px;
    background: inherit;
}

.hsv-preview {
    width: 100%;
    height: 24px;
    border-radius: 6px;
    border: 2px solid #dadce0;
}


.form-group input[type="text"]:focus,
.form-group input[type="date"]:focus,
.form-group input[type="time"]:focus,
.form-group input[type="number"]:focus,
.form-group select:focus {
    outline: none;
    border-color: #1a73e8;
    box-shadow: 0 0 0 2px rgba(26, 115, 232, 0.1);
}

.form-group small {
    display: block;
    margin-top: 4px;
    font-size: 12px;
    color: #5f6368;
}

.remaining-distance {
    font-weight: 400;
    color: #5f6368;
    font-size: 12px;
    margin-left: 8px;
}

/* Only show pseudo-elements when span has content */
.remaining-distance:not(:empty)::before {
    content: " (";
}

.remaining-distance:not(:empty)::after {
    content: " remaining)";
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid #e0e0e0;
}

.btn-cancel,
.btn-submit {
    padding: 10px 24px;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-cancel {
    background-color: #f5f5f5;
    color: #202124;
}

.btn-cancel:hover {
    background-color: #e8e8e8;
}

.btn-submit {
    background-color: #1a73e8;
    color: white;
}

.btn-submit:hover {
    background-color: #1557b0;
}

.btn-submit:active,
.btn-cancel:active {
    transform: scale(0.98);
}

.btn-delete {
    background-color: #f44336;
    color: white;
}

.btn-delete:hover {
    background-color: #d32f2f;
}

.btn-delete:active {
    transform: scale(0.98);
}

/* Context Menu */
.event-context-menu,
.activity-context-menu,
.common-activity-context-menu {
    background-color: white;
    border-radius: 4px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    padding: 4px 0;
    min-width: 120px;
    z-index: 1001;
}

.context-menu-item {
    width: 100%;
    padding: 10px 16px;
    border: none;
    background: none;
    text-align: left;
    font-size: 14px;
    color: #202124;
    cursor: pointer;
    transition: background-color 0.2s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.context-menu-item:hover {
    background-color: #f5f5f5;
}

.context-menu-item:first-child {
    border-top-left-radius: 4px;
    border-top-right-radius: 4px;
}

.context-menu-item:last-child {
    border-bottom-left-radius: 4px;
    border-bottom-right-radius: 4px;
}

/* Delete Confirmation */
.delete-confirmation {
    padding: 24px;
}

.delete-confirmation p {
    margin-bottom: 12px;
    color: #202124;
    font-size: 14px;
}

.delete-confirmation strong {
    color: #1a73e8;
}

.warning-text {
    color: #f44336;
    font-size: 12px;
    font-weight: 500;
}

/* Activity Summary */
.activity-summary {
    padding: 20px 24px;
    border-bottom: 1px solid #e0e0e0;
}

.summary-item {
    margin-bottom: 12px;
    color: #202124;
    font-size: 14px;
    line-height: 1.6;
}

.summary-item:last-child {
    margin-bottom: 0;
}

.summary-item strong {
    color: #5f6368;
    font-weight: 500;
    margin-right: 8px;
}

/* Choice Buttons */
.choice-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 24px;
}

.choice-button {
    padding: 16px 24px;
    background-color: #1a73e8;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.choice-button:hover {
    background-color: #1557b0;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.choice-button:active {
    transform: translateY(0);
}

.reorder-buttons {
    display: flex;
    gap: 12px;
    margin-bottom: 15px;
    justify-content: center;
    padding: 0 24px;
}

.reorder-button {
    padding: 16px 24px;
    background-color: #1a73e8;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    min-width: 60px;
}

.reorder-button:hover {
    background-color: #1557b0;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.reorder-button:active {
    transform: translateY(0);
}

/* Report Modal */
.report-modal-content {
    max-width: 100%;
    width: 100%;
    margin: 0;
    border-radius: 0;
    max-height: 100vh;
    height: 100vh;
    display: flex;
    flex-direction: column;
}

.report-content {
    padding: 0;
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.report-table-container {
    overflow-x: auto;
    flex: 1;
    padding: 0;
}

.report-actions {
    padding: 12px 16px;
    border-top: 1px solid #e0e0e0;
    margin: 0;
}

.report-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.report-table th {
    background-color: #f5f5f5;
    padding: 12px 8px;
    text-align: left;
    font-weight: 500;
    color: #202124;
    font-size: 10px;
    border-bottom: 2px solid #e0e0e0;
    border-right: 1px solid #e0e0e0;
    position: sticky;
    top: 0;
    z-index: 10;
}

.report-table th:last-child {
    border-right: none;
}

.report-header {
    cursor: pointer;
    user-select: none;
    transition: background-color 0.2s;
}

.report-header:hover {
    background-color: #e8e8e8;
}

.report-header-popup {
    position: fixed;
    background-color: #202124;
    color: white;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 12px;
    z-index: 1001;
    pointer-events: auto;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    white-space: nowrap;
    transform: translateX(-50%);
    cursor: pointer;
}

.report-table td {
    padding: 10px 8px;
    border-bottom: 1px solid #e0e0e0;
    border-right: 1px solid #e0e0e0;
    color: #202124;
    font-size: 0.875rem;
}

.report-table td.report-date-cell {
    white-space: nowrap;
}

.report-table td:last-child {
    border-right: none;
}

.report-table tr:hover {
    opacity: 0.9;
    background-color: rgba(26, 115, 232, 0.05);
}

.report-table tbody tr {
    cursor: pointer;
}

.report-table tr:last-child td {
    border-bottom: none;
}

/* Blue border for block containing today */
.report-row.block-contains-today {
    outline: 3px solid #1a73e8;
}

/* Bold styling for current blocks (visible in calendar view) */
.report-row.block-group-current {
    font-weight: bold;
}

/* Hide block number and match page background for previous/next blocks */
.report-row td.block-number-hidden {
    background-color: #f5f5f5 !important;
    color: transparent;
    user-select: none;
}

/* Report table row colors - matching calendar block colors */
.report-row.block-training-odd {
    background-color: #c8e6c9;
    /* Light green for odd-numbered training blocks */
}

.report-row.block-training-even {
    background-color: #81c784;
    /* Dark green for even-numbered training blocks */
}

.report-row.block-rest-even {
    background-color: #fafafa;
    /* Very light white for even rest blocks */
}

.report-row.block-rest-odd {
    background-color: #f5f5f5;
    /* Slightly darker white for odd rest blocks */
}

.report-row.block-tapering-even {
    background-color: #f5f5f5;
    /* Light grey for even tapering blocks */
}

.report-row.block-tapering-odd {
    background-color: #e0e0e0;
    /* Darker grey for odd tapering blocks */
}

.report-row.block-sick-even {
    background-color: #ffebee;
    /* Light red/pink for even sick blocks */
}

.report-row.block-sick-odd {
    background-color: #ffcdd2;
    /* Darker red/pink for odd sick blocks */
}

/* Fallback colors */
.report-row.block-even {
    background-color: #e8e8e8;
}

.report-row.block-odd {
    background-color: #d0d0d0;
}

.btn-edit-block {
    padding: 6px 12px;
    background-color: #1a73e8;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-edit-block:hover {
    background-color: #1557b0;
}

.btn-edit-block:active {
    transform: scale(0.98);
}

@media (max-width: 768px) {
    .report-modal-content {
        max-width: 100%;
        width: 100%;
        margin: 0;
        border-radius: 0;
    }

    .report-table {
        font-size: 10px;
    }

    .report-table th,
    .report-table td {
        padding: 6px 3px;
    }

    .report-table th {
        font-size: 7px;
    }

    .btn-edit-block {
        padding: 4px 8px;
        font-size: 10px;
    }


    .report-header-popup {
        font-size: 11px;
        padding: 6px 10px;
    }
}

/* Common Activities Drawer */
.common-activities-drawer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    height: 40vh;
    background-color: white;
    box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.15);
    z-index: 997;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform: translateY(100%);
    transition: transform 0.3s ease-out;
}

.common-activities-drawer.open {
    transform: translateY(0);
}

/* Tab that appears above the drawer when open */
.drawer-close-tab {
    position: fixed;
    bottom: 40vh;
    left: 50%;
    transform: translateX(-50%);
    background-color: #f5f5f5;
    border: 1px solid #e0e0e0;
    border-bottom: none;
    border-radius: 8px 8px 0 0;
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 998;
    color: #5f6368;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease-out;
}

.drawer-close-tab.visible {
    opacity: 1;
    pointer-events: auto;
}

.drawer-close-tab:hover {
    background-color: #e8e8e8;
    color: #202124;
}

/* Common Activities Toggle Button */
.common-activities-toggle-btn {
    position: fixed;
    bottom: 24px;
    left: 24px;
    padding: 12px 20px;
    background-color: #1a73e8;
    color: white;
    border: none;
    border-radius: 24px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    z-index: 998;
    transition: all 0.2s;
}

/* Report Section */
.report-section {
    position: relative;
    background-color: white;
    border-top: 1px solid #e0e0e0;
    max-height: 40vh;
    overflow-y: auto;
    z-index: 100;
    box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.1);
    margin-bottom: 80px;
    /* Space for FAB and Common Activities button at bottom */
}

.common-activities-toggle-btn:hover {
    background-color: #1557b0;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
}

.common-activities-toggle-btn:active {
    transform: translateY(0);
}

.common-activities-toggle-btn.hidden {
    display: none;
}

.common-activities-header {
    padding: 12px 20px;
    border-bottom: 1px solid #e0e0e0;
    background-color: #f5f5f5;
    flex-shrink: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.common-activities-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 500;
    color: #202124;
}

.drawer-progress-wrapper {
    flex: 1;
    min-width: 0;
}

.drawer-block-item {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.drawer-block-label {
    font-size: 12px;
    font-weight: 500;
    color: #5f6368;
}

.drawer-block-cycle-btn {
    background: none;
    border: none;
    padding: 0;
    font-size: 12px;
    font-weight: 500;
    color: #1a73e8;
    cursor: pointer;
    text-align: left;
    line-height: 1.2;
}

.drawer-block-cycle-btn:hover {
    text-decoration: underline;
}

.drawer-aerobic-bar {
    height: 22px;
}

.drawer-no-target-text {
    font-size: 12px;
    color: #999;
}

.edit-common-activities-btn {
    padding: 6px 12px;
    background-color: #1a73e8;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s;
}

.edit-common-activities-btn:hover {
    background-color: #1557b0;
}

.edit-common-activities-btn:active {
    background-color: #0f4a8c;
}

.priority-activities-section {
    flex-shrink: 0;
}

.priority-section-inner {
    border-bottom: 1px solid #e0e0e0;
    background-color: #fafafa;
    padding: 4px 12px 8px;
}

.priority-section-label {
    display: block;
    font-size: 10px;
    font-weight: 600;
    color: #5f6368;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    padding: 4px 0 4px;
}

.priority-activities-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.common-activities-list {
    overflow-y: auto;
    padding: 12px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    flex: 1;
    min-height: 0;
}

.common-activity-item {
    padding: 8px 12px;
    background-color: rgba(255, 255, 255, 0.9);
    border-left: 3px solid;
    border-radius: 4px;
    cursor: grab;
    transition: background-color 0.2s;
    user-select: none;
    -webkit-user-select: none;
    max-height: 60px;
    overflow: hidden;
    display: flex;
    align-items: center;
}

.common-activity-item:hover {
    background-color: rgba(26, 115, 232, 0.1);
}

.common-activity-item.dragging {
    opacity: 0.5;
    cursor: grabbing;
    position: relative;
    z-index: 1000;
}

/* Only disable pointer events on touch devices during drag */
@media (hover: none) and (pointer: coarse) {
    .common-activity-item.dragging {
        pointer-events: none;
        /* Allow clicks to pass through while dragging on touch devices */
    }
}

.common-activity-item:active {
    cursor: grabbing;
}

.common-activity-item.edit-mode {
    background-image: repeating-linear-gradient(
        45deg,
        rgba(255, 235, 59, 0.2),
        rgba(255, 235, 59, 0.2) 10px,
        rgba(0, 0, 0, 0.2) 10px,
        rgba(0, 0, 0, 0.2) 20px
    );
}

.common-activity-item.selected .common-activity-name {
    font-weight: 700;
}

.common-activity-name {
    font-weight: 500;
    color: #202124;
    font-size: 12px;
    transition: font-weight 0.2s;
}

.no-common-activities {
    padding: 16px;
    text-align: center;
    color: #5f6368;
    font-size: 12px;
    font-style: italic;
}

/* Responsive adjustments for modal */
@media (max-width: 480px) {
    .modal-content {
        width: 95%;
        margin: 20px;
    }

    .report-modal-content.modal-content {
        width: 100%;
        margin: 0;
    }

    .modal-header,
    form {
        padding: 16px;
    }

    .fab {
        bottom: 16px;
        right: 16px;
        width: 48px;
        height: 48px;
    }

    .fab svg {
        width: 20px;
        height: 20px;
    }

    .common-activities-drawer {
        height: 40vh;
    }

    .priority-section-inner {
        padding: 4px 8px 6px;
    }

    .priority-activities-grid {
        gap: 6px;
    }

    .common-activities-list {
        grid-template-columns: repeat(3, 1fr);
        gap: 6px;
        padding: 8px;
    }

    .common-activities-toggle-btn {
        bottom: 16px;
        left: 16px;
        padding: 10px 16px;
        font-size: 12px;
    }

    .common-activities-header {
        padding: 10px 12px;
    }

    .common-activities-header h3 {
        font-size: 12px;
    }

    .common-activity-name {
        font-size: 11px;
    }
}

/* Move Calendar Modal */
.move-instructions {
    padding: 16px 24px;
    text-align: center;
}

.move-instructions p {
    margin: 0;
    color: #5f6368;
    font-size: 14px;
}

.move-calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 8px;
    padding: 16px 24px;
    max-height: 400px;
    overflow-y: auto;
}

.move-calendar-day {
    padding: 12px 8px;
    background-color: #f5f5f5;
    border: 2px solid #e0e0e0;
    border-radius: 4px;
    text-align: center;
    transition: all 0.2s;
    min-height: 60px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.move-calendar-day:hover {
    background-color: #e8f0fe;
    border-color: #1a73e8;
    transform: scale(1.05);
}

.move-calendar-day.current-date {
    background-color: #e8f0fe;
    border-color: #1a73e8;
    font-weight: 600;
}

.move-day-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.move-day-number {
    font-size: 18px;
    font-weight: 500;
    color: #202124;
}

.move-day-name {
    font-size: 10px;
    color: #5f6368;
    text-transform: uppercase;
}

@media (max-width: 480px) {
    .move-calendar-grid {
        gap: 4px;
        padding: 12px 16px;
    }

    .move-calendar-day {
        padding: 8px 4px;
        min-height: 50px;
    }

    .move-day-number {
        font-size: 16px;
    }

    .move-day-name {
        font-size: 9px;
    }
}

/* Tick Animation */
.tick-animation-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease-out;
}

.tick-animation-overlay.show {
    opacity: 1;
}

.tick-animation {
    width: 200px;
    height: 200px;
    color: #34a853;
    animation: tickScale 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.tick-animation svg {
    width: 100%;
    height: 100%;
}

@keyframes tickScale {
    0% {
        transform: scale(0);
        opacity: 0;
    }

    50% {
        transform: scale(1.2);
        opacity: 1;
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

@media (max-width: 768px) {
    .tick-animation {
        width: 150px;
        height: 150px;
    }
}

/* Login Page Styles */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background-color: #f5f5f5;
    padding: 20px;
}

.login-box {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    padding: 40px;
    width: 100%;
    max-width: 400px;
}

.login-box h1 {
    text-align: center;
    font-size: 32px;
    margin-bottom: 8px;
    color: #333;
}

.login-subtitle {
    text-align: center;
    color: #666;
    margin-bottom: 32px;
    font-size: 14px;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-size: 14px;
    font-weight: 500;
    color: #333;
}

.form-group input {
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
    transition: border-color 0.2s;
}

.form-group input:focus {
    outline: none;
    border-color: #4285f4;
}

.btn-primary {
    background-color: #4285f4;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s;
}

.btn-primary:hover {
    background-color: #357ae8;
}

.btn-primary:active {
    background-color: #2a6cd6;
}

.form-footer {
    margin-top: 24px;
    text-align: center;
    font-size: 14px;
    color: #666;
}

.form-footer a {
    color: #1a73e8;
    text-decoration: none;
}

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

.form-help {
    display: block;
    margin-top: 4px;
    font-size: 12px;
    color: #666;
}

.form-error {
    display: block;
    margin-top: 4px;
    font-size: 12px;
    color: #d32f2f;
}

.invite-code-display {
    background-color: #e8f0fe;
    border: 1px solid #1a73e8;
    border-radius: 4px;
    padding: 12px;
    margin-bottom: 20px;
    text-align: center;
}

.invite-code-display p {
    margin: 0;
    color: #1a73e8;
    font-size: 14px;
}

.invite-code-display strong {
    font-size: 16px;
    letter-spacing: 2px;
}

@media (max-width: 768px) {
    .login-box {
        padding: 32px 24px;
    }

    .login-box h1 {
        font-size: 28px;
    }
}

/* Settings Page Styles */
.settings-container {
    background: white;
    min-height: 100vh;
    width: 100%;
}

.settings-header {
    background: #fff;
    padding: 16px;
    border-bottom: 1px solid #e0e0e0;
    position: sticky;
    top: 0;
    z-index: 10;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    display: flex;
    justify-content: flex-end;
    align-items: center;
}

.settings-nav {
    display: flex;
    gap: 12px;
    align-items: center;
}

.btn-secondary {
    background-color: #f5f5f5;
    color: #202124;
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    transition: background-color 0.2s;
    border: none;
    cursor: pointer;
    display: inline-block;
}

.btn-secondary:hover {
    background-color: #e8e8e8;
    text-decoration: none;
    color: #202124;
}

.settings-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 32px 20px;
}

.settings-section {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 24px;
    margin-bottom: 24px;
}

.settings-section h2 {
    font-size: 20px;
    font-weight: 500;
    color: #202124;
    margin: 0 0 8px 0;
}

.settings-description {
    font-size: 14px;
    color: #5f6368;
    margin: 0 0 20px 0;
}

.settings-form {
    margin-top: 20px;
}

.settings-form .form-group {
    margin-bottom: 20px;
}

.settings-form .form-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 500;
    color: #202124;
}

.settings-form .form-control {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #dadce0;
    border-radius: 4px;
    font-size: 14px;
    font-family: inherit;
    transition: border-color 0.2s;
    box-sizing: border-box;
}

.settings-form .form-control[type="password"] {
    font-family: monospace;
}

.settings-form .form-control:focus {
    outline: none;
    border-color: #1a73e8;
    box-shadow: 0 0 0 2px rgba(26, 115, 232, 0.1);
}

.account-info {
    margin-top: 16px;
}

.account-info p {
    margin: 8px 0;
    font-size: 14px;
    color: #202124;
}

.account-info strong {
    font-weight: 500;
    color: #5f6368;
    margin-right: 8px;
}

@media (max-width: 768px) {
    .settings-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .settings-nav {
        width: 100%;
        justify-content: space-between;
    }

    .settings-content {
        padding: 20px 16px;
    }

    .settings-section {
        padding: 20px 16px;
    }
}

/* Others Page Styles */
.others-container {
    background: white;
    min-height: 100vh;
    width: 100%;
}

.others-header {
    background: #fff;
    padding: 16px;
    border-bottom: 1px solid #e0e0e0;
    position: sticky;
    top: 0;
    z-index: 10;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.others-header h1 {
    font-size: 24px;
    font-weight: 500;
    color: #202124;
    margin: 0;
}

.others-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 32px 20px;
}

.followers-count-section {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 24px;
    text-align: center;
}

.followers-count-section p {
    margin: 0;
    font-size: 16px;
    color: #202124;
}

.followers-link {
    text-decoration: none;
    color: inherit;
    transition: opacity 0.2s;
}

.followers-link:hover {
    opacity: 0.7;
    text-decoration: underline;
}

.followers-section {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 24px;
}

.followers-section h2 {
    font-size: 20px;
    font-weight: 500;
    color: #202124;
    margin: 0 0 20px 0;
}

.followers-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.follower-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #f0f0f0;
}

.follower-item:last-child {
    border-bottom: none;
}

.follower-info {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
}

.follower-name {
    font-weight: 500;
    color: #202124;
    font-size: 14px;
}

.follower-email {
    color: #5f6368;
    font-size: 13px;
}

.block-form {
    margin: 0;
}

.block-checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    user-select: none;
}

.block-checkbox {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #ea4335;
}

.block-checkbox-text {
    font-size: 14px;
    color: #5f6368;
    font-weight: 400;
}

.following-section {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 24px;
}

.following-section h2 {
    font-size: 20px;
    font-weight: 500;
    color: #202124;
    margin: 0 0 20px 0;
}

.following-list {
    list-style: none;
    padding: 0;
    margin: 0 0 24px 0;
}

.following-item {
    padding: 12px 0;
    border-bottom: 1px solid #f0f0f0;
}

.following-item:last-child {
    border-bottom: none;
}

.following-link {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: inherit;
    transition: background-color 0.2s;
    padding: 4px 8px;
    margin: -4px -8px;
    border-radius: 4px;
}

.following-link:hover {
    background-color: #f5f5f5;
    text-decoration: none;
    color: inherit;
}

.following-item:last-child {
    border-bottom: none;
}

.following-name {
    font-weight: 500;
    color: #202124;
    font-size: 14px;
}

.following-email {
    color: #5f6368;
    font-size: 13px;
}

.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: #5f6368;
}

.empty-state p {
    margin: 8px 0;
    font-size: 14px;
}

.follow-button-container {
    text-align: center;
    margin-top: 24px;
}

@media (max-width: 768px) {
    .others-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .others-content {
        padding: 20px 16px;
    }

    .following-section {
        padding: 20px 16px;
    }

    .followers-section {
        padding: 20px 16px;
    }

    .follower-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .block-form {
        width: 100%;
    }
}

/* Strava type checkboxes in edit common activity modal */
.strava-type-checkboxes {
    display: flex;
    flex-direction: column;
    gap: 6px;
    max-height: 180px;
    overflow-y: auto;
    padding: 4px 0;
}

.strava-type-checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    cursor: pointer;
}

/* Strava import defaults on settings page */
.strava-defaults-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 8px;
}

.strava-default-row {
    display: flex;
    align-items: center;
    gap: 16px;
}

.strava-default-type-name {
    min-width: 120px;
    font-weight: 500;
}

.strava-default-select {
    flex: 1;
    max-width: 300px;
    padding: 6px 8px;
    border: 1px solid #dadce0;
    border-radius: 4px;
    font-size: 14px;
    font-family: inherit;
}

/* Strava link in edit activity modal */
.modal-header-left {
    display: flex;
    align-items: center;
    gap: 8px;
}

.strava-view-link {
    display: flex;
    align-items: center;
    text-decoration: none;
    opacity: 0.9;
    transition: opacity 0.15s;
}

.strava-view-link:hover {
    opacity: 1;
}

.strava-link-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 12px;
    background: #f0f7ff;
    border: 1px solid #c8e0ff;
    border-radius: 6px;
    margin-bottom: 20px;
}

.strava-link-label {
    font-size: 13px;
    color: #555;
    white-space: nowrap;
}

.strava-link-actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

.strava-link-btn {
    text-decoration: none;
    font-size: 13px;
    padding: 5px 10px;
}

/* Strava import modal — wider than the default 500px cap */
#stravaImportModal .modal-content {
    width: 92vw;
    max-width: 800px;
    max-height: 85vh;
}

/* Strava import cards */
.strava-cards {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.strava-card {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    background: #fafafa;
}

.strava-card-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 12px;
}

.strava-card-metrics {
    color: #555;
    font-size: 13px;
    white-space: nowrap;
}

.strava-card-title {
    font-weight: 600;
    font-size: 15px;
}

.strava-activity-link {
    color: inherit;
    text-decoration: underline;
    text-decoration-color: #aaa;
    text-underline-offset: 2px;
}

.strava-activity-link:hover {
    text-decoration-color: currentColor;
}

.strava-card-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

.strava-card-actions .strava-option-select {
    flex: 1;
    min-width: 0;
    padding: 7px 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 16px;
    font-family: inherit;
}

.strava-day {
    font-weight: 600;
}

.strava-time {
    color: #888;
    font-size: 12px;
}

.strava-import-all-row {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    margin-top: 16px;
}

/* Strava type mapping step */
.strava-map-step {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.strava-map-counter {
    font-size: 13px;
    color: #888;
    margin: 0;
}

.strava-map-type-name {
    font-size: 20px;
    font-weight: 600;
    margin: 0;
}

.strava-map-options {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 260px;
    overflow-y: auto;
    padding: 4px 0;
}

.strava-map-option {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 15px;
    cursor: pointer;
}

.strava-map-option input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
}

.strava-map-actions {
    display: flex;
    gap: 12px;
    margin-top: 4px;
}
