[v-cloak] {
    display: none !important;
}

/* Notes Module Specific Styles */

.note-title-input {
    width: 100%;
    border: none;
    background: transparent;
    font-size: 1.75rem;
    font-weight: 900;
    color: #0f172a;
    padding: 0;
    margin-bottom: 5px;
    letter-spacing: -0.5px;
    outline: none;
    transition: var(--transition-smooth);
}

.note-title-input:focus {
    color: var(--accent-primary);
}

.note-item i {
    color: #10b981 !important;
    /* Green for notes */
}

.note-item.active {
    border-color: #10b981 !important;
    color: #047857 !important;
}

.note-item.active i {
    color: #047857 !important;
}

/* QUILL EDITOR CUSTOMIZATION */
#note-editor-container {
    border: none !important;
    font-family: 'Roboto', sans-serif;
    font-size: 1rem;
    line-height: 1.6;
    height: 100%;
}

.ql-toolbar.ql-snow {
    border: none !important;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05) !important;
    padding: 12px 24px !important;
    background: #f8fafc;
}

.ql-container.ql-snow {
    border: none !important;
}

.ql-editor {
    padding: 30px 40px !important;
    min-height: 100%;
    color: #334155;
}

.ql-editor h1,
.ql-editor h2,
.ql-editor h3 {
    font-weight: 800;
    color: #0f172a;
    margin-top: 1.5em;
    margin-bottom: 0.5em;
}

.ql-editor p {
    margin-bottom: 1em;
}

/* Checklist Styling */
.ql-editor li[data-list="checked"]>.ql-ui:before {
    color: #10b981 !important;
}

.ql-editor li[data-list="checked"]>.ql-ui:before,
.ql-editor li[data-list="unchecked"]>.ql-ui:before {
    opacity: 0;
}

.ql-editor li[data-list="checked"] {
    text-decoration: line-through;
    color: #94a3b8;
}

/* =========================================
   CHECKLIST (To-Do) — Redesigned
   ========================================= */

/* Reset Quill default list indent */
.ql-editor li[data-list="checked"],
.ql-editor li[data-list="unchecked"] {
    list-style: none;
    padding: 5px 4px 5px 0;
    line-height: 1.6;
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

/* Checkbox icon với kích thước lớn, dễ bấm */
.ql-editor li[data-list="checked"]>.ql-ui,
.ql-editor li[data-list="unchecked"]>.ql-ui {
    flex-shrink: 0;
    width: 22px;
    height: 22px;
    min-width: 22px;
    border-radius: 6px;
    border: 2px solid #cbd5e1;
    background: #fff;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0;
    /* Ẩn ký tự Quill mặc định */
    position: relative;
    transition: all .15s;
    margin-top: 2px;
}

/* Trạng thái unchecked hover */
.ql-editor li[data-list="unchecked"]>.ql-ui:hover {
    border-color: #10b981;
    background: #f0fdf4;
}

/* Trạng thái checked */
.ql-editor li[data-list="checked"]>.ql-ui {
    border-color: #10b981 !important;
    background: #10b981 !important;
}

/* Dấu tick khi checked */
.ql-editor li[data-list="checked"]>.ql-ui::after {
    content: '';
    width: 12px;
    height: 7px;
    border-left: 2.5px solid #fff;
    border-bottom: 2.5px solid #fff;
    transform: rotate(-45deg) translate(1px, -1px);
    display: block;
}

/* Text gạch ngang khi checked */
.ql-editor li[data-list="checked"]>span:last-child {
    text-decoration: line-through;
    color: #94a3b8;
}

/* Image scaling in notes */
.ql-editor img {
    max-width: 100%;
    border-radius: 12px;
    margin: 20px 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

/* YouTube Embed Container */
.video-container {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    max-width: 100%;
    border-radius: 16px;
    margin: 20px 0;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

/* YouTube iframe size override */
.ql-editor iframe {
    width: 100% !important;
    height: 450px !important;
    border-radius: 12px;
    margin: 16px 0;
}

/* Mobile toggle hiển thị trong top-bar của trang Note luôn flex */
.top-bar .mobile-toggle {
    display: flex !important;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 1.4rem;
    background: none;
    border: none;
    color: var(--text-main, #1e293b);
    cursor: pointer;
    padding: 5px 8px;
    border-radius: 8px;
}

.top-bar .mobile-toggle:hover {
    background: rgba(0, 0, 0, 0.05);
}

/* Banner thông báo ghi chú đang public */
.published-banner {
    background: linear-gradient(135deg, #eff6ff, #f0fdf4);
    border: 1px solid #bbf7d0;
    border-radius: 12px;
    font-size: 0.83rem;
    color: #065f46;
    padding: 8px 16px;
}

/* =========================================
   CHECKLIST (To-Do) - Kích thước lớn hơn
   ========================================= */
.ql-editor li[data-list="checked"]>.ql-ui,
.ql-editor li[data-list="unchecked"]>.ql-ui {
    font-size: 1.35rem !important;
    cursor: pointer;
    margin-right: 8px;
    vertical-align: middle;
    line-height: 1;
    padding: 2px;
    min-width: 24px;
    min-height: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.ql-editor li[data-list] {
    padding: 4px 0;
    line-height: 1.7;
}

/* =========================================
   OG LINK PREVIEW PANEL
   ========================================= */
.link-preview-panel {
    display: none;
    padding: 12px 16px 4px;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    background: #f8fafc;
}

.link-preview-panel-label {
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    color: #94a3b8;
    letter-spacing: .06em;
    margin-bottom: 8px;
}

/* OG Card */
.og-card {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 10px;
    margin-bottom: 8px;
    text-decoration: none !important;
    color: inherit;
    transition: box-shadow .15s, transform .15s;
    overflow: hidden;
}

.og-card:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, .08);
    transform: translateY(-1px);
}

.og-card-img {
    flex-shrink: 0;
    width: 70px;
    height: 70px;
    border-radius: 8px;
    overflow: hidden;
    background: #f1f5f9;
}

.og-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: 0;
    margin: 0;
    box-shadow: none;
}

.og-card-body {
    flex: 1;
    min-width: 0;
}

.og-card-domain {
    font-size: .68rem;
    color: #94a3b8;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 3px;
}

.og-card-title {
    font-size: .85rem;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.3;
    margin-bottom: 3px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.og-card-desc {
    font-size: .75rem;
    color: #64748b;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Skeleton loading */
.og-card-skeleton {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 10px;
    margin-bottom: 8px;
    overflow: hidden;
}

.og-sk-img {
    flex-shrink: 0;
    width: 70px;
    height: 70px;
    border-radius: 8px;
    background: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 50%, #f1f5f9 75%);
    background-size: 200% 100%;
    animation: og-shimmer 1.3s infinite;
}

.og-sk-body {
    flex: 1;
}

.og-sk-line {
    height: 10px;
    background: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 50%, #f1f5f9 75%);
    background-size: 200% 100%;
    animation: og-shimmer 1.3s infinite;
    border-radius: 6px;
    margin-bottom: 7px;
}

.og-sk-line.w60 {
    width: 60%;
}

.og-sk-line.w90 {
    width: 90%;
}

.og-sk-line.w40 {
    width: 40%;
}

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

    100% {
        background-position: -200% 0;
    }
}