body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    background-color: #fff;
    margin: 0;
}

.material-button {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #44bd32;
    border: none;
    color: white;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.2s ease-in-out;
    cursor: pointer;
}

.material-button.stop {
    background-color: #e84118;
}

.material-button.pseudo-disabled {
    filter: grayscale(100%);
    opacity: 0.6;
    cursor: not-allowed;
}

#toggleBtn:not(.pseudo-disabled):hover {
    opacity: 0.9;
}

.stop-btn {
    background: linear-gradient(135deg, #e84118, #c23616);
    margin-left: 8px;
}

.stop-btn:hover {
    opacity: 0.9;
}

#timerDisplay {
    font-size: 16px;
    font-variant-numeric: tabular-nums;
    font-weight: 400;
    width: 8ch;
    color: #37352f;
    /* font-weight: 500; */
    text-align: right;
    white-space: nowrap;
    transition: all 0.3s ease-in-out;
}

#sessionNameInput {
    font-size: 16px;
    font-weight: 400;
    color: #37352fa5;
    padding: 4px 8px;
    border: none;
    border-radius: 4px;
    background-color: #fff;
    transition: all 0.3s ease-in-out;
    width: 175px;
    padding: 8px 12px;
    margin-left: 16px;
}

#sessionNameInput:focus {
    outline: none;
    border-color: #37352f;
}

#totalDisplay {
    font-size: 16px;
    font-weight: 400;
    color: #888;
    text-align: right;
}

#loadingOverlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
}

/* Spinner style */
.spinner {
    width: 32px;
    height: 32px;
    border: 4px solid #ccc;
    border-top-color: #2f3640;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

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

    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Toggle Button style section START */
#toggleBtn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    color: white;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s ease-in-out, transform 0.2s;
    background: linear-gradient(135deg, #44bd32, #4cd137);
    /* green gradient */
}

#toggleBtn.stop {
    background: linear-gradient(135deg, #e84118, #c23616);
    /* red gradient */
    font-size: 1.2rem;
}

#toggleBtn.play {
    background-color: #44bd32;
    font-size: 1.2rem;
}

#toggleBtn.resume {
    background-color: #44bd32;
    /* background: linear-gradient(135deg, #f39c12, #e67e22); !* yellow/orange gradient for paused state *!*/
}

@keyframes scaleBounce {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.2);
    }

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

#toggleBtn:disabled {
    background: #ccc;
    color: #888;
    cursor: not-allowed;
    filter: grayscale(100%) brightness(0.8);
}

.material-icons.scale {
    animation: scaleBounce 0.2s ease-in-out;
}

#toggleBtnWrapper {
    position: relative;
    display: inline-block;
}

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

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


/* Dynamic Tooltip System */
.tooltip {
    opacity: 0;
    visibility: hidden;
    position: fixed;
    background-color: #444;
    color: #fff;
    padding: 6px 10px;
    font-size: 12px;
    border-radius: 6px;
    white-space: nowrap;
    z-index: 1000;
    pointer-events: none;
    transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease;
    transform: scale(0.95);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.tooltip.visible {
    opacity: 1;
    visibility: visible;
    transform: scale(1);
}

/* Position-specific animations */
.tooltip-right {
    animation: slideInRight 0.3s ease forwards;
}

.tooltip-left {
    animation: slideInLeft 0.3s ease forwards;
}

.tooltip-top {
    animation: slideInTop 0.3s ease forwards;
}

.tooltip-bottom {
    animation: slideInBottom 0.3s ease forwards;
}

/* Animation keyframes */
@keyframes slideInRight {
    0% {
        opacity: 0;
        transform: translateX(10px) scale(0.95);
    }

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

@keyframes slideInLeft {
    0% {
        opacity: 0;
        transform: translateX(-10px) scale(0.95);
    }

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

@keyframes slideInTop {
    0% {
        opacity: 0;
        transform: translateY(-10px) scale(0.95);
    }

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

@keyframes slideInBottom {
    0% {
        opacity: 0;
        transform: translateY(10px) scale(0.95);
    }

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

/* Legacy tooltip support (for backward compatibility) */
.tooltip.legacy {
    position: absolute;
    top: 20%;
    left: 120%;
    z-index: 10;
}

.tooltip.legacy.visible {
    animation: slideInRight 0.4s ease forwards;
}

/* Toggle Button style section END */


/* Category drop down START */

#categoryContainer {
    display: flex;
    align-items: center;
    justify-content: center;
    max-width: 175px;
}

/* Wrapper around the select to position custom arrow */
.dropdown-wrapper {
    position: relative;
    width: 140px;
}

.dropdown-wrapper::after {
    content: '▾';
    /* Unicode downward triangle */
    position: absolute;
    top: 50%;
    right: 10px;
    transform: translateY(-50%);
    font-size: 14px;
    color: #37352f;
    pointer-events: none;
}

/* Style the dropdown to remove native arrow and match style */
#category {
    background-color: #f7f6f3;
    border: none;
    font-size: 16px;
    border-radius: 8px;
    width: 100%;
    padding: 8px 12px;
    box-sizing: border-box;
    /*font-weight: 500;*/
    color: #37352f;
    cursor: pointer;
}


#category::after {
    display: none;
}


#categoryText {
    font-size: 16px;
    color: #37352f;
    /*font-weight: 500;*/
    width: 100px;
    text-align: center;
    display: none;
}


/* Category drop down END */

.timer-widget-container {
    background: #ffffff;
    /*border: 1px solid #ddd;*/
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    padding: 1rem 1.25rem;
    max-width: 450px;
    width: 100%;
    margin: auto;
    transition: all 0.3s ease-in-out;
    color: #2f3640;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}


#toggleBtnWrapper,
#timerDisplay,
#categoryContainer {
    display: flex;
    align-items: center;
}

/* LOADING START */

#toggleBtn.loading {
    pointer-events: none;
    opacity: 0.7;
    position: relative;
}

#toggleBtn.loading .material-icons {
    visibility: hidden;
}

#toggleBtn.loading::after {
    content: "";
    position: absolute;
    width: 16px;
    height: 16px;
    border: 2px solid white;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* LOADING END */


/* SUMMARY */

.summary-widget {
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    border: 1px solid #e3e2e0;
    max-width: 490px;
    /* Increased from 450px to 490px (450px + 40px padding) */
    width: 100%;
    margin: 8px auto;
    color: #37352f;
    max-height: calc(100vh - 130px);
    /* Account for timer widget (~90px), margins (~40px), and 50px bottom margin */

    display: flex;
    flex-direction: column;

    /* Hide by default to match folded state */
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease 0.1s;
}

/* Fold Button Styles */
.fold-button {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    cursor: pointer;
    background: none;
    border: none;
    margin-bottom: 2px;
    max-width: 500px;
    width: 100%;
    margin-left: auto;
    margin-right: auto;
}

.fold-button:hover {
    opacity: 0.8;
}

.fold-button-text {
    font-size: 1rem;
    color: #666;
    display: flex;
    align-items: center;
}

.fold-button-icon {
    width: 18px;
    height: 18px;
    transition: transform 0.2s ease-in-out;
    object-fit: contain;
}

.fold-button-icon.folded {
    transform: none;
}

@keyframes scaleBounce {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.2);
    }

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

.fold-button-icon.bounce {
    animation: scaleBounce 0.3s ease-in-out;
}

/* Foldable Content Styles */
.foldable-content {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, opacity 0.3s ease;
    padding: 8px 4px;
}

.foldable-content.expanded {
    min-height: 400px;
    max-height: calc(100vh - 100px);
    opacity: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    /* Parent doesn't scroll */
}

/* Fixed Header (Tabs + Date Selector) */
.summary-header {
    flex: 0 0 auto;
    /* Don't grow or shrink */
    background: #ffffff;
    position: relative;
}

/* Settings Button */
.settings-button {
    position: absolute;
    top: 2px;
    right: 2px;
    background: none;
    border: none;
    cursor: pointer;
    color: #9d9d9d;
    transition: color 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.settings-button:hover {
    color: #37352f;
}

.settings-button .material-icons {
    font-size: 20px;
}

/* Scrollable Content Area */
.summary-scrollable-content {
    flex: 1 1 auto;
    /* Grow to fill available space */
    overflow-y: auto;
    overflow-x: hidden;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scrollbar-gutter: stable;
    /* Prevent content shift */
    /* padding: 8px 4px; */
}


/* Custom scrollbar styling for better appearance */
.foldable-content.expanded::-webkit-scrollbar {
    width: 8px;
}

.foldable-content.expanded::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.foldable-content.expanded::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

.foldable-content.expanded::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* Only show summary content when expanded */
.foldable-content.expanded .summary-content {
    display: block;
    /* Show content when expanded */
}

.summary-widget h3 {
    text-align: center;
    margin-top: 0;
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    align-content: center;
}

#summaryList {
    display: flex;
    flex-direction: column;
    width: 100%;
    /* Ensure full width */
    max-width: 100%;
    /* Prevent overflow */
    min-height: 0;
    /* Allow flex item to shrink below content size */
    flex-shrink: 1;
    /* Allow shrinking if needed */
}

.summary-item {
    border: 1px solid #e3e2e0;
    border-radius: 8px;
    margin-bottom: 2px;
    background: #ffffff;
    transition: all 0.2s ease;
    width: 100%;
    /* Ensure full width */
    max-width: 100%;
    /* Prevent overflow */
    box-sizing: border-box;
    /* Include padding and border in width calculation */
}

.summary-item:hover {
    border-color: #d1d1d1;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.summary-item.expanded {
    /*border-color: #37352f;*/
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.summary-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 8px;
    cursor: pointer;
    user-select: none;
    transition: background-color 0.2s ease;
}

.summary-item-header:hover {
    background-color: #f8f9fa;
}

.summary-item-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex: 1;
    font-size: 0.8rem;
    color: #2f3640;
    min-width: 0;
    /* Allow flex items to shrink below content size */
    overflow: hidden;
    /* Prevent content overflow */
}

.summary-time {
    font-weight: 600;
    color: #37352f;
}

.summary-time-container {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
}

.summary-time-primary {
    font-weight: 600;
    color: #37352f;
    font-size: 14px;
}

.summary-time-secondary {
    font-weight: 400;
    color: #666;
    font-size: 12px;
}

.summary-item-toggle {
    margin-left: 12px;
    color: #666;
    transition: transform 0.2s ease;
}

.summary-item.expanded .summary-item-toggle {
    transform: rotate(180deg);
}

.toggle-icon {
    font-size: 20px;
}

.summary-item-details {
    border-top: 1px solid #e3e2e0;
}

.summary-item-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 20px;
    color: #666;
    font-size: 0.85rem;
}

.summary-no-entries {
    text-align: center;
    padding: 20px;
    color: #888;
    font-size: 0.85rem;
    font-style: italic;
}

.summary-error {
    text-align: center;
    padding: 20px;
    color: #e74c3c;
    font-size: 0.85rem;
}

.summary-entry-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 6px;
    border-bottom: 1px solid #e8e7e5;
}

.summary-entry-item:hover {
    border-color: #d1d1d1;
}

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

/* Load More button styles */
.load-more-btn {
    width: 100%;
    padding: 4px;
    margin: 4px;
    background-color: transparent;
    border: none;
    border-radius: 6px;
    color: #666;
    font-size: 12px;
    font-weight: 550;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: all 0.2s ease;
    flex-shrink: 0;
    box-sizing: border-box;
    position: relative;
    z-index: 1;
    text-decoration: none;
    text-transform: uppercase;
}

.load-more-btn:hover {
    background-color: #f7f6f3;
    color: #37352f;
}

.load-more-btn:active {
    background-color: #ebeae8;
    transform: none;
}

.load-more-btn .material-icons {
    font-size: 14px;
    transition: transform 0.2s ease;
}

.load-more-btn:hover .material-icons {
    transform: translateY(2px);
}

.load-more-spinner {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 12px;
    margin: 8px 0;
}

.load-more-spinner .loading-spinner {
    width: 20px;
    height: 20px;
    border-width: 2px;
}


.entry-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
}


.entry-name {
    font-weight: 500;
    flex: 1;
    min-width: 0;
    color: #37352f;
    font-size: 0.8rem;
    flex: 1;
}



/* EXPORT DROPDOWN */

/* Export Dropdown */
.export-dropdown {
    position: relative;
    display: inline-block;
}


.export-menu-btn {
    background: transparent;
    border: none;
    padding: 0px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 2px;
    color: #666;
}

.export-menu-btn:hover {
    background-color: #f0f0f0;
    color: #37352f;
}

.export-menu-btn .material-icons {
    font-size: 20px;
}

.export-menu-btn .dropdown-arrow {
    font-size: 18px;
    transition: transform 0.2s ease;
}

.export-menu-btn.active .dropdown-arrow {
    transform: rotate(180deg);
}

/* Export Menu Dropdown */
.export-menu {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    background: white;
    border: 1px solid #e3e2e0;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    min-width: 160px;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s ease;
    overflow: hidden;
}

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

.export-menu-header {
    padding: 8px 12px;
    font-size: 0.75rem;
    font-weight: 600;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid #e3e2e0;
    background-color: #f7f6f3;
}

.export-option {
    width: 100%;
    background: none;
    border: none;
    padding: 10px 12px;
    text-align: left;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem;
    color: #37352f;
    transition: background-color 0.2s ease;
}

.export-option:hover {
    background-color: #f7f6f3;
}

.export-option:active {
    background-color: #ebeae8;
}

.export-option .material-icons {
    font-size: 18px;
    color: #666;
}

.export-option-text {
    flex: 1;
}


/* Grouping Options - Icon Buttons */
.grouping-options {
    margin-bottom: 0;
    text-align: center;
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
}

.grouping-icon-buttons {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.grouping-icon-btn {
    background: #ffffff;
    border: 1px solid #e3e2e0;
    border-radius: 6px;
    padding: 2px;
    font-size: 0.75rem;
    color: #666;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    min-width: 22px;
    min-height: 22px;
}

.grouping-icon-btn .material-icons {
    font-size: 18px;
}

.grouping-icon-btn:hover {
    background: #f0f0f0;
    border-color: #d1d1d1;
    color: #37352f;
}

.grouping-icon-btn.active {
    background: #37352f;
    color: #ffffff;
    border-color: #37352f;
}

/* Tooltip on hover */
.grouping-icon-btn::after {
    content: attr(title);
    position: absolute;
    bottom: -28px;
    left: 50%;
    transform: translateX(-50%);
    background-color: #37352f;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.7rem;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
    z-index: 1000;
}

.grouping-icon-btn:hover::after {
    opacity: 1;
}



/* ====================================================== 

        <    UNGROUPED ENTRIES  >
 
 ====================================================== */
.ungrouped-entry {
    margin-bottom: 4px;
    padding: 4px 8px;
    font-size: 0.8rem;
}

.ungrouped-entry .summary-item-header {
    padding-bottom: 2px;
}

.ungrouped-entry .summary-item-details {
    padding: 8px 16px 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #666;
}

.ungrouped-summary-item-details {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex: 1;
    border-radius: 0 0 8px 8px;
}

.ungrouped-summary-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    user-select: none;
    transition: background-color 0.2s ease;
}

.ungrouped-summary-item-header:hover {
    background-color: #f8f9fa;
}

/* Unique ungrouped item container */
.ungrouped-item-container {
    padding: 4px;
    border-radius: 8px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    font-size: 0.8rem;
    border-bottom: 1px solid #e3e2e0;
    border-top: 1px solid #e3e2e0;
    border-right: 1px solid #e3e2e0;
    margin-bottom: 2px;
    transition: all 0.3s ease;
    overflow: hidden;
}

/* Enhanced ungrouped header styling */
.ungrouped-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2px 10px;
    user-select: none;
    transition: all 0.2s ease;
}

/*.ungrouped-item-header:hover {*/
/*    background: linear-gradient(135deg, #e8f5e8 0%, #f0f8f0 100%); */
/*}*/

.ungrouped-item-project {
    /*font-weight: 600;*/
    color: #2d3748;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    /*letter-spacing: -0.01em;*/
    user-select: text;
}

/* Enhanced ungrouped content styling */
.ungrouped-item-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex: 1;
    color: #4a5568;
    min-width: 0;
    overflow: hidden;
    gap: 12px;
}

/* Enhanced ungrouped details styling */
.ungrouped-item-details {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex: 1;
    padding: 0px 8px 2px 8px;
    flex-wrap: wrap;
    gap: 8px;
}

.ungrouped-item-timespan {
    display: flex;
    align-items: center;
    /*color: #64748b;*/
    /*font-weight: 500;*/
    line-height: 1.4;
    min-width: 0;
    flex: 1;
}

.ungrouped-item-timespan strong {
    color: #2d3748;
    font-weight: 600;
    margin: 0 2px;
}

.ungrouped-item-timespan .incomplete {
    color: #44bd32;
    font-weight: 700;
    animation: pulse-green 2s infinite;
}

@keyframes pulse-green {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.7;
    }
}

/* Enhanced ungrouped category styling */
.ungrouped-item-category {
    color: #ffffff;
    padding: 4px 10px;
    min-width: fit-content;
    transition: all 0.2s ease;
    margin-left: auto;
    border-radius: 4px;
    padding: 2px 6px;
}

/*.ungrouped-item-category:hover {*/
/*    transform: translateY(-1px);*/
/*    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);*/
/*}*/

/* Enhanced ungrouped duration */
.ungrouped-item-duration {
    font-weight: 700;
    color: #1a202c;
    border-radius: 8px;
    min-width: fit-content;
    text-align: center;
    transition: all 0.2s ease;
}

/*.ungrouped-item-duration:hover {*/
/*    background: linear-gradient(135deg, #edf2f7 0%, #e2e8f0 100%);*/
/*    !*transform: translateY(-1px);*!*/
/*    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);*/
/*}*/

/* Enhanced action buttons for ungrouped items */
.ungrouped-item-actions {
    display: flex;
    gap: 2px;
    align-items: center;
}

/* ====================================================== 

        <  /  UNGROUPED ENTRIES  >
 
 ====================================================== */



.entry-category {
    font-weight: 500;
    color: #888;
    font-size: 0.8rem;
}

/* Animated dots for active timers */
.animated-dots {
    display: inline-flex;
    align-items: center;
    gap: 2px;
}

.time {
    font-weight: 600;
}

.animated-dots .dot {
    width: 4px;
    height: 4px;
    background-color: #44bd32;
    border-radius: 50%;
    animation: dotPulse 1.4s ease-in-out infinite both;
}

.animated-dots .dot:nth-child(1) {
    animation-delay: -0.32s;
}

.animated-dots .dot:nth-child(2) {
    animation-delay: -0.16s;
}

.animated-dots .dot:nth-child(3) {
    animation-delay: 0s;
}

@keyframes dotPulse {

    0%,
    80%,
    100% {
        transform: scale(0.8);
        opacity: 0.5;
    }

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

.entry-details {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
    color: #666;
}


.entry-time-time-bold-text {
    font-weight: 550;
}

.entry-time-time-bold-text.incomplete {
    font-weight: 550;
    color: #44bd32;
}

.entry-duration-container {
    display: flex;
    flex-direction: column;
    width: 80px;
    gap: 2px;
}

.entry-duration {
    font-weight: 500;
    color: #37352f;
}

.entry-duration#activeTimerTask {
    font-weight: 500;
    color: #44bd32;
}

.entry-total-duration {
    font-size: 0.80em;
    font-weight: 450;
    color: #787774;
    opacity: 0.75;
}




/* Date Range with Action Controls Row */
.header-controls-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
    padding: 0 4px;
    min-height: 32px;
}

.current-date-range {
    padding: 2px 12px;
    background-color: #f7f6f3;
    border-radius: 6px;
    border-left: 3px solid #e2e1e1;
    text-align: left;
    text-transform: uppercase;
    flex: 1 1 auto;
    margin-bottom: 0;
    min-width: 0;
}

.current-date-range-text {
    font-size: 0.85rem;
    font-weight: 500;
    color: #666;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Custom Date Picker */
.custom-date-picker {
    margin: 2px;
    padding: 2px;
}

.date-input-group {
    display: flex;
    gap: 15px;
    align-items: flex-end;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 4px;
}

.date-input-wrapper {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.date-input-wrapper label {
    font-size: 0.8rem;
    color: #666;
    font-weight: 500;
}

.date-input {
    padding: 4px 4px;
    border: 1px solid #e3e2e0;
    border-radius: 6px;
    font-size: 0.8rem;
    font-family: inherit;
    background: #ffffff;
    color: #37352f;
}

.date-input:focus {
    outline: none;
    border-color: #37352f;
    box-shadow: 0 0 0 2px rgba(55, 53, 47, 0.1);
}

.apply-date-btn {
    background: #44bd32;
    color: #ffffff;
    border: none;
    border-radius: 6px;
    padding: 8px 8px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
}

.apply-date-btn:hover {
    background: #3aa828;
    transform: translateY(-1px);
}

.apply-date-btn:active {
    transform: translateY(0);
}


/* Inline Custom Date Picker */
.custom-date-picker-inline {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: nowrap;
}

.date-input-inline {
    padding: 4px 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.8rem;
    color: #37352f;
    background: #fff;
    cursor: pointer;
    transition: border-color 0.2s ease;
}

.date-input-inline:hover {
    border-color: #999;
}

.date-input-inline:focus {
    outline: none;
    border-color: #0066cc;
}

.date-separator {
    font-size: 0.75rem;
    color: #999;
    font-weight: 500;
}

.apply-date-btn-inline {
    padding: 4px 12px;
    background: #0066cc;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: background-color 0.2s ease;
    white-space: nowrap;
}

.apply-date-btn-inline:hover {
    background: #0052a3;
}

.apply-date-btn-inline:active {
    background: #004080;
}


.entry-actions {
    display: flex;
}

.entry-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 6px;
    /*background: #f0f0f0;*/
    border: 1px solid #d1d1d1;
    border-radius: 4px;
    color: #666;
    text-decoration: none;
    font-size: 0.8rem;
    transition: all 0.2s ease;
}

.entry-link:hover {
    background: #e0e0e0;
    border-color: #b0b0b0;
    color: #37352f;
}

.entry-link .material-icons {
    font-size: 14px;
}

/* Loading spinner for summary items */
.loading-spinner {
    width: 16px;
    height: 16px;
    border: 2px solid #e3e2e0;
    border-top-color: #37352f;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

/* Tab container */
.summary-tabs {
    display: flex;
    justify-content: center;
    margin-bottom: 2px;
}

/* Date Selector Sub-header */
.date-selector {
    margin-bottom: 2px;
    align-items: center;
    padding: 4px 4px;
    transition: all 0.2s ease;
}

.date-selector-buttons {
    display: flex;
    gap: 2px;
    justify-content: center;
    flex-wrap: wrap;
}

.date-btn {
    background: #ffffff;
    border: 1px hidden #e3e2e0;
    border-radius: 6px;
    padding: 6px 6px;
    font-size: 0.75rem;
    color: #666;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
    min-width: fit-content;
}

.date-btn:hover {
    background: #f0f0f0;
    border-color: #d1d1d1;
    color: #37352f;
}

.date-btn.active {
    background: #37352f;
    color: #ffffff;
    border-color: #37352f;
}

.date-btn .material-icons {
    font-size: 16px;
}

/* Responsive date selector - REMOVED to keep constant size */

/* Content area */
.summary-content {
    display: none;
    /* Hide both content sections initially */
    padding: 0 20px;
}

/* Show text content by default */
#textContent {
    display: block;
}

.foldable-content.expanded .summary-content {
    display: block;
    /* Show content when expanded */
}

/* Hide add category container by default */
.add-category-container {
    display: none;
}

/* Only show add category container when categories tab is active */
#categoriesContent.active .add-category-container {
    display: flex;
    gap: 8px;
    margin-bottom: 6px;
    align-items: center;
    padding: 2px;
    background: #fafafa;
    border-radius: 8px;
    transition: all 0.2s ease;
}

/* Hide date selector when categories tab is active */
.date-selector.hidden {
    display: none;
}

#categoriesContent.active .add-category-container:hover {
    background: #f5f5f5;
    border-color: #d1d1d1;
}


/* Make sure the container is block-level and stacks elements */
.container {
    display: block;
    /* Remove flex on body, ensure it's block-level */
    height: auto;
    /* Allow height to adjust based on content */
    padding-bottom: 0px;
    /* To give space at the bottom */
}

/* Timer and summary widgets should be block-level elements stacked vertically */
.timer-widget-container,
.summary-widget {
    width: 100%;
    /* Full width */
    margin: 0 auto;
    /* Center the widgets horizontally */
}

/* Timer widget styles */
.timer-widget-container {
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    border: 1px solid #e3e2e0;
    padding: 16px 20px;
    max-width: 450px;
    width: 100%;
    margin: 8px auto 2px;
    color: #37352f;
}

/* Summary widget styles - consolidated */

.summary-widget.hidden {
    opacity: 0;
    visibility: hidden;
}

/* Tab container */
.summary-tabs {
    display: flex;
    justify-content: center;
    /*margin-bottom: 20px;*/
    transition: all 0.3s ease;
    /* Smooth transition for folding */
}

.summary-tabs.collapsed {
    display: none;
    /* Hide the tabs when collapsed */
}

.tab-button {
    padding: 8px 16px;
    font-size: 0.75rem;
    font-weight: 500;
    cursor: pointer;
    background-color: transparent;
    border: none;
    border-radius: 6px;
    transition: all 0.2s ease;
    color: #888;
    position: relative;
    /* uppercase */
    text-transform: uppercase;

    /* Ensure consistent dimensions to prevent size changes */
    min-width: fit-content;
    box-sizing: border-box;
}

.tab-button:hover {
    color: #555;
    background-color: #f8f9fa;
}

/* Active tab styling - no size changes */
.tab-button.active {
    color: #37352f;
    background-color: #f0f0f0;
    font-weight: 500;
    /* Keep same weight to prevent size change */
}

/* Chart styles - now handled by custom SVG */

/* Categories tab styles */
#categoriesList {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 2px 0;
}

/* Settings Content */
.settings-container {
    padding: 20px;
}

.settings-container h3 {
    text-align: center;
    margin-top: 0;
    margin-bottom: 20px;
    font-size: 1.1rem;
    font-weight: 600;
    color: #37352f;
}

.settings-placeholder {
    text-align: center;
    padding: 40px 20px;
    color: #666;
    font-size: 0.9rem;
}

/* Setting Item */
.setting-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    background: #ffffff;
    border: 1px solid #e3e2e0;
    border-radius: 8px;
    margin-bottom: 12px;
    transition: all 0.2s ease;
}

.setting-item:hover {
    background: #fafafa;
    border-color: #d1d1d1;
}

.setting-info {
    flex: 1;
}

.setting-label {
    display: block;
    font-size: 0.9rem;
    font-weight: 500;
    color: #37352f;
    margin-bottom: 4px;
    cursor: pointer;
}

.setting-description {
    font-size: 0.75rem;
    color: #666;
    margin: 0;
}

/* Toggle Switch */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
    flex-shrink: 0;
    cursor: pointer;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    border-radius: 24px;
    transition: 0.3s;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 2px;
    bottom: 2px;
    background-color: white;
    border-radius: 50%;
    transition: 0.3s;
}

.toggle-switch input:checked+.toggle-slider {
    background-color: #44bd32;
}

.toggle-switch input:checked+.toggle-slider:before {
    transform: translateX(20px);
}

.toggle-switch:hover .toggle-slider {
    opacity: 0.9;
}

/* Contact Section */
.contact-section {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    background: #ffffff;
    border: 1px solid #e3e2e0;
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.2s ease;
    cursor: pointer;
}

.contact-item:hover {
    background: #fafafa;
    border-color: #d1d1d1;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.contact-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: #f7f6f3;
    border-radius: 50%;
    flex-shrink: 0;
    transition: all 0.2s ease;
}

.contact-item:hover .contact-icon {
    background: #44bd32;
}

.contact-icon .material-icons {
    font-size: 20px;
    color: #666;
    transition: color 0.2s ease;
}

.contact-item:hover .contact-icon .material-icons {
    color: #ffffff;
}

.contact-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.contact-label {
    font-size: 0.9rem;
    font-weight: 500;
    color: #37352f;
}

.contact-description {
    font-size: 0.75rem;
    color: #666;
}


.category-list-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 4px 8px;
    background: #ffffff;
    border: 1px solid #e3e2e0;
    border-radius: 6px;
    font-size: 0.8rem;
    color: #37352f;
    font-weight: 500;
    transition: background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
    position: relative;
    overflow: hidden;
    animation: slideInUp 0.3s ease-out;
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

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

/* Removed ::before pseudo-element for green left border on hover */

.delete-category-btn {
    background: none;
    border: none;
    color: #888;
    cursor: pointer;
    padding: 4px;
    font-size: 20px;
    line-height: 1;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;

    /* Hide by default */
    opacity: 0;
    visibility: hidden;
}

/* Show delete button when hovering over the category item */
.category-list-item:hover .delete-category-btn {
    opacity: 1;
    visibility: visible;
}

/* Make category item more prominent when hovering - using iframe-friendly properties */
.category-list-item:hover {
    background: #fafafa;
    outline: 1px solid rgba(68, 189, 50, 0.4);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}

/* Mobile-friendly: Always show delete button on touch devices */
@media (hover: none) and (pointer: coarse) {
    .delete-category-btn {
        opacity: 1;
        visibility: visible;
    }

    .category-list-item:hover {
        opacity: 1;
        transform: none;
    }
}

.delete-category-btn:hover {
    color: #dc2626;
    transform: scale(1.1);
}

/* Custom Confirmation Dialog */
.confirmation-dialog {
    position: fixed;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.confirmation-dialog.visible {
    opacity: 1;
    visibility: visible;
}

.confirmation-content {
    background-color: #444;
    color: #fff;
    padding: 8px 12px;
    font-size: 12px;
    border-radius: 6px;
    white-space: nowrap;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    transform: scale(0.95);
    transition: transform 0.2s ease;
    min-width: 200px;

    /* Make content display in single line */
    display: flex;
    align-items: center;
    gap: 12px;
}

.confirmation-dialog.visible .confirmation-content {
    transform: scale(1);
}

.confirmation-message {
    font-size: 12px;
    color: #fff;
    text-align: left;
    line-height: 1.3;
    flex: 1;
}

.confirmation-buttons {
    display: flex;
    gap: 6px;
    justify-content: flex-end;
    flex-shrink: 0;
}

.confirmation-btn {
    padding: 4px 8px;
    border: none;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s ease;
    min-width: 40px;
}

.confirmation-btn:hover {
    opacity: 0.8;
}

.confirm-yes {
    background-color: #e74c3c;
    color: white;
}

.confirm-yes:hover {
    background-color: #c0392b;
}

.confirm-no {
    background-color: #95a5a6;
    color: white;
}

.confirm-no:hover {
    background-color: #7f8c8d;
}

/* Categories tab styles */

#newCategoryInput {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid #e3e2e0;
    border-radius: 6px;
    font-size: 13px;
    color: #37352f;
    background-color: #fff;
    transition: all 0.2s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

#newCategoryInput:focus {
    outline: none;
    border-color: #44bd32;
    background-color: #fff;
    box-shadow: 0 0 0 3px rgba(68, 189, 50, 0.1);
    transform: translateY(-1px);
}

#newCategoryInput:disabled {
    background-color: #f0f0f0;
    color: #999;
    cursor: not-allowed;
}

#newCategoryInput::placeholder {
    color: #999;
}

.add-category-btn {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: linear-gradient(135deg, #44bd32, #4cd137);
    border: none;
    color: white;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(68, 189, 50, 0.3);
}

.add-category-btn:hover {
    transform: translateY(-1px) scale(1.03);
    box-shadow: 0 2px 12px rgba(68, 189, 50, 0.35);
}

.add-category-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
}

.add-category-btn:disabled:hover {
    opacity: 1;
    transform: none;
}

/* Success message styles */
.add-category-success {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    font-weight: 500;
    border-left: 4px solid #2ecc71;
}

/* Summary loading and error states */
.div-loading-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    text-align: center;
}

.loading-spinner {
    width: 32px;
    height: 32px;
    border: 3px solid #e3e2e0;
    border-top: 3px solid #37352f;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 16px;
}

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

    100% {
        transform: rotate(360deg);
    }
}

.loading-text {
    color: #666;
    font-size: 0.9rem;
    font-weight: 500;
}

.summary-error-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    text-align: center;
    background: #fff3f3;
    border: 1px solid #ffcdd2;
    border-radius: 8px;
    margin: 20px;
}

.error-icon {
    font-size: 2rem;
    margin-bottom: 12px;
}

.error-text {
    color: #d32f2f;
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 16px;
}

.retry-btn {
    background: #f44336;
    color: #ffffff;
    border: none;
    border-radius: 6px;
    padding: 8px 16px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.retry-btn:hover {
    background: #d32f2f;
    transform: translateY(-1px);
}

.retry-btn:active {
    transform: translateY(0);
}

/* Empty summary state styling */
.empty-summary-container {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 300px;
    text-align: center;
}

.empty-summary-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 300px;
    height: 210px;
    max-width: 100%;
    background: #f9f9f9;
    border-radius: 8px;
    border: 2px dashed #ddd;
    gap: 12px;
    padding: 20px;
}

.empty-summary-main-text {
    font-size: 24px;
    font-weight: 600;
    color: #666;
    text-align: center;
}

.empty-summary-sub-text {
    font-size: 14px;
    color: #999;
    text-align: center;
    font-style: italic;
}

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

.color-picker-modal.visible {
    display: flex;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.color-picker-content {
    background: #ffffff;
    border-radius: 12px;
    padding: 24px;
    min-width: 360px;
    max-width: 450px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
    animation: slideUp 0.3s ease;
}

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

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

.color-picker-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.color-picker-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #37352f;
}

.color-picker-category-name {
    font-size: 0.85rem;
    color: #888;
    margin-top: 2px;
}

.color-picker-close {
    background: none;
    border: none;
    color: #888;
    cursor: pointer;
    font-size: 24px;
    line-height: 1;
    padding: 4px;
    transition: all 0.2s ease;
}

.color-picker-close:hover {
    color: #37352f;
    transform: scale(1.1);
}

.color-picker-instructions {
    background: #f8f9fa;
    border-left: 3px solid #44bd32;
    padding: 12px 16px;
    border-radius: 6px;
    margin: 16px 0;
    font-size: 0.85rem;
    color: #666;
    line-height: 1.5;
}

.color-picker-link-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 12px 20px;
    background: linear-gradient(135deg, #44bd32, #4cd137);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    box-shadow: 0 2px 8px rgba(68, 189, 50, 0.3);
    box-sizing: border-box;
}

.color-picker-link-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(68, 189, 50, 0.4);
}

.color-picker-link-button:active {
    transform: translateY(0);
}

.color-picker-link-button .material-icons {
    font-size: 20px;
}

.color-picker-doc-link {
    display: block;
    text-align: center;
    font-size: 0.75rem;
    color: #888;
    text-decoration: none;
    margin-top: 12px;
    transition: color 0.2s ease;
}

.color-picker-doc-link:hover {
    color: #44bd32;
    text-decoration: underline;
}

/* Analytics Consent Banner (GDPR Compliant) */
.analytics-consent-banner {
    position: fixed;
    top: 20px;
    left: 40px;
    right: 40px;
    transform: translateY(-20px);
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    padding: 16px 20px;
    z-index: 10000;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.analytics-consent-banner.visible {
    opacity: 1;
    transform: translateY(0);
}

.consent-content h3 {
    margin: 0 0 8px 0;
    font-size: 16px;
    font-weight: 600;
    color: #333;
}

.consent-content p {
    margin: 0 0 12px 0;
    font-size: 13px;
    line-height: 1.4;
    color: #666;
}

.consent-buttons {
    display: flex;
    gap: 10px;
}

.consent-btn {
    flex: 1;
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.consent-btn.accept {
    background: #44bd32;
    color: white;
}

.consent-btn.accept:hover {
    background: #3da82a;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(68, 189, 50, 0.3);
}

.consent-btn.decline {
    background: #f5f5f5;
    color: #666;
}

.consent-btn.decline:hover {
    background: #e8e8e8;
}

/* Mobile responsive */
@media (max-width: 600px) {
    .analytics-consent-banner {
        left: 10px;
        right: 10px;
        top: 10px;
        max-width: none;
        transform: translateX(0) translateY(-20px);
    }

    .analytics-consent-banner.visible {
        transform: translateX(0) translateY(0);
    }
}