/* =====================
   BOARD ITEMS
   ===================== */
.board-item {
    position: absolute;
    cursor: pointer;
    transition: transform 0.25s ease, box-shadow 0.25s ease, z-index 0s;
    touch-action: none;
    user-select: none;
    -webkit-user-select: none;
    -webkit-touch-callout: none;
}

.board-canvas,
.board-canvas * {
    -webkit-touch-callout: none;
}

.board-item img,
.board-item picture,
.board-item svg,
.board-item span,
.board-item p {
    user-select: none;
    -webkit-user-select: none;
    -webkit-user-drag: none;
}

.board-item img,
.board-item picture {
    pointer-events: none;
}

.board-item:hover {
    z-index: calc(var(--item-z-index, 1) + 10) !important;
    filter: brightness(1.02);
}

.premium-board-preview {
    outline: 1.5px dashed rgba(168, 85, 247, 0.75);
    outline-offset: 5px;
}

.premium-board-preview-badge {
    position: absolute;
    right: -8px;
    bottom: -18px;
    z-index: 20;
    padding: 3px 6px;
    border: 1px solid #d8b4fe;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.96);
    color: #7e22ce;
    font-family: var(--font-ui);
    font-size: 0.58rem;
    font-weight: 700;
    line-height: 1;
    white-space: nowrap;
    pointer-events: none;
}

.premium-board-item-badge {
    position: absolute;
    right: -8px;
    bottom: -8px;
    z-index: 20;
    width: 18px;
    height: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(192, 132, 252, 0.38);
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    color: #a855f7;
    -webkit-text-stroke: 0.6px #7c3aed;
    font-family: var(--font-ui);
    font-size: 0.95rem;
    line-height: 1;
    pointer-events: none;
    box-shadow: 0 2px 8px rgba(126, 34, 206, 0.14);
}

/* Sticky note */
.item-sticky {
    width: 110px !important;
    height: 110px !important;
    max-width: 110px !important;
    max-height: 110px !important;
    box-sizing: border-box !important;
    padding: 14px 12px;
    font-family: var(--font-hand);
    font-size: 0.95rem;
    line-height: 1.3;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    word-break: break-word;
    overflow: hidden;
    box-shadow: none;
    border: none;
    background: transparent;
    z-index: 1;
}

.item-sticky::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: url('../Component/sticky note.png');
    background-size: 100% 100%;
    background-repeat: no-repeat;
    z-index: -1;
    transition: filter var(--t);
}

.item-sticky.yellow::before {
    filter: none;
}

.item-sticky.pink::before {
    filter: hue-rotate(-65deg) saturate(1.4) brightness(1.05);
}

.item-sticky.blue::before {
    filter: hue-rotate(145deg) saturate(1.4) brightness(1.05);
}

/* Masking tape note */
.item-tape {
    width: 140px;
    height: 70px;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background-image: url('../Component/masking tape.png');
    background-size: 100% 100%;
    background-repeat: no-repeat;
    background-color: transparent;
    font-family: var(--font-hand);
    font-size: 0.9rem;
    line-height: 1.2;
    word-break: break-word;
    box-shadow: none;
    border: none;
}

/* Plain text note */
.item-plain-text {
    width: 130px;
    min-height: 34px;
    padding: 2px 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    box-shadow: none;
    color: #000;
    font-family: var(--font-hand), monospace;
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.2;
    word-break: break-word;
}

.item-plain-text .item-note-text {
    display: block;
    width: 100%;
}

/* CD / Vinyl Player & Disc */
.item-cd-wrap {
    display: inline-block;
}

.item-vinyl-player {
    width: 88px;
    height: 88px;
    position: relative;
    display: inline-block;
    vertical-align: middle;
    --vinyl-left: 18%;
    --vinyl-top: 19%;
    --vinyl-size: 54%;
}

.vinyl-player-img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: contain;
    pointer-events: none;
}

.vinyl-record-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    display: block;
    object-fit: contain;
    pointer-events: none;
}

.rotating-vinyl {
    animation: rotateVinyl 4s linear infinite;
    transform-origin: center center;
}

@keyframes rotateVinyl {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}


/* Large Vinyl Player for Timeline and Inbox */
.item-vinyl-player.large-vinyl-player {
    width: 150px;
    height: 150px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.large-vinyl-player .cd-tl-overlay {
    color: rgba(255, 255, 255, 0.9) !important;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8) !important;
    z-index: 5;
    pointer-events: none;
}

/* Decoration */
.item-decor {
    font-size: 1.8rem;
    line-height: 1;
    background: none !important;
    box-shadow: none !important;
    filter: drop-shadow(1px 2px 4px rgba(0, 0, 0, 0.18));
}

.item-decor:hover {
    filter: drop-shadow(2px 4px 6px rgba(0, 0, 0, 0.25)) !important;
}

/* =====================
   FOLDER & CONTAINER ITEMS
   ===================== */
.item-folder {
    width: 80px;
    height: 112px;
    position: absolute;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    cursor: default;
    user-select: none;
    transition: transform var(--t);
}

.board-canvas.edit-active .item-folder {
    cursor: pointer;
}

.board-canvas.edit-active .item-folder:hover {
    transform: scale(1.05) rotate(1deg);
}

/* Visual graphical box for containers */
.folder-visual {
    width: 80px;
    height: 80px;
    position: relative;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
    transition: box-shadow var(--t);
}

.item-folder:hover .folder-visual {
    box-shadow: 0 6px 14px rgba(0,0,0,0.22);
}

/* Manila Folder skin */
.folder-visual.skin-folder {
    background: linear-gradient(135deg, #f7dfaf 0%, #ecd099 100%);
    border: 1.5px solid #d4b882;
    border-radius: 4px 10px 10px 10px;
}

/* Manila Folder tab */
.folder-visual.skin-folder::before {
    content: '';
    position: absolute;
    top: -8px;
    left: 0;
    width: 38px;
    height: 8px;
    background: #f7dfaf;
    border-top: 1.5px solid #d4b882;
    border-left: 1.5px solid #d4b882;
    border-right: 1.5px solid #d4b882;
    border-radius: 5px 5px 0 0;
}

/* Jeans Pocket & Files skin */
.folder-visual.skin-pocket,
.folder-visual.skin-file {
    background: transparent;
    border: none;
    box-shadow: none;
}

/* Highlighted sticker label under object */
.folder-label-block {
    margin-top: 5px;
    padding: 4px 9px 5px;
    font-family: var(--font-serif);
    font-size: 0.72rem;
    font-weight: 400;
    color: var(--text-primary);
    text-align: center;
    border: 1.5px solid #dac8e8;
    border-radius: 999px;
    background: #f8f5fb;
    max-width: 112px;
    min-width: 54px;
    box-sizing: border-box;
    word-break: break-word;
    box-shadow: none;
    transform: none;
    transition: transform var(--t);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.board-canvas.edit-active .item-folder:hover .folder-label-block {
    transform: scale(1.03);
}

/* Container hover highlight on drag-over ingestion */
.item-folder.drag-over-receive .folder-visual {
    box-shadow: 0 0 0 3px #7c3aed, 0 8px 20px rgba(124, 58, 237, 0.4);
    outline: 3px solid #7c3aed;
    outline-offset: 2px;
    transform: scale(1.08);
}

.item-folder.drag-over-receive .folder-visual img {
    opacity: 0.85;
}

.item-folder.drag-over-receive .folder-label-block {
    transform: rotate(0deg) scale(1.04);
    background-color: rgba(124, 58, 237, 0.15) !important;
    border-left: 3px solid #7c3aed !important;
    color: #7c3aed;
}

/* Folder capacity colors */
#folder-detail-count {
    transition: color var(--t);
}

#folder-detail-count.warning {
    color: #f97316 !important;
    font-weight: 400;
}

#folder-detail-count.danger {
    color: #ef4444 !important;
    font-weight: 400;
}

/* Folder Notification Count Badge */
.folder-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #ffffff;
    color: #4b5563;
    font-family: var(--font-hand), monospace;
    font-size: 0.58rem;
    font-weight: 400;
    min-width: 26px;
    height: 14px;
    border-radius: 7px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    border: 1px solid #d1d5db;
    box-shadow: 0 2px 5px rgba(0,0,0,0.08);
    z-index: 5;
    white-space: nowrap;
}

.peek-card-music {
    box-sizing: border-box;
}

.peek-music-row {
    display: flex;
    align-items: center;
    gap: 3px;
    width: 100%;
    min-width: 0;
}

.peek-music-play {
    color: #9aa4b2;
    font-size: 0.42rem;
    line-height: 1;
}

.peek-music-wave {
    display: flex;
    align-items: center;
    gap: 1px;
    flex: 1;
    min-width: 0;
}

.peek-music-wave i {
    display: block;
    width: 2px;
    border-radius: 999px;
    background: #9aa4b2;
}

.peek-music-wave i:nth-child(1) { height: 7px; }
.peek-music-wave i:nth-child(2) { height: 12px; }
.peek-music-wave i:nth-child(3) { height: 16px; background: #69b6e8; }
.peek-music-wave i:nth-child(4) { height: 10px; }
.peek-music-wave i:nth-child(5) { height: 6px; }

.peek-music-title {
    width: 100%;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    color: #1f2937;
    font-family: var(--font-sans);
    font-size: 0.34rem;
    font-weight: 700;
    line-height: 1.05;
}

.folder-detail-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    width: 100%;
    margin-bottom: 12px;
}

.folder-detail-heading {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
}

.folder-detail-heading #folder-detail-title {
    margin: 0;
    font-family: var(--font-hand), monospace;
    font-size: 1.2rem;
    font-weight: 400;
}

#folder-detail-count {
    color: #777;
    font-family: var(--font-sans);
    font-size: 0.75rem;
}

.folder-detail-close {
    padding: 4px;
    border: 0;
    background: transparent;
    cursor: pointer;
}

.folder-detail-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    width: 100%;
    margin-bottom: 4px;
}

.folder-detail-tab {
    min-height: 42px;
    border: 1.5px solid #d9b8ff;
    border-radius: 8px;
    background: #fff;
    color: var(--text-primary);
    font-family: var(--font-sans);
    font-size: 0.88rem;
    font-weight: 700;
    cursor: pointer;
    transition: background-color 160ms ease, border-color 160ms ease;
}

.folder-detail-tab.active {
    border-color: #a855f7;
    background: #f7eeff;
    color: #7e22ce;
}

.folder-detail-tab:active {
    background: #f7eeff;
}

.collection-title-row {
    display: flex;
    align-items: center;
    gap: 5px;
    min-width: 0;
}

.collection-title-row h2 {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

#folder-rename-input {
    width: min(210px, 55vw);
    min-width: 0;
    padding: 4px 7px;
    border: 1.5px solid var(--border-light);
    border-radius: 6px;
    color: var(--text-primary);
    background: white;
    font-family: var(--font-hand);
    font-size: 1.05rem;
    outline: none;
}

#folder-rename-input:focus {
    border-color: #c084fc;
}

.collection-title-edit-btn {
    width: 25px;
    height: 25px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    border: none;
    border-radius: 6px;
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
}

.collection-title-edit-btn:hover {
    background: var(--bg-soft);
    color: var(--text-primary);
}

/* Folder Details items style (Horizontal Slider Carousel) */
.folder-contents-list {
    display: flex;
    flex-direction: row;
    gap: 14px;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 12px 4px 16px;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    width: 100%;
    box-sizing: border-box;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none;  /* IE and Edge */
}

.folder-contents-list::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Opera */
}

.folder-contents-dots {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    width: 100%;
    min-height: 16px;
    margin: 0 0 6px;
}

.folder-contents-dot {
    width: 7px;
    height: 7px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: #d6d3dc;
    cursor: pointer;
    transition: width 160ms ease, background-color 160ms ease;
}

.folder-contents-dot.active {
    width: 18px;
    border-radius: 999px;
    background: #8b5cf6;
}

/* Folder Organizer (Add from Board) Styling */
.folder-organizer-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 150px;
    overflow-y: auto;
    padding-right: 4px;
    scrollbar-width: thin;
}

.folder-organizer-section {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
    padding-top: 12px;
}

.folder-organizer-note {
    margin: 2px 0 4px;
    color: #777;
    font-family: var(--font-sans);
    font-size: 0.78rem;
    line-height: 1.35;
    text-align: center;
}

.organizer-item-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #f9fafb;
    padding: 8px 12px;
    border-radius: 10px;
    border: 1px solid #f3f4f6;
    transition: transform var(--t), box-shadow var(--t), background var(--t);
}

.organizer-item-row:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.04);
    background: #f3f4f6;
}

.organizer-item-preview {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    min-width: 0;
}

.organizer-preview-badge {
    width: 24px;
    height: 24px;
    border-radius: 6px;
    flex-shrink: 0;
    overflow: hidden;
}

.organizer-preview-text {
    font-size: 0.8rem;
    font-family: 'DM Sans', sans-serif;
    color: #374151;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
}

.organizer-item-add-btn {
    background: #7c3aed;
    color: white;
    border: none;
    padding: 5px 10px;
    border-radius: 8px;
    font-size: 0.72rem;
    font-weight: 600;
    cursor: pointer;
    font-family: 'DM Sans', sans-serif;
    transition: background var(--t), transform var(--t);
}

.organizer-item-add-btn:hover {
    background: #6d28d9;
    transform: scale(1.05);
}

.organizer-item-add-btn:active {
    transform: scale(0.98);
}

.folder-contents-list > p {
    width: 100%;
    text-align: center;
    flex-shrink: 0;
    margin: 12px 0;
}

.folder-contents-list .inner-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 12px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.06);
    display: flex;
    flex-direction: column;
    gap: 6px;
    position: relative;
    width: 160px;
    height: 140px;
    flex: 0 0 160px;
    box-sizing: border-box;
    scroll-snap-align: start;
    overflow: hidden;
}

.folder-contents-list .inner-card.inner-message {
    border-left: 4px solid #7c3aed;
}

.folder-contents-list .inner-card.inner-picture {
    border-left: 4px solid #3b82f6;
    padding: 6px;
}

.folder-contents-list .inner-card.inner-picture img {
    width: 100%;
    height: 95px;
    object-fit: cover;
    border-radius: 6px;
}

.folder-contents-list .inner-card .inner-text {
    font-size: 0.72rem;
    color: #334155;
    line-height: 1.35;
    word-break: break-word;
    display: -webkit-box;
    -webkit-line-clamp: 5;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.folder-contents-list .inner-card .inner-meta {
    font-size: 0.6rem;
    color: #64748b;
    margin-top: auto;
    display: flex;
    justify-content: space-between;
}

.folder-contents-list .inner-card .btn-delete-inner {
    position: absolute;
    top: 4px;
    right: 4px;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    color: #ef4444;
    cursor: pointer;
    font-size: 0.75rem;
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    transition: background-color var(--t);
}

.folder-contents-list .inner-card .btn-delete-inner:hover {
    background: #fee2e2;
}

