/* Sticky-note corkboard styles for AI.Client/Shared/Components/Notes.razor */

.sticky-palette-picker {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
}

.sticky-palette-swatch {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 1px solid rgba(0,0,0,0.2);
    cursor: pointer;
    padding: 0;
    transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.sticky-palette-swatch:hover {
    transform: scale(1.12);
    box-shadow: 0 2px 6px rgba(0,0,0,0.25);
}

.sticky-palette-swatch.is-selected {
    box-shadow: 0 0 0 2px var(--mud-palette-primary), 0 2px 4px rgba(0,0,0,0.25);
    border-color: var(--mud-palette-primary);
}


.notes-corkboard-wrap {
    display: block;
}

.corkboard {
    background: transparent;
    border-radius: 8px;
    padding: 22px 20px 28px;
    position: relative;
}

.corkboard-rail {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 18px;
    background: transparent;
    padding: 4px 0;
}

.corkboard-rail-pin {
    color: #8A4A00 !important;
    font-size: 18px !important;
}

.corkboard-label {
    font: 600 12.5px var(--mud-typography-default-family, 'Montserrat', sans-serif);
    color: var(--mud-palette-text-primary);
    letter-spacing: 0.01em;
    white-space: nowrap;
}

.corkboard-hint {
    font: 400 11.5px var(--mud-typography-default-family, 'Montserrat', sans-serif);
    color: var(--mud-palette-text-secondary);
    margin-left: 4px;
    padding-left: 10px;
    border-left: 1px solid rgba(0,0,0,0.12);
    white-space: nowrap;
}

.corkboard-add-btn {
    border-radius: 999px !important;
}

.corkboard-empty {
    background: rgba(255,255,255,0.85);
    border-radius: 8px;
    padding: 24px;
}

.sticky-row {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
    align-items: flex-start;
    padding-top: 4px;
}

.sticky-dropzone {
    min-height: 80px;
    width: 100%;
}

.sticky-drag-handle {
    cursor: grab;
    color: var(--mud-palette-text-secondary);
    margin-right: 4px;
}

.sticky.mud-drag-source,
.sticky.mud-drop-item-preview {
    --r: 0deg !important;
}

.notes-vertical .sticky-row {
    flex-direction: column;
    flex-wrap: nowrap;
    align-items: stretch;
    gap: 22px;
}

.notes-vertical .sticky {
    flex: 1 0 auto;
    width: 100%;
    min-height: 0;
}

.notes-vertical .corkboard {
    padding: 14px 12px 18px;
}

.notes-vertical .corkboard-rail {
    display: none;
}

@media (max-width: 1500px) {
    .notes-vertical {
        display: none;
    }
}

.sticky {
    --r: 0deg;
    position: relative;
    flex: 0 0 218px;
    width: 218px;
    min-height: 200px;
    padding: 22px 18px 16px;
    border: 0;
    border-radius: 2px 14px 4px 10px / 8px 4px 12px 6px;
    text-align: left;
    font: 500 14px 'Caveat', 'Kalam', var(--mud-typography-default-family, 'Montserrat', sans-serif);
    color: #3b2f00;
    cursor: default;
    transform: rotate(var(--r));
    transition: transform 250ms ease-out, box-shadow 250ms ease-out;
    background-color: #fff3a6;
    background-image:
        linear-gradient(180deg, rgba(0,0,0,0.05), rgba(0,0,0,0) 40px),
        linear-gradient(135deg, rgba(255,255,255,0.55), rgba(255,255,255,0) 50%);
    box-shadow:
        0 1px 1px rgba(0,0,0,0.12),
        0 8px 16px rgba(0,0,0,0.18),
        0 18px 28px rgba(0,0,0,0.10);
    display: flex;
    flex-direction: column;
}

.sticky::after {
    content: '';
    position: absolute;
    right: 0;
    bottom: 0;
    width: 26px;
    height: 26px;
    background: linear-gradient(135deg, transparent 48%, rgba(0,0,0,0.18) 50%, rgba(255,255,255,0.6) 60%, transparent 72%);
    border-bottom-right-radius: 2px;
    pointer-events: none;
}

.sticky:hover {
    transform: rotate(calc(var(--r) * 0.4)) translateY(-4px) scale(1.02);
    box-shadow:
        0 2px 2px rgba(0,0,0,0.14),
        0 14px 22px rgba(0,0,0,0.22),
        0 28px 40px rgba(0,0,0,0.12);
    z-index: 2;
}

.sticky-yellow { background-color: #fff09a; }
.sticky-blue   { background-color: #cde7ff; color: #1f3a66; }
.sticky-green  { background-color: #c8e6a0; color: #1f3d10; }
.sticky-purple { background-color: #d8c4f0; color: #2c1858; }
.sticky-orange { background-color: #ffd28a; color: #4a2a0a; }
.sticky-pink {
    background-color: #ff9fb0;
    color: #4a0a1a;
    animation: sticky-attention 2.6s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}
.sticky-red {
    background-color: #ff7c7c;
    color: #4a0a0a;
    animation: sticky-attention 2.6s cubic-bezier(0.4, 0, 0.2, 1) infinite;
    animation-delay: 1.1s;
}

@keyframes sticky-attention {
    0%, 100% {
        box-shadow:
            0 1px 1px rgba(0,0,0,0.12),
            0 8px 16px rgba(0,0,0,0.18),
            0 18px 28px rgba(0,0,0,0.10),
            0 0 0 0 rgba(211,47,47,0.0);
    }
    50% {
        box-shadow:
            0 1px 1px rgba(0,0,0,0.12),
            0 8px 16px rgba(0,0,0,0.18),
            0 18px 28px rgba(0,0,0,0.10),
            0 0 0 6px rgba(211,47,47,0.18);
    }
}

.sticky-pin {
    position: absolute;
    top: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 30%, #ff6b6b, #b51d1d 70%, #6a0d0d);
    box-shadow: 0 2px 3px rgba(0,0,0,0.45), inset 0 -2px 2px rgba(0,0,0,0.4);
}
.sticky-blue .sticky-pin {
    background: radial-gradient(circle at 35% 30%, #5fb6ff, #1d5fb5 70%, #0d3d6a);
}

.sticky-stamp {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    align-self: flex-start;
    font: 700 10px var(--mud-typography-default-family, 'Montserrat', sans-serif);
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: #6e0a18;
    border: 1.5px solid currentColor;
    padding: 2px 8px 2px 4px;
    border-radius: 3px;
    margin-bottom: 8px;
    transform: rotate(-4deg);
    opacity: 0.85;
}
.sticky-red .sticky-stamp { color: #5a0606; }

.sticky-stamp-icon {
    font-size: 14px !important;
    width: 14px !important;
    height: 14px !important;
}

.sticky-text {
    flex: 1;
    font-size: 18px;
    line-height: 1.3;
    word-break: break-word;
    overflow: hidden;
}

.sticky-text p,
.sticky-text ul,
.sticky-text ol,
.sticky-text li {
    font: inherit;
    margin: 0 0 6px;
    padding-left: 0;
}

.sticky-text ul,
.sticky-text ol {
    padding-left: 18px;
}

.sticky-text p:last-child,
.sticky-text ul:last-child,
.sticky-text ol:last-child {
    margin-bottom: 0;
}

.sticky-text strong { font-weight: 700; }

.sticky-sig {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 8px;
    margin-top: 12px;
    padding-top: 8px;
    border-top: 1.5px dashed rgba(0,0,0,0.18);
    font-family: 'Caveat', cursive;
}
.sticky-sig-name { font-size: 16px; font-weight: 600; }
.sticky-sig-when {
    font-size: 12px;
    opacity: 0.65;
    font-family: var(--mud-typography-default-family, 'Montserrat', sans-serif);
    font-weight: 400;
}

.sticky-actions {
    position: absolute;
    top: 6px;
    right: 6px;
    display: flex;
    gap: 2px;
    opacity: 0;
    transition: opacity 150ms ease-out;
}
.sticky:hover .sticky-actions,
.sticky:focus-within .sticky-actions {
    opacity: 1;
}

.sticky-actions .mud-icon-button {
    background: rgba(255,255,255,0.7);
    width: 28px;
    height: 28px;
    padding: 4px;
}
.sticky-actions .mud-icon-button:hover {
    background: rgba(255,255,255,0.95);
}
