/* ============================================================================
   CRAFT INTENT - MAIN STYLES
   Clean, organized, with subtle art deco touches
   ============================================================================ */

:root {
    /* ===== COLOR PALETTE ===== */
    --gold: #C9A865;
    --gold-light: #c9a8654b;
    --gold-transparent: #c9a865c9;
    --navy: #2C3E50;
    --navy-transparent: #2c3e50b7;
    
    /* ===== GENERAL ===== */
    --font-family: system-ui, -apple-system, Segoe UI, Roboto, sans-serif; 
    --font-weight: medium;
    --font-size: 1rem;
    --font-color: 070708;
    --box-shadow: 0 4px 8px 0 rgba(0,0,0,0.2);
    --border-radius: 4px;
    --border: 1px solid #b8b8b8;
    --body-background-color: rgb(255, 255, 255);
    
    /* ===== INTERACTION COLORS ===== */
    --primary-blue: #2563eb;
    --primary-blue-light: #60a5fa;
    --primary-blue-bg: rgba(37, 99, 235, 0.1);
    --primary-blue-border: rgba(37, 99, 235, 0.6);
    --search-expanded-color: #e0f2fe;   
    
    /* ===== TIMING ===== */
    --transition-fast: 150ms;
    --transition-normal: 250ms;
    --transition-slow: 350ms;
    --drag-transition-fast: 1ms;
    --drag-transition-normal: 150ms;
    --drag-transition-slow: 250ms;
    
    /* ===== EASING ===== */
    --ease-smooth: cubic-bezier(0.4, 0, 0.2, 1);
    --ease-bounce: cubic-bezier(0.68, -0.55, 0.265, 1.55);
    --ease-in-out: ease-in-out;
}

/* ============================================================================
   FADE FLASH ANIMATION
   ============================================================================ */
@keyframes fadeFlash {
    0% {
        background: var(--gold-light);
    }
    100% {
        background: transparent;
    }
}

/* ============================================================================
   BASE STYLES
   ============================================================================ */

body {
    background: var(--body-background-color);
    z-index: 1;
    margin: 0;
    font-size: var(--font-size);
    font-family: var(--font-family);
    font-weight: var(--font-weight);
    color: var(--font-color);
    height: 100%;
}

section {
    position: relative;
}

/* ============================================================================
   HEADER & NAVIGATION
   ============================================================================ */

.header {
    background: var(--body-background-color);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 200px;
    width: 100%;
    max-width: 1499px;
    z-index: 2;
}

.ci-logo {
    font-weight: lighter;
    padding: 10px;
    border-radius: var(--border-radius);
    height: auto;
}   

.craft-logo {
    background-color: #707070;
    background-color: var(--navy);
    color: white;
    color: var(--gold);
    font-size: 2rem;
    /* padding-right: 5px;
    padding-left: 5px; */
    /* border: 1px solid var(--navy);
    border-radius: var(--border-radius) 0 0 var(--border-radius); */
}

.intent-logo {
    color: var(--navy);
    font-size: 2rem;
    /* border: 1px solid var(--navy);
    padding-right: 5px;
    padding-left: 5px;
    border-radius: 0 var(--border-radius) var(--border-radius) 0; */
}

.one-thing {
    font-size: medium;
    color: solid black;
    justify-content: center;
    justify-self: center;
    align-self: center;
    margin-top: .25rem;
    padding: 5px 45px 5px 45px;
}

.one-thing:focus {
    outline: none;
    border: 1px solid var(--gold);
    border-radius: var(--border-radius);
}

.navigation {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    text-align: center;
    width: 100%;
    margin: 0 auto;
    margin-bottom: 10px;
    margin-top: 20px;
}

.nav-label {
    cursor: pointer;
    margin-right: 30px;
}

.nav-label:hover {
    color: var(--gold);
    border-bottom: 1px solid var(--gold);
}


/* ============================================================================
   HAMBURGER MENU
   ============================================================================ */

.hamburger-menu {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 1000;
    display: flex;
    align-items: stretch;
    justify-content: center;
}

.hamburger-icon,
.save-button {
    border: none;
    background-color: var(--body-background-color);
    font-size: 15px;
    cursor: pointer;
    padding: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--border-radius);
    transition: background-color var(--transition-fast) var(--ease-smooth);
}

.hamburger-icon:hover,
.save-button:hover {
    background-color: var(--gold);
}

/* ============================================================================
   SETTINGS PAGE
   ============================================================================ */

.settings-page {
    display: none;
    position: fixed; 
    top: 50%; 
    left: 50%; 
    transform: translate(-50%, -50%); 
    width: 50vw;
    height: 75vh;
    margin: auto;
    padding: 30px;
    overflow: auto;
    background-color: white;
    border: 1px solid #ccc;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    z-index: 1000;
}

.setting-button {
    margin-top: 10px;
    padding: 10px 20px;
    background: var(--navy);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    width: 100%;
    transition: all var(--transition-fast) var(--ease-smooth);
}

.settings-close-button {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    font-size: 36px;
    color: #999;
    cursor: pointer;
    line-height: 1;
    padding: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.settings-close-button:hover {
    color: #333;
    transform: scale(1.1);
}
   
.settings-close-button:active {
       transform: scale(0.95);
}

.danger-button {
    background: #dc3545 !important;
    color: white !important;
}

.danger-button:hover {
    background: #c82333 !important;
}

.setting-button:hover {
    background-color: var(--gold);
    transform: translateY(-1px);
}

.dropdown-menu ul li a:hover {
    background-color: #f2f2f2;
}

.user-settings {
    margin-left: 15px;
    display: inline-block;
}

/* ============================================================================
   MAIN CONTENT CONTAINER
   ============================================================================ */

.content-container {
    display: flex;
    flex-direction: column;
    text-align: left;
    overflow-y: auto;
    height: 100%;
    width: auto;
    max-width: 2400px;
    min-height: 100vh;
    margin: 10px auto 10px auto;
    padding: 0px 45px;
    background-color: var(--body-background-color);
    box-shadow: 10px 10px 20px #babecc, /* Bottom-right shadow */
    -10px -10px 20px #ffffff, /* Top-left shadow */
    -10px 10px 20px #babecc, /* Bottom-left shadow */
    10px -10px 20px #ffffff; /* Top-right shadow */;
    border-radius: 5px;
}

/* ============================================================================
   SECTION CONTROLS (CRITICAL - DO NOT MODIFY)
   ============================================================================ */

input[name="title"] {
    display: none;
}

.projects,
.todos,
.notes {
    margin-bottom: 10px;
    width: 100%;
}

.todos-button,
.projects-button,
.notes-button {
    font-size: large;
    font-weight: 300;
    margin-bottom: 50px;
    letter-spacing: 2px;
    cursor: pointer;
    transition: font-weight var(--transition-fast) var(--ease-smooth);
}

#todos:checked ~ .todos-button,
#projects:checked ~ .projects-button,
#notes:checked ~ .notes-button {
    font-weight: 400;
}

.add-project-button,
.add-notes-button,
.projects-container,
.todos-container,
.notes-container,
.todoList {
    display: none;
}

#todos:checked ~ .todos-container,
#projects:checked ~ .projects-container,
#notes:checked ~ .notes-container {
    display: block;
    padding: 10px 15px 20px 15px;
    min-height: 100px;
    width: 95%;
}

#projects:checked ~ .projects-container .add-project-button,
#notes:checked ~ .notes-container .add-notes-button {
    display: inline-block;
}

.todos-container,
.projects-container,
.notes-container {
    position: relative;
    flex-direction: column;
    justify-content: flex-start;
    align-items: stretch;
    margin: 20px auto;
    background-color: white;
    overflow: auto;
}

/* ============================================================================
   BUTTONS
   ============================================================================ */

.add-project-button,
.add-notes-button,
.delete-note-project-button,
.delete-notes-button,
.delete-project-button {
    align-self: center;
    margin: 0 auto;
    display: block;
    background-color: white;
    border-radius: 1px;
    border: 1px solid var(--navy-transparent);
    box-shadow: 
        3px 3px 3px #babecc,
        -3px 3px 3px #babecc;       
    cursor: pointer;
    font-size: medium;
    height: 25px;
    width: 25px;
    z-index: 5;
    transition: all var(--transition-fast) var(--ease-smooth);
}

.logout-button {
    margin-top: 10px;
    padding: 10px 20px;
    background: var(--navy);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all var(--transition-fast) var(--ease-smooth);
}

.add-project-button:hover,
.add-notes-button:hover,
.delete-note-project-button:hover,
.delete-notes-button:hover,
.delete-project-button:hover {
    background-color: var(--gold);
    transform: translateY(-2px);
    box-shadow: 
        4px 4px 4px #babecc,
        -4px -4px 4px #ffffff,
        -4px 4px 4px #babecc,
        4px -4px 4px #ffffff;
    border-radius: 50%;
}

.add-project-button:active,
.add-notes-button:active,
.delete-note-project-button:active,
.delete-notes-button:active,
.delete-project-button:active {
    transform: translateY(0);
}

.logout-button:hover {
    background-color: var(--gold);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 123, 255, 0.3);
}

.logout-button:active {
    transform: translateY(0);
}

.maximize-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    cursor: pointer;
    font-size: 20px;
    z-index: 1;
    transition: all var(--transition-fast) var(--ease-smooth);
}

.maximize-btn:hover {
    color: #8d0b0b;
    transform: scale(1.15);
}

.fullscreen {
    position: fixed;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    width: 90vw;
    height: 90vh;
    z-index: 100;
    background-color: var(--body-background-color);
    border: var(--border);
    border-radius: var(--border-radius);
    padding: 20px;
    margin-left: auto;
    margin-right: auto;
    opacity: 0;
    transition: opacity var(--transition-normal) var(--ease-smooth);
}

.fullscreen.visible {
    opacity: 1;
}

/* ============================================================================
   TODO STYLES
   ============================================================================ */

.todoItem {
    padding-left: 10px;
    position: relative;
    line-height: 1.6;
    border-top: 3px solid transparent;
    border-bottom: 3px solid transparent;
    transition: 
        border-color var(--drag-transition-fast) var(--ease-smooth),
        background-color var(--drag-transition-fast) var(--ease-smooth),
        opacity var(--drag-transition-fast) var(--ease-smooth);
}

.todos-list li {
    position: relative;
    list-style: none;
    padding-left: 1rem;
}

.todos-list li.todoItem::before {
    position: absolute;
    left: 0;
    top: 0;
    display: inline-block;
    content: "-";
    margin-right: 10px;
    color: var(--navy);
    font-weight: 700;
    cursor: grab;
}

.todoItem:focus {
    outline: none;
    border-top: 3px solid transparent;  /* Keep borders, just transparent */
    border-bottom: 3px solid transparent;
}

.indent-1 {
    padding-left: 30px;
}

.hide-button {
    cursor: pointer;
    color: #ffffff;
    letter-spacing: 1.5px;
    cursor: pointer;
    border-top: 3px solid transparent;
    border-bottom: 3px solid transparent;
    text-align: center;
    background-color: var(--navy-transparent);
    box-shadow: var(--box-shadow);
    transition: background-color var(--drag-transition-fast) var(--ease-smooth),
                transform var(--drag-transition-fast) var(--ease-smooth);
}

.hide-button:hover {
    background-color: var(--gold-transparent);
    transform: translateY(-1px);
}

.hidden-todo {
    display: none;
    border-top: 3px solid transparent;
    border-bottom: 3px solid transparent;
    transition: border-color var(--drag-transition-fast) var(--ease-smooth);
}

/* ============================================================================
   PROJECTS & NOTES (UNIFIED STRUCTURE)
   ============================================================================ */

.projects-list,
.notes-list {
    display: flex;
    flex-direction: column;
    justify-items: start;
    margin-bottom: 15px;
    margin-top: 30px;
    margin-left: auto;
    margin-right: auto;
}

.note-project-item {
    position: relative;
    display: flex;
    flex-direction: column;
    text-align: left;
    padding: 10px 15px;
    border-bottom: 3px solid transparent;
    border-top: 3px solid transparent;
    transition:
        border-bottom 3px solid transparent,
        border-color var(--drag-transition-fast) var(--ease-smooth),
        background-color var(--drag-transition-fast) var(--ease-smooth),
        opacity var(--drag-transition-fast) var(--ease-smooth);
}

.note-project-title-container {
    display: flex;
    flex-direction: row;
    align-items: left;
}

.note-project-title {
    margin-right: 20px;
    min-width: 100px;
    font-weight: 600;
    padding-left: 5px;
    border-radius: 5px;
}

.note-project-title:hover {
    animation: fadeFlash 1s ease;
}

.note-project-title:focus {
    border: 1px solid var(--gold);
    outline: none;
}

.note-project-toggle-arrow {
    cursor: pointer;
    user-select: none;
    margin-right: 8px;
    color: var(--gold);
    transition: transform var(--drag-transition-fast) var(--ease-smooth);
}

.note-project-toggle-arrow:hover {
    transform: scale(1.5);
}

.note-project-item.collapsed .note-project-toggle-arrow {
    transform: rotate(0deg);
}

.note-project-status {
    position: relative;
    margin: 10px 50px 10px 20px;
    padding: 5px;
    border-radius: 1px;
    /* border-bottom: 1px solid var(--navy-transparent); */
    pointer-events: auto;
    max-height: 500px;
    opacity: 1;
    overflow: hidden;
    transition: 
        max-height var(--transition-normal) var(--ease-smooth),
        opacity var(--transition-normal) var(--ease-smooth),
        margin var(--transition-normal) var(--ease-smooth),
        padding var(--transition-normal) var(--ease-smooth);
}

.note-project-item:hover .note-project-status {
    animation: fadeFlash 0.8s ease;
}

.note-project-status:focus {
    border: 1px solid var(--gold);
    outline: none;
}

.note-project-item.collapsed .note-project-status {
    max-height: 0;
    opacity: 0;
    margin-top: 0;
    margin-bottom: 0;
    padding-top: 0;
    padding-bottom: 0;
}

.note-project-item-menu {
    position: absolute;
    top: 10px;
    right: 45px;
    cursor: pointer;
    z-index: 1;
}

.note-project-item-menu-content {
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    justify-items: center;
    width: auto;
    position: absolute;
    top: 20px;
    right: 0;

    padding: 0;
    transform: translateY(-10px);
    transition: transform var(--transition-fast) var(--ease-smooth);
}

.note-project-item-menu-content ul {
    background-color: white;
    margin: 0;
    padding: 0;
    list-style: none;
    width: 100%;
}

.note-project-item-menu-content[style*="display: flex"] {
    opacity: 1;
    z-index: 100;
    transform: translateY(0);
}

.note-project-item-menu-content ul li {
    padding: 10px;
    color: white;
}

.note-project-item-menu-content ul li a:hover {
    background-color: #f2f2f2;
}

.delete-note-project-button {
    cursor: pointer;
    margin: 10px;
}

/* ============================================================================
   DRAG & DROP INDICATORS
   ============================================================================ */

.todoItem.dragging,
.note-project-item.dragging,
.project-item.dragging,
.note-item.dragging {
    opacity: 0.6;
    background-color: var(--gold);
}

.todoItem.drag-over-top,
.note-project-item.drag-over-top,
.project-item.drag-over-top,
.note-item.drag-over-top,
.hidden-todo.drag-over-top,
.hide-button.drag-over-top {
    border-top-color: var(--gold);
}

.todoItem.drag-over-bottom,
.note-project-item.drag-over-bottom,
.project-item.drag-over-bottom,
.note-item.drag-over-bottom,
.hidden-todo.drag-over-bottom,
.hide-button.drag-over-bottom {
    border-bottom-color: var(--gold);
}

/* ============================================================================
   HOME PAGE STYLES
   ============================================================================ */

li {
    list-style: none;  
}

ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

a {
    color: black;
    text-decoration: none;
}

.emphasis {
    font-weight: 600;
}

.submit {
    margin-top: 10px;
    font-size: medium;
}

.entire-content-border {
    max-width: 1200px;
    margin-top: 0px;
    margin-left: auto;
    margin-right: auto;
    padding: 0px 45px;
    letter-spacing: 1px;
    line-height: 1.75;
}

.home-text-container {
    max-width: 800px;
    margin-top: 10px;
    margin-left: auto;
    margin-right: auto;
    letter-spacing: 1px;
    line-height: 1.75;
    text-align: justify;
}

.home-centered-text {
    text-align: center;
    margin-left: auto;
    margin-right: auto;
}

.forgot-credentials-links {
    text-align: center;
    margin-top: 15px;
    margin-bottom: 10px;
}

.forgot-link {
    color: #666;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s ease;
}

.forgot-link:hover {
    color: #007bff;
    text-decoration: underline;
}

.link-separator {
    color: #ccc;
    margin: 0 10px;
    font-size: 14px;
}

.trial-note {
    margin-top: 5px;
    margin-bottom: 35px;
    font-weight: medium;
    font-size: 0.9rem;
}

.prompt {
    font-size: 1.8rem;
    font-weight: 600;
    text-align: center;
    margin-bottom: 2rem;
    background: linear-gradient(90deg, #000, #555);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.cta-btn {
    cursor: pointer;
    display: inline-block;
    text-align: center;
    margin: 1rem auto;
    padding: 0.75rem 1.5rem;
    background: var(--navy);
    color: #fff;
    border-radius: 4px;
    font-weight: 600;
    transition: background 0.2s;
}

.cta-btn:hover {
    background: var(--gold);
    box-shadow: #C9A865 0px 4px 15px;
}

.features {
    list-style: none;
    padding: 0;
    margin: 0 0 2rem;
}

.features li {
    margin-bottom: 1.2rem;
    padding-left: 1.6rem;
    position: relative;
}

.features li::before {
    content: "\2713";
    position: absolute;
    left: 0;
    color: var(--navy);
    font-weight: bold;
}

.video-box {
    width: 100%;
    max-width: 640px;
    aspect-ratio: 16 / 9;
    margin: 1rem auto;
    border: 2px solid #ddd;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f9f9f9;
    color: #999;
}

.link a {
    color: rgb(70, 70, 70);
    text-decoration: underline;
}

.form-box {
    display: grid;
    grid-template-columns: 1fr;
    gap: .25rem;
    max-width: 500px;
    margin: 0 auto;
}

.form-box label {
    font-weight: bold;
    margin-bottom: 0.25rem;
}

.form-box input[type="text"],
.form-box input[type="password"],
.form-box input[type="email"] {
    padding: 0.5rem;
    border: 1px solid #ccc;
    width: 100%;
    border-radius: 6px;
    transition: border-color var(--transition-fast) var(--ease-smooth),
                box-shadow var(--transition-fast) var(--ease-smooth);
}

.form-box input[type="text"]:focus,
.form-box input[type="password"]:focus,
.form-box input[type="email"]:focus {
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 2px var(--primary-blue-bg);
    outline: none;
}

#sync-indicator {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.8);
    color: #fff;
    padding: 8px 20px;
    border-radius: 8px;
    font-size: 14px;
    z-index: 2000;
    opacity: 0;
    transition: opacity var(--transition-normal) var(--ease-smooth);
}

#sync-indicator:not([hidden]) {
    opacity: 1;
}

/* Password field wrapper and toggle */
.password-field-wrapper {
    position: relative;
}

.password-toggle {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    user-select: none;
}

/* ============================================================================
   SEARCH STYLES
   ============================================================================ */

#craft-search-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: #ffffff;
    padding: 12px 16px;
    border-radius: 8px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
    z-index: 9999;
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: inherit;
    font-size: 14px;
    transition: box-shadow var(--transition-fast) var(--ease-smooth);
}

#craft-search-container:hover {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

#craft-search-input {
    padding: 6px 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    width: 200px;
    font-size: 14px;
    font-family: inherit;
    outline: none;
    transition: border-color var(--transition-fast) var(--ease-smooth),
                box-shadow var(--transition-fast) var(--ease-smooth);
}

#craft-search-input:focus {
    border-color: var(--gold);
    box-shadow: 0 0 0 2px var(--gold-light);
}

#craft-search-input::placeholder {
    color: #999;
}

#craft-search-counter {
    font-size: 13px;
    color: #666;
    min-width: 70px;
    text-align: center;
    transition: color var(--transition-fast) var(--ease-smooth);
}

#craft-search-counter.no-results {
    color: #d32f2f;
    font-weight: 500;
}

#craft-search-counter.has-results {
    color: var(--gold-light);
    font-weight: 500;
}

.craft-search-btn {
    background: #f5f5f5;
    border: 1px solid #ddd;
    border-radius: 4px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 16px;
    color: #333;
    padding: 0;
    transition: all var(--transition-fast) var(--ease-smooth);
}

.craft-search-btn:hover {
    background: #e0e0e0;
    border-color: #bbb;
    transform: translateY(-1px);
}

.craft-search-btn:active {
    transform: translateY(0);
}

.craft-search-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    transform: none;
}

#craft-search-clear {
    background: transparent;
    border: none;
    color: #999;
    font-size: 18px;
    cursor: pointer;
    padding: 4px;
    transition: color var(--transition-fast) var(--ease-smooth),
                transform var(--transition-fast) var(--ease-smooth);
}

#craft-search-clear:hover {
    color: #d32f2f;
    transform: scale(1.1);
}

::highlight(search-results) {
    background-color: #ffeb3b;
    color: #000;
}

::highlight(current-result) {
    background-color: #ff9800;
    color: #fff;
    font-weight: 500;
}

.search-highlight {
    background-color: #ffeb3b;
    color: #000;
    padding: 0;
    border-radius: 2px;
    transition: background-color var(--transition-fast) var(--ease-smooth);
}

.search-highlight.current {
    background-color: #ff9800;
    color: #fff;
    font-weight: 500;
}

.search-expanded {
    border-left: 3px solid var(--gold);
    padding-left: 8px;
    background-color: var(--gold-light);
    transition: all var(--transition-normal) var(--ease-smooth);
}

.craft-search-btn:focus-visible {
    outline: 2px solid var(--gold);
    outline-offset: 2px;
}

#craft-search-input:focus-visible {
    outline: 2px solid var(--gold);
    outline-offset: 2px;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* ============================================================================
   RESPONSIVE - MOBILE
   ============================================================================ */

@media (max-width: 768px) {
    #craft-search-container {
        bottom: 10px;
        right: 10px;
        padding: 10px 12px;
        gap: 8px;
    }
    
    #craft-search-input {
        width: 140px;
        font-size: 13px;
    }
    
    #craft-search-counter {
        font-size: 12px;
        min-width: 60px;
    }
    
    .craft-search-btn {
        width: 28px;
        height: 28px;
        font-size: 14px;
    }
}

@media (max-width: 555px) {
    body {
        font-size: small;
    }

    .entire-content-border {
        padding: 0px;
    }

    .content-container {
        padding: 0px 3px;
    }

    .one-thing {
        text-align: center;
        font-size: medium;
    }
 
    .maximize-btn {
        display: none;
    }
}

@media (max-width: 480px) {
    #craft-search-container {
        flex-direction: column;
        gap: 6px;
    }
    
    #craft-search-input {
        width: 100%;
    }
    
    .craft-search-buttons {
        display: flex;
        gap: 6px;
        width: 100%;
        justify-content: center;
    }
}

/* ============================================
   MOBILE CONTEXT MENU FOR TOUCH INTERACTIONS
   Add this to the END of styles.css
   ============================================ */

/* Context menu container - FIXED to lower right for thumb access */
.mobile-context-menu {
    position: fixed;
    bottom: 80px; /* Above search bar */
    right: 20px;
    background: white;
    border: 2px solid var(--gold, #707070);
    border-radius: 8px;
    padding: 10px;
    display: none;
    z-index: 10000; /* Higher than search bar (9999) */
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.mobile-context-menu.active {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(3, 1fr);
    gap: 5px;
    width: 120px;
    height: 120px;
}

/* Arrow buttons in the context menu */
.mobile-context-menu button {
    background: #f0f0f0;
    border: 1px solid #b8b8b8;
    border-radius: 4px;
    font-size: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
    padding: 0;
}

.mobile-context-menu button:active {
    background: var(--gold, #707070);
    color: white;
}

.mobile-context-menu button:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

/* Position buttons in grid */
.arrow-up {
    grid-column: 2;
    grid-row: 1;
}

.arrow-left {
    grid-column: 1;
    grid-row: 2;
}

.arrow-right {
    grid-column: 3;
    grid-row: 2;
}

.arrow-down {
    grid-column: 2;
    grid-row: 3;
}

/* Visual feedback when long-pressing */
.long-press-active {
    transform: scale(0.98);
    transition: transform 0.1s, background-color 0.1s;
}

/* Active item border - shows which item the menu is controlling */
.mobile-menu-active {
    border: 3px solid var(--gold, #fbbf24) !important;
    box-shadow: 0 0 0 3px rgba(251, 191, 36, 0.2) !important;
    background-color: rgba(251, 191, 36, 0.05) !important;
    transition: all 0.2s ease;
}

/* ============================================
   MOBILE RESPONSIVE IMPROVEMENTS
   ============================================ */

@media (max-width: 768px) {
    /* Improve touch targets on mobile */
    .todoItem,
    .note-project-item {
        min-height: 24px; /* Apple's recommended minimum touch target */
        margin-bottom: 3px;
    }

    /* Better tap targets for buttons */
    .add-project-button,
    .add-notes-button,
    .note-project-item-menu,
    .delete-note-project-button {
        min-width: 24px;
        min-height: 24px;
    }

    /* Disable text selection during long press */
    .todoItem,
    .note-project-item,
    .hide-button {
        -webkit-user-select: none;
        -moz-user-select: none;
        -ms-user-select: none;
        user-select: none;
    }

    /* Re-enable text selection when contenteditable is active */
    [contenteditable="true"] {
        -webkit-user-select: text;
        -moz-user-select: text;
        -ms-user-select: text;
        user-select: text;
    }
}

/* ============================================
   SEARCH BAR - MOBILE POSITIONING FIX
   ============================================ */

@media (max-width: 768px) {
    /* Make search bar full-width and stick to bottom */
    #craft-search-container {
        display: flex;
        flex-direction: row;
        justify-content: right;
        left: 0;
        right: 0;
        bottom: 0;
        border-radius: 8px 8px 0 0; /* Round top corners only */
        padding: 10px;
        max-width: none;
    }

    .settings-page {
        width: 90vw;
        height: 80vh;
    }
}

@media (max-width: 480px) {
    /* Even more compact on very small screens */
    #craft-search-container {
        display: inline-flex;
        flex-direction: row;
        padding: 8px;
        gap: 6px;
    }
    
    #craft-search-input {
        font-size: 16px; /* Prevents iOS zoom on focus */
    }
}

/* ============================================
   ACCESSIBILITY - Prevent double-tap zoom
   ============================================ */
@media (max-width: 768px) {
    button,
    .todoItem,
    .note-project-item,
    .hide-button,
    [contenteditable="true"] {
        touch-action: manipulation;
    }
}


/* ================================================================================================================
   PRINT STYLES 
   
   These styles only apply when printing or saving as PDF.
   They hide unnecessary UI elements and format content for paper.
================================================================================================================ */

@media print {
    /* Hide navigation and UI elements */
    /* .header, */
    #craft-search-container,
    .navigation,
    .hamburger-menu,
    .save-button,
    .hamburger-icon,
    .settings-page,
    .add-project-button,
    .add-notes-button,
    .delete-note-project-button,
    .note-project-item-menu,
    .maximize-btn,
    .hide-button,
    input[type="checkbox"][name="title"] {
        display: none !important;
    }
    
    /* Show all sections regardless of checkbox state */
    .todos-container,
    .projects-container,
    .notes-container {
        display: block !important;
        page-break-inside: avoid;
    }
    
    /* Remove interactive styling */
    .todoItem,
    .note-project-item {
        cursor: default !important;
        border: none !important;
    }
    
    /* Ensure text is black for readability */
    body,
    .todoItem,
    .note-project-title,
    .note-project-status {
        color: #000 !important;
        background: white !important;
    }
    
    /* Remove shadows and decorative elements */
    .content-container {
        box-shadow: none !important;
        padding: 20px !important;
        margin: 0 !important;
        max-width: 100% !important;
    }
    
    /* Format section headings */
    .todos-button,
    .projects-button,
    .notes-button {
        font-size: 18pt !important;
        font-weight: bold !important;
        margin-bottom: 10pt !important;
        page-break-after: avoid;
    }
    
    /* Add page breaks between major sections if needed */
    .projects {
        page-break-before: auto;
    }
    
    .notes {
        page-break-before: auto;
    }
    
    /* Prevent items from breaking across pages */
    .todoItem,
    .note-project-item {
        page-break-inside: avoid;
        margin-bottom: 8pt;
    }
    
    /* Show all content (even collapsed items) */
    .note-project-item.collapsed .note-project-status {
        display: block !important;
    }
    
    /* Clean up spacing */
    * {
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }
    
    /* Keep indentation visible */
    .todoItem {
        margin-left: inherit !important;
    }
}