/* =========================
   NOTES SIDEBAR BASE (UPGRADED)
========================= */

#notes-sidebar {
    position: fixed;
    top: 0;
    right: -660px;
    width: min(630px, 92vw);
    height: 100vh;

    background:
        linear-gradient(180deg, rgba(22, 30, 39, 0.96), rgba(17, 24, 31, 0.98)),
        #11181f;
    backdrop-filter: blur(12px);

    color: #f7fafc;
    padding: 18px 18px calc(96px + env(safe-area-inset-bottom));
    overflow-y: auto;

    transition: right 0.35s ease;
    z-index: 1000002;

/*    box-shadow: -16px 0 36px rgba(2, 8, 23, 0.38);  */
    border-left: 1px solid rgba(148, 163, 184, 0.22);
    contain: layout paint;
}

/* open sidebar */
#notes-sidebar.active {
    right: 0;
}

/* =========================
   HEADER
========================= */

#notes-sidebar h3 {
    margin: 0;
    color: #f8fafc;
    font-size: 17px;
    font-weight: 700;
    letter-spacing: 0;
}

.notes-header {
    position: sticky;
    top: -18px;
    z-index: 2;
    margin: -18px -18px 14px;
    padding: 14px 18px !important;
    background: rgba(15, 23, 31, 0.96);
    border-bottom: 1px solid rgba(148, 163, 184, 0.22) !important;
    box-shadow: 0 8px 20px rgba(2, 8, 23, 0.18);
}

/* =========================
   NOTE LIST ITEM
========================= */

.note-item {
    margin-bottom: 10px;
}

/* =========================
   NOTE CARD (UPGRADED)
========================= */

.note-card {
    position: relative;
    background: #f8fafc;
    color: #1f2937;

    padding: 12px 12px 10px;
    border-radius: 8px;

    font-size: 13px;
    font-family: "Baloo 2";
    border: 1px solid rgba(203, 213, 225, 0.92);
    box-shadow: 0 8px 18px rgba(2, 8, 23, 0.18);
    transition: transform 0.15s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.note-card:hover {
    transform: translateY(-2px);
    border-color: rgba(14, 165, 233, 0.45);
    box-shadow: 0 12px 24px rgba(2, 8, 23, 0.24);
}

/* =========================
   NOTE CONTENT
========================= */

.note-post {
    display: inline-flex;
    align-items: center;
    max-width: 100%;
    margin-bottom: 8px;
    padding: 3px 8px;
    border-radius: 999px;
    background: #e0f2fe;
    color: #075985;
    font-size: 11px;
    font-weight: 700;
    line-height: 1.35;
}

.note-text {
    color: #374151;
    font-size: 14px;
    line-height: 1.58;
    font-weight: 500;
    white-space: normal;
    overflow-wrap: anywhere;
}

.note-separator {
    height: 1px;
    margin: 11px 0;
    border: 0;
    background: linear-gradient(90deg, transparent, #cbd5e1, transparent);
}

.note-page-highlight {
    padding: 1px 3px;
    border-radius: 3px;
    background: #fff176;
    color: inherit;
    box-decoration-break: clone;
    -webkit-box-decoration-break: clone;
}

::highlight(note-page-highlight) {
    background: #fff176;
    color: inherit;
}

/* =========================
   DELETE BUTTON (UPGRADED)
========================= */

.delete-note-btn {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;

    padding: 6px 9px;
    margin-top: 10px;

    border-radius: 7px;
    cursor: pointer;

    font-size: 12px;
    font-weight: 700;

    transition: background-color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.delete-note-btn:hover {
    background: #fecaca;
    border-color: #fca5a5;
    transform: translateY(-1px);
}

.notes-sidebar-more-wrap {
    display: flex;
    justify-content: center;
    padding: 6px 0 2px;
}

.notes-sidebar-more-btn {
    width: 100%;
    min-height: 40px;
    padding: 9px 14px;
    border: 1px solid rgba(125, 211, 252, 0.3);
    border-radius: 8px;
    background: #0ea5e9;
    color: #ffffff;
    cursor: pointer;
    font-size: 13px;
    font-weight: 800;
    line-height: 1.2;
    box-shadow: 0 8px 16px rgba(14, 165, 233, 0.2);
    transition: background-color 0.2s ease, transform 0.2s ease, opacity 0.2s ease;
}

.notes-sidebar-more-btn:hover {
    background: #0284c7;
    transform: translateY(-1px);
}

.notes-sidebar-more-btn:disabled {
    cursor: wait;
    opacity: 0.72;
    transform: none;
}

#export-notes-btn {
    background: #0f766e !important;
    color: #fff;
    border: 1px solid rgba(94, 234, 212, 0.35) !important;
    border-radius: 7px !important;
    box-shadow: 0 6px 14px rgba(15, 118, 110, 0.22);
    font-weight: 700;
}

#export-notes-btn:hover {
    background: #115e59 !important;
}

/* =========================
   TOGGLE BUTTON
========================= */

#notes-toggle-btn {
    position: fixed;
    bottom: 25px;
    right: 25px;
    padding: 12px 18px;
    background: linear-gradient(135deg, #b45309, #f97316);
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    border-radius: 50px;
    cursor: pointer;
    box-shadow: 0 10px 25px rgba(0,0,0,0.25);
    transition: all 0.25s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    user-select: none;
    min-width: 104px;
    min-height: 48px;
    contain: layout paint;
    z-index: 99999;
}

#notes-toggle-btn:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 15px 30px rgba(0,0,0,0.35);
}

#notes-toggle-btn:active {
    transform: scale(0.95);
}

/* =========================
   OVERLAY
========================= */

#notes-overlay {
    position: fixed;
    top: 0;
    left: 0;

    width: 100%;
    height: 100%;

    background: rgba(2, 8, 23, 0.5);
    backdrop-filter: blur(2px);

    z-index: 1000001;
    display: none;
}

/* =========================
   SCROLLBAR (optional but nice)
========================= */

#notes-sidebar::-webkit-scrollbar {
    width: 6px;
}

#notes-sidebar::-webkit-scrollbar-thumb {
    background: #64748b;
    border-radius: 10px;
}

#notes-sidebar::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

#notes-toggle-btn.hidden {
    opacity: 0;
    pointer-events: none;
    transform: translateY(8px);
}



