html, body {
    height: 100%;
    margin: 0;
}

body {
    font-family: Arial, sans-serif;
    background-color: #f4f4f4;
}

.toast {
    background-color: #333;
    color: white;
    padding: 10px;
    border-radius: 5px;
    opacity: 0.9;
    display: none; 
    position: fixed; 
    bottom: 6px; 
    right: 20px; 
    z-index: 1000;
}

.container {
    position: relative;
    display: flex;
    justify-content: space-between;
    gap: 30px;
    height: calc(100% - 200px);
}

.container textarea {
    width: 100%;
    height: 100%;
}

h2 {
    text-align: center;
    color: #4b4a4a;
    font-size: 1.2rem;
    margin: .3rem 0;
    font-weight: bold;
}

.column {
    background-color: white;
    border: 1px solid #ccc;
    width: 30%;
    padding: 10px;
    display: flex;
    flex-direction: column; /* Stack children vertically */
    height: calc(100% - 55px); /* Adjust height to fit within the board */
    border-radius: 10px;
}

input[type="text"] {
    padding: 10px 15px; /* Add padding */
    font-size: 16px; /* Increase font size */
    border: 1px solid #ccc; /* Border color */
    border-radius: 5px; /* Rounded corners */
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1); /* Subtle shadow */
    transition: border-color 0.3s; /* Smooth transition for focus effect */
}

input[type="text"]:focus {
    border-color: #6c63ff; /* Change border color on focus */
    outline: none; /* Remove default outline */
}

.drop-target {
    background-color: #e0e7ff; /* Light blue background for drop target */
    border: 2px dashed #6c63ff; /* Dashed border to indicate drop area */
}

.navbar-dark .navbar-brand {
    font-weight: bold;
    font-size: 1rem;
}

.brand-title, .brand-title:hover {
    text-decoration: none;
    color: inherit;
}

.flex-navbar {
    display: flex;
    color: white;
    font-weight: bold;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.generic-flex {
    display: flex;
    align-items: center;
}

.select-case-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin: 20px 0;
    flex-wrap: wrap;
}

@media (max-width: 768px) {
    .search-container input[type="text"] {
        width: 100% !important;
        margin: 0 20px;
    }

    #tabbypad {
        padding: 20px 20px 40px 20px !important;
    }

    .custom-modal-content {
        margin: 40% auto !important;
    }

    .custom-modal-content.fullscreen {
        margin: 0 !important;
    }
}

.grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
}

.grid-item {
    background-color: #ffffff;
    border: 2px solid #ccc;
    padding: 20px;
    text-align: left;
    cursor: pointer;
    font-size: 0.9em;
    height: 215px;
    overflow: hidden;
    border-radius: 10px;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 8;
    transition: filter .2s ease-out;
    box-shadow: 2px 2px 2px 0px #00000014;
}

/* Ensure that the text is wrapped correctly */
.grid-item > div {
    overflow: hidden; /* Hide overflow */
    text-overflow: ellipsis; /* Show ellipsis */
    display: -webkit-box; /* Use box layout for ellipsis */
    -webkit-box-orient: vertical; /* Vertical orientation */
    -webkit-line-clamp: 8; /* Limit to 8 lines */
}

.grid-item:hover {
    filter: sepia(1);
}

.custom-modal {
    display: none;
    position: fixed;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto; /* Enable scroll if needed */
    background-color: rgba(0, 0, 0, 0.5); /* Background with transparency */
}

.custom-modal-content {
    background-color: #fefefe;
    margin: 10% auto; /* Center the modal */
    padding: 20px;
    border: 1px solid #888;
    width: 80%; /* Default width */
    transition: width 0.3s, height 0.3s; /* Smooth transition */
    border-radius: 8px;
}

.custom-modal-content.fullscreen {
    width: 100%; /* Full width */
    height: 100%; /* Full height */
    margin: 0; /* Remove margin */
    padding: 20px; /* Remove padding */
    border-radius: 0; /* Remove border radius */
}

#tabbypad {
    margin-top: 15px;
    padding: 20px 10% 40px;
}

#deleteNoteBtn {
    float: right;
}

textarea {
    padding: 20px;
    margin: 10px 0;
    border-radius: 6px;
    height: calc(100% - 92px);
    resize: none;
}

.add-note {
    background-color: #e0e0e0; /* Light background for the add note item */
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    height: 215px; /* Same height as other grid items */
    font-size: 2em; /* Larger font size for the plus sign */
}

.search-container {
    display: flex;
    width: 100%;
    justify-content: center;
    margin-top: 35px;
}

.search-container input[type="text"] {
    width: 40%;
}

.note-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.flex-note-footer {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 10px;
}

.delete-confirmation-container .modal.show {
    display: block; /* Show the modal */
    opacity: 1; /* Ensure full opacity */
}

.delete-confirmation-container .modal-dialog {
    margin: auto; /* Center the modal */
    top: 40%; /* Position it in the middle of the screen */
    transform: translateY(-50%); /* Adjust for vertical centering */
}

.note-content {
    white-space: pre-wrap; /* Preserve whitespace and newlines */
    word-wrap: break-word; /* Allow long words to break */
}

.btn-container {
    gap: 13px;
}

.btn-container button {
    padding: 0;
}

.bg-dark {
    background-color: #1b222d !important;
}