@import url('https://fonts.googleapis.com/css2?family=Oxygen:wght@400;700&display=swap');

body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f8f9f7;
}

#header-main {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

#help-link {
    font-size: 1.5em;
    /* Adjust the size as needed */
    text-decoration: none;
    color: #273d62;
    /* Match the header text color */
    margin-left: 10px;
    /* Adjust spacing as needed */
    cursor: pointer;
}

#help-link:hover {
    color: #629abc;
    /* Optional: Change color on hover */
}


/* Title and headings styling */
header h1,
.page-title {
    font-family: 'Oxygen', sans-serif;
    font-size: 27px;
    font-weight: 700;
    /* Bold */
    color: #273d62;
    /* Dark text color */
    margin: 20px 0;
    /* Add some margin for spacing */
    text-align: left;
    /* Align the title to the left */
}

header {
    text-align: left;
    margin-bottom: 10px;
    color: #3B4F71;
}

.container {
    display: flex;
    flex-direction: column;
    height: 100vh;
    margin: 0 auto;
    padding: 20px;
    background-color: #f8f9f7;
    max-width: 600px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

.top-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 10px;
    /* padding: 0 10px; */
}

.date-emoji-container {
    display: flex;
    align-items: center;
}

.selected-date {
    font-family: 'Noto Sans', sans-serif;
    font-size: 15px;
    font-weight: 400;
    /* Regular */
    color: #273d62;
    /* Dark text color */
}

.day-emoji-container {
    display: flex;
    align-items: center;
    margin-right: 10px;
    /* Fixed 10 pixel offset to text */
    position: relative;
    /* For positioning the emoji picker */
}

.entries {
    flex-grow: 1;
    overflow-y: auto;
    margin-bottom: 20px;
    padding: 10px 0;
    border-bottom: 1px solid #ddd;
}

.entry {
    margin-bottom: 20px;
}

.entry-category {
    font-family: 'Noto Sans', sans-serif;
    font-size: 13px;
    font-weight: 700;
    /* Bold */
    margin-bottom: 5px;
    color: #3B4F71;
}

.entry-text {
    font-family: 'Noto Sans', sans-serif;
    font-size: 15px;
    width: 100%;
    max-width: 100%;
    min-height: 60px;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    resize: vertical;
    box-sizing: border-box;
}

.trash-button {
    background: none;
    border: none;
    cursor: pointer;
    margin-right: 0;
}

.trash-button:hover {
    color: #000; /* Optional hover effect */
}

.trash-icon {
    font-family: 'Noto Sans', sans-serif;
    font-size: 15px;
    width: 1em;
    height: 1em;
    object-fit: contain;
    vertical-align: middle;
}

.week-overview {
    padding: 10px 0;
    text-align: center;
}

.week-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    padding: 0 10px;
}

.week-number {
    font-family: 'Noto Sans', sans-serif;
    font-size: 15px;
    font-weight: 400;
    /* Regular */
    color: #273d62;
    /* Dark text color */
    flex-grow: 1;
    text-align: left;
}

.week-nav-buttons {
    display: flex;
    gap: 10px;
    /* Add some space between the buttons */
}

.week-nav-button {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #aaa;
    padding: 5px;
}

.week-nav-button:hover {
    color: #000;
}

.days {
    display: flex;
    justify-content: space-between;
    border-top: 1px solid #273d62;
    /* Top border */
    border-bottom: 1px solid #273d62;
    /* Bottom border */
    padding: 10px 0;
    /* Add some padding for spacing */
}

.day-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.weekday-abbreviation {
    font-size: 12px;
    text-align: center;
}

.day {
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background-color: #e8ebe7;
    border: 1px solid #273d62;
    cursor: pointer;
    color: white;
    /* Set text color to white */
    text-shadow:
        -1px -1px 0 #273d62,
        1px -1px 0 #273d62,
        -1px 1px 0 #273d62,
        1px 1px 0 #273d62;
    /* Dark blue outline */
}

.day.entered {
    background-color: #629abc;
    color: white;
}


.category-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 5px;
    gap: 5px;
    /* Add some space between elements */
}

.entry-emoji-container {
    display: flex;
    align-items: center;
    margin-left: 0;
    /* No margin needed */
    position: relative;
}

.entry-category {
    flex-grow: 1;
    /* Allow the category name to take up available space */
    text-align: left;
    margin-top: 10px;
}


#add-category-container {
    display: flex;
    flex-direction: column;
    /* Stack children elements vertically */
    justify-content: center;
    margin-top: 20px;
    padding: 0px;
}

#add-category-button {
    font-size: 24px;
    padding: 8px 16px;
    /* Add some padding for better aesthetics */
    width: 30px;
    /* Adjust width to fit the content */
    cursor: pointer;
    background-color: #629abc;
    /* Blue background */
    color: white;
    /* White text */
    border: none;
    /* Remove any default border */
    border-radius: 5px;
    /* Slightly rounded corners */
    display: inline-flex;
    /* Ensure the icon is centered */
    align-items: center;
    /* Center the icon vertically */
    justify-content: center;
    /* Center the icon horizontally */
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    /* Optional: add a subtle shadow */
    transition: background-color 0.3s;
    /* Smooth transition for hover effect */
}

#add-category-button:hover {
    background-color: #0056b3;
    /* Darker blue for hover effect */
}

.custom-dropdown {
    position: relative;
}

.suggestions {
    position: absolute;
    background: white;
    border: 1px solid #ccc;
    width: 100%;
    max-height: 150px;
    overflow-y: auto;
    z-index: 1000;
}

.suggestions div {
    padding: 8px;
    cursor: pointer;
}

.suggestions div:hover {
    background-color: #f0f0f0;
}

/* Backup and Restore Section */
.backup-restore {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 20px;
    gap: 10px;
}

.backup-restore-button {
    font-size: 1em;
    padding: 10px 20px;
    background-color: #629abc;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.backup-restore-button:hover {
    background-color: #629abc;
}

#status-message {
    text-align: center;
    margin-top: 10px;
    color: green;
    font-size: 1.1em;
}


.bottom-action-bar {
    position: fixed;
    bottom: 0;
    width: 100%;
    max-width: 600px;
    /* Set the maximum width to match the container */
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    justify-content: space-around;
    align-items: center;
    background-color: #e8ebe7;
    padding: 10px 0;
    z-index: 1000;
    border-top: 2px solid #273d62;
    /* Dark border line on top */
}


.action-button {
    background: none;
    border: none;
    font-size: 1.5em;
    color: #667896;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.action-button img {
    margin-bottom: 5px;
    /* Add space between the image and text */
}

.action-button:hover {
    color: #667896;
}

.action-text {
    font-size: 0.5em;
    /* Small text size */
    color: #667896;
}

/* Chart View */
#chart-view {
    padding: 20px;
}

.chart-controls {
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.control-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

#category-select,
#hashtag-select,
#start-date,
#end-date {
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 1em;
    width: 100%;
    box-sizing: border-box;
}

#update-chart-button {
    padding: 10px;
    background-color: #629abc;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1em;
    width: 100%;
}

#update-chart-button:hover {
    background-color: #0056b3;
}

#emoji-chart {
    margin-top: 20px;
}

.close-button {
    background: none;
    border: none;
    font-size: 1.5em;
    cursor: pointer;
    color: #aaa;
    margin-left: auto;
}

.close-button:hover {
    color: #000;
}

/* General emoji styling */
.emoji {
    font-size: 1.5em;
    cursor: pointer;
}

.emoji-icon {
    display: inline-block;
    background-repeat: no-repeat;
    background-position: center center;
    background-size: contain;
}

/* Small emoji size */
.emoji-icon-small {
    width: 16px;
    height: 16px;
}

/* Medium emoji size */
.emoji-icon-medium {
    width: 32px;
    height: 32px;
}

/* Large emoji size */
.emoji-icon-large {
    width: 128px;
    height: 128px;
}

/* Styles for emoji options within the picker */
.emoji-option {
    display: inline-block;
    width: 32px;
    /* Ensure this matches the intended size */
    height: 32px;
    /* Ensure this matches the intended size */
    background-repeat: no-repeat;
    background-position: center center;
    background-size: contain;
    margin: 5px;
    /* Adjust for desired spacing */
    cursor: pointer;
    border-radius: 5px;
    /* Optional: Add a bit of border-radius */
    overflow: hidden;
    /* Ensure no overflow */
    box-sizing: border-box;
    /* Include padding and border in the element's total width and height */
    transition: transform 0.2s;
    /* Optional: Add a hover effect */
}

.emoji-option:hover {
    transform: scale(1.1);
    /* Slightly enlarge on hover */
}

.emoji-picker {
    display: none;
    position: absolute;
    top: 100%;
    /* Positioned below the emoji */
    transform: translateX(-50%);
    background-color: white;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    border-radius: 5px;
    padding: 10px;
    z-index: 10;
    white-space: nowrap;
    /* Ensure the picker doesn't wrap its content */
    overflow: visible;
    /* Allow overflow if the content is larger */
    width: auto;
    /* Set to auto to adjust based on content */
    left: 140px;
}

.emoji-picker.show {
    display: flex;
    justify-content: space-around;
}

/* Hashtag Overlay */
.hashtag-overlay {
    position: absolute;
    background-color: white;
    border: 1px solid #ccc;
    border-radius: 5px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    display: none;
    max-height: 150px;
    overflow-y: auto;
    z-index: 1000;
}

.hashtag-option {
    padding: 8px;
    cursor: pointer;
}

.hashtag-option:hover {
    background-color: #f0f0f0;
}

/* New Category Input */
#new-category-name {
    flex-grow: 1;
    width: 60%;
    padding: 10px;
    font-size: 1em;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box;
    margin-right: 10px;
    margin-bottom: 10px;
}

#confirm-add-category {
    font-size: 1em;
    padding: 10px 20px;
    background-color: #629abc;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

#confirm-add-category:hover {
    background-color: #0056b3;
}

/* Media Queries for Responsiveness */
@media (max-width: 600px) {
    .container {
        padding: 10px;
    }

    .emoji-row,
    .week-overview {
        padding: 5px 0;
    }

    .entry-text {
        max-width: calc(100% - 20px);
    }

    #new-category-name {
        font-size: 0.9em;
    }

    #confirm-add-category {
        padding: 8px 16px;
        font-size: 0.9em;
    }
}

/* Prevent zooming on input focus on mobile devices */
input,
textarea {
    font-size: 16px;
}

/* Help Content */
.content {
    padding: 20px;
}

.content h2 {
    color: #629abc;
}

.content p {
    font-size: 1em;
    line-height: 1.5em;
    margin-bottom: 20px;
}

#status-message {
    text-align: center;
    margin-top: 10px;
    color: green;
    font-size: 1.1em;
}

#settings-view {
    display: flex;
    flex-direction: column;
    height: 100vh;
    margin: 0 auto;
    padding: 20px;
    background-color: #f8f9f7;
    max-width: 600px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

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

.settings-subtitle {
    font-family: 'Noto Sans', sans-serif;
    font-size: 15px;
    font-weight: 400;
    /* Regular */
    color: #273d62;
    /* Dark text color */
    margin-bottom: 5px;
}

.settings-section hr {
    border: none;
    border-top: 1px solid #ddd;
    margin-bottom: 10px;
}

.settings-row {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

.settings-button {
    width: 50%;
    padding: 10px;
    background-color: #629abc;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    text-align: center;
    transition: background-color 0.3s;
}

.settings-button:hover {
    background-color: #0056b3;
}

#last-export-label {
    margin-left: 10px;
    font-size: 14px;
    color: #273d62;
}



#statistics-view {
    padding: 20px;
}

.tiles-container {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    padding-bottom: 50px;
    /* Add padding to the bottom to ensure last tile is fully visible */
    justify-content: space-between;
}

.tile {
    background-color: #f8f9f7;
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    padding: 15px;
    width: calc(50% - 10px - 30px);
    position: relative;
}

/* Small tiles */
.tile-small {
    width: 25%;
    margin: 1%;
    padding: 3px;
    background-color: #f8f9f7;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    border-radius: 5px;
    text-align: center;
    flex: 0 0 auto;
}

.tile-title {
    height: 32px;
    /* Fixed height */
    line-height: 32px;
    /* Center text vertically */
    font-size: 1em;
    font-weight: bold;
    display: flex;
    align-items: center;
    /* Center content vertically */
    justify-content: center;
    /* Center content horizontally */
    margin-bottom: 10px;
}

.tile-content {
    font-size: 1em;
    margin-bottom: 10px;
}

.tile-action {
    font-size: 0.8em;
    color: #629abc;
    text-align: right;
    cursor: pointer;
}

.tile-action:hover {
    text-decoration: underline;
}


#chart-overview-view {
    padding: 20px;
}

.week-chart-component {
    margin-bottom: 20px;
}

.week-chart-component h3 {
    font-size: 20px;
    margin-bottom: 10px;
}

#chart-overview-view .week-chart-component .tiles-container {
    display: flex;
    justify-content: space-around;
    margin-bottom: 10px;
}


.week-chart-container {
    margin-bottom: 30px;
}

.small-tiles-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    /* Optional: Add some space between tiles */
}

.small-tiles-container .tile {
    flex: 1 1 calc(33.333% - 10px);
    /* Ensure three tiles per row */
    box-sizing: border-box;
    /* Include padding and border in the element's total width and height */
    margin-bottom: 10px;
    /* Add some margin at the bottom for spacing */
    font-family: 'Open Sans', sans-serif;
    /* Base font */
    font-size: 11px;
    /* Smaller font size */
}

.small-tiles-container .tile .tile-title,
.small-tiles-container .tile .tile-content,
.small-tiles-container .tile .tile-action {
    font-size: 11px;
    /* Smaller font size */
    margin: 5px 0;
    /* Reduce margins for smaller text */
}


#category-statistics-view .top-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
}

#category-charts {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 20px;
}

#category-charts canvas {
    max-width: 100%;
    margin-top: 20px;
}


/* for the word cloud of hash tags */

#hashtag-mood-correlation {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-top: 20px;
}

#positive-wordcloud,
#negative-wordcloud {
    width: 100% !important;
    height: 300px !important;
    border-radius: 10px;
    padding: 10px;
}

#positive-wordcloud {
    background-color: rgba(144, 238, 144, 0.1);
    /* Light green with 20% opacity */
}

#negative-wordcloud {
    background-color: rgba(255, 99, 71, 0.1);
    /* Light red with 20% opacity */
}

/* Define keyframes for sliding animations */
@keyframes slideInLeft {
    from {
        transform: translateX(-100%);
    }

    to {
        transform: translateX(0);
    }
}

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

    to {
        transform: translateX(0);
    }
}

@keyframes slideOutLeft {
    from {
        transform: translateX(0);
    }

    to {
        transform: translateX(-100%);
    }
}

@keyframes slideOutRight {
    from {
        transform: translateX(0);
    }

    to {
        transform: translateX(100%);
    }
}

/* Apply the animations to the container */
.slide-in-left {
    animation: slideInLeft 0.2s forwards;
}

.slide-in-right {
    animation: slideInRight 0.2s forwards;
}

.slide-out-left {
    animation: slideOutLeft 0.2s forwards;
}

.slide-out-right {
    animation: slideOutRight 0.2s forwards;
}


/* General Hidden Class, always last */
.hidden {
    display: none !important;
}