/* ── Keeper / MERN Notes — scoped to .notes-app ── */

.notes-app {
    --note-accent: var(--color-accent, #ff8c00);
    --note-surface: var(--color-bg-elevated, #111113);
    --note-border: var(--color-border, rgba(255, 255, 255, 0.07));
}

.notes-app .notes-container {
    min-height: auto;
}

.notes-app header.notes-app-header {
    display: block;
    position: relative;
    background: linear-gradient(135deg, rgba(255, 140, 0, 0.16), rgba(17, 17, 19, 0.95));
    border: 1px solid rgba(255, 140, 0, 0.25);
    border-radius: var(--radius-lg, 14px);
    padding: 1rem 1.25rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-sm);
    height: auto;
}

.notes-app .notes-per-page-input__label {
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--color-text-muted);
    font-family: var(--font-mono);
}

.notes-app header.notes-app-header h1,
.notes-app header.notes-app-header h3,
.notes-app .notes-app-header__title {
    color: var(--color-text, #fafafa);
    font-family: var(--font-sans);
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: -0.02em;
    margin: 0;
}

.notes-app .notespage-header {
    color: var(--color-text);
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    flex-wrap: wrap;
    margin: 0;
}

.notes-app .notes-title-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.notes-app .counter-active-users {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(34, 197, 94, 0.12);
    color: #16a34a !important;
    border: 1px solid rgba(3, 241, 90, 0.25) !important;
    border-radius: 999px;
    padding: 0.75rem 0.75rem;
    font-family: var(--font-mono);
    
}

.notes-app .counter-active-users .counter-value {
    font-weight: 700;
    color:#22c55e;
}



.notes-app .notes-per-page-input {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    margin-left: auto;
}

.notes-app .notes-app-header__eyebrow {
    margin: 0 0 0.25rem;
    font-family: var(--font-mono);
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    color: rgba(255, 255, 255, 0.7);
}

.notes-app .notes-per-page-input {
    display: flex;
    align-items: center;
    gap: 0.625rem;
}

.notes-app .notes-per-page-input h2 {
    margin: 0;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--color-text-muted);
    font-family: var(--font-mono);
}

.notes-app .notes-info {
    position: relative;
    bottom: auto;
    margin-top: 0.75rem;
}

.notes-app .note,
.notes-app .skeleton-note {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: fit-content;
    max-height: 220px;
    min-height: 140px;
    overflow: hidden;
    background: linear-gradient(145deg, rgba(17, 17, 19, 0.96), rgba(28, 28, 31, 0.9));
    border-radius: var(--radius-md, 10px);
    border: 1px solid var(--note-border);
    position: relative;
    padding: 1rem;
    width: 100%;
    max-width: 340px;
    margin: 0;
    float: none;
    transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: var(--shadow-sm, 0 1px 2px rgba(0, 0, 0, 0.4));
}

.notes-app .note:hover {
    transform: translateY(-2px);
    border-color: rgba(255, 140, 0, 0.35);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

.notes-app .note__top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
}

.notes-app .note h1,
.notes-app .skeleton-title {
    font-size: 0.9375rem;
    font-weight: 600;
    margin: 0 0 0.375rem;
    overflow: hidden;
    width: 90%;
    color: var(--color-text);
}

.notes-app .form {
    position: relative;
    width: 100%;
    max-width: 620px;
    margin: 0 auto 1.5rem;
    background: linear-gradient(145deg, rgba(17, 17, 19, 0.96), rgba(28, 28, 31, 0.9));
    padding: 1rem 1.25rem 2.5rem;
    border-radius: var(--radius-lg, 14px);
    border: 1px solid var(--note-border);
    box-shadow: var(--shadow-sm);
}

.notes-app .form__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.75rem;
}

.notes-app .form__eyebrow {
    margin: 0 0 0.2rem;
    font-family: var(--font-mono);
    font-size: 0.7rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--color-accent);
}

.notes-app .form__header h2 {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    color: var(--color-text);
}

.notes-app .form__status {
    font-size: 0.75rem;
    font-family: var(--font-mono);
    color: var(--color-text-muted);
}

.notes-app .form input,
.notes-app .form textarea {
    width: 100%;
    border: none;
    padding: 0.375rem 0;
    outline: none;
    font-size: 1rem;
    font-family: inherit;
    resize: none;
    background: transparent;
    color: var(--color-text);
}

.notes-app .form input::placeholder,
.notes-app .form textarea::placeholder {
    color: var(--color-text-muted);
}

.notes-app .form button,
.notes-app .form .MuiFab-root {
    position: absolute;
    right: 1rem;
    bottom: -1.25rem;
    background: var(--note-accent) !important;
    color: var(--color-bg) !important;
    border: none;
    box-shadow: var(--shadow-md);
}

.notes-app .note-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-top: auto;
}

.notes-app .note-delete {
    position: relative;
    float: none;
    margin-left: auto;
    color: var(--color-text-muted);
    border: none;
    width: 36px;
    height: 36px;
    cursor: pointer;
    outline: none;
    background-color: transparent;
    border-radius: var(--radius-sm);
    transition: color 0.2s ease, transform 0.2s ease;
}

.notes-app .note-delete svg {
    position: relative;
    bottom: 7px;
}

.notes-app .note-delete:hover {
    transform: scale(1.05);
    color: #f87171;
    border-color: rgba(248, 113, 113, 0.4);
}

.notes-app .note .time-stamp {
    font-size: 0.6875rem;
    font-family: var(--font-mono);
    color: var(--color-text-muted);
    position: static;
    margin: 0;
}

.notes-app .note p,
.notes-app .skeleton-content {
    font-size: 0.8125rem;
    margin-bottom: 1.5rem;
    white-space: pre-wrap;
    word-wrap: break-word;
    color: var(--color-text-secondary);
}

.notes-app .notes-list-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    padding-bottom: 2rem;
}

.notes-app .pagination {
    display: flex;
    justify-content: center;
    gap: 0.375rem;
    position: relative;
    bottom: auto;
    left: auto;
    transform: none;
    margin-top: 0.5rem;
}

.notes-app .pagination button {
    margin: 0;
    padding: 0.375rem 0.625rem;
    border: 1px solid var(--note-border);
    background: var(--note-surface);
    color: var(--color-text-secondary);
    font-family: var(--font-mono);
    font-size: 0.75rem;
    cursor: pointer;
    min-width: 2rem;
    border-radius: var(--radius-sm, 6px);
    display: flex;
    justify-content: center;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.notes-app .pagination button:hover {
    border-color: var(--color-border-strong);
    color: var(--color-text);
}

.notes-app .pagination button.active {
    background: var(--note-accent);
    border-color: var(--note-accent);
    color: var(--color-bg);
    transform: none;
    border-radius: var(--radius-sm, 6px);
}

.notes-app .note-content {
    position: relative;
    max-height: 90px;
    overflow-y: auto;
    width: 100%;
    margin: 0 0 1rem;
    line-height: 1.6;
}

.notes-app .notes-display,
.notes-app .skeleton {
    justify-content: center;
    display: flex;
    position: relative;
    top: 0;
    flex-wrap: wrap;
    overflow-y: auto;
    max-height: none;
    resize: none;
    gap: 1rem;
    width: 100%;
    padding: 0.5rem 0;
}

.notes-app .note-read {
    position: absolute;
    right: 0.75rem;
    top: 0.75rem;
    left: auto;
    color: var(--color-text-muted);
    width: auto;
    height: auto;
    cursor: pointer;
    background-color: transparent;
    border: none;
    font-size: 0.6875rem;
    font-family: var(--font-mono);
}

.notes-app .note-read:hover {
    transform: scale(1.05);
    color: #22c55e;
}

.notes-app .popup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: var(--color-bg-elevated);
    padding: 2rem;
    border: 1px solid var(--note-border);
    border-radius: var(--radius-lg, 14px);
    box-shadow: var(--shadow-md);
    z-index: 9999;
    min-width: min(90vw, 560px);
    max-width: 90vw;
    min-height: auto;
    max-height: 80vh;
    resize: none;
    overflow-y: auto;
    animation: note-popup-in 0.25s ease-out;
    color: var(--color-text);
}

@keyframes note-popup-in {
    0% {
        opacity: 0;
        transform: translate(-50%, -48%) scale(0.97);
    }
    100% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

.notes-app .show-note-close-icon {
    position: absolute;
    top: 1rem;
    right: 1rem;
    outline: none;
    width: 2rem;
    height: 2rem;
    border: 1px solid var(--note-border);
    border-radius: var(--radius-sm, 6px);
    background: transparent;
    color: var(--color-text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.notes-app .show-note-close-icon:hover {
    border-color: rgba(248, 113, 113, 0.5);
    color: #f87171;
    background: rgba(248, 113, 113, 0.08);
}

.notes-app .popup h1 {
    position: relative;
    top: auto;
    left: auto;
    font-size: 1.25rem;
    margin: 0 0 1rem;
    padding-right: 2.5rem;
}

.notes-app .popup label {
    font-size: 0.875rem;
    color: var(--color-text-secondary);
}

.notes-app .popup input,
.notes-app .popup textarea {
    width: 100%;
    padding: 0.625rem 0.75rem;
    font-size: 0.9375rem;
    border: 1px solid var(--note-border);
    border-radius: var(--radius-sm, 6px);
    margin-bottom: 1rem;
    margin-top: 0.375rem;
    background: var(--color-bg);
    color: var(--color-text);
    font-family: inherit;
}

.notes-app .popup textarea {
    resize: vertical;
    min-height: 100px;
}

.notes-app .popup-buttons {
    display: flex;
    justify-content: flex-end;
    gap: 0.625rem;
    margin-top: 1rem;
}

.notes-app .save-button {
    position: absolute;
    cursor: pointer;
    border-radius: var(--radius-sm, 6px);
    top: 1rem;
    right: 3.5rem;
    outline: none;
    border: 1px solid var(--note-accent);
    background: rgba(255, 140, 0, 0.12);
    color: var(--note-accent);
    padding: 0.375rem 0.75rem;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    animation: none;
}

.notes-app .save-button:hover {
    background: var(--note-accent);
    color: var(--color-bg);
    transform: none;
    box-shadow: none;
}

.notes-app .dashboard {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    padding: 0 0 1.25rem;
    justify-content: center;
}

.notes-app .counter {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    border: 1px solid var(--note-border);
    border-radius: var(--radius-md, 10px);
    background: var(--note-surface);
}

.notes-app .counter-label {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--color-text-muted);
}

.notes-app .counter-value {
    position: relative;
    left: auto;
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--note-accent);
    font-family: var(--font-mono);
}

.notes-app .skeleton-note {
    height: 140px;
    background: linear-gradient(
        90deg,
        var(--note-surface) 0%,
        rgba(255, 140, 0, 0.08) 50%,
        var(--note-surface) 100%
    );
    background-size: 200% 100%;
    animation: note-shimmer 1.8s ease-in-out infinite;
}

@keyframes note-shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.notes-app .skeleton-title,
.notes-app .skeleton-content {
    background-color: rgba(255, 255, 255, 0.06);
    border-radius: 4px;
}

.notes-app .dropdown {
    padding: 0.375rem 0.625rem;
    font-size: 0.8125rem;
    font-family: var(--font-mono);
    border: 1px solid var(--note-border);
    border-radius: var(--radius-sm, 6px);
    background: var(--color-bg);
    color: var(--color-text);
    cursor: pointer;
    outline: none;
}

.notes-app .dropdown option {
    background: var(--color-bg-elevated);
}

@media (max-width: 768px) {
    .notes-app .notespage-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .notes-app .note {
        max-width: 100%;
    }

    .notes-app .form {
        max-width: 100%;
    }
}
