/*
 * ┌─────────────────────────────────────────────────────────────────┐
 * │  STEP 12 of 13 (CSS thread) — css/picks-window.css              │
 * │                                                                 │
 * │  The Win98-style floating Picks window — desktop only.          │
 * │                                                                 │
 * │  KEY CONCEPT: Win98 border illusion.                            │
 * │  The classic raised-panel look uses four different border colors:│
 * │    border-color: #fff #808080 #808080 #fff  (top right bot left)│
 * │  Light on top/left, dark on right/bottom = light source is top- │
 * │  left, making the element appear to protrude from the screen.   │
 * │  Reversed colors (dark top/left, light right/bottom) = inset.  │
 * │                                                                 │
 * │  KEY CONCEPT: position: fixed vs absolute.                      │
 * │  The window uses position: fixed so it stays in the same screen │
 * │  position as the user scrolls. The JS drag handler then updates │
 * │  its top/left properties in real time via mousemove deltas.     │
 * │                                                                 │
 * │  KEY CONCEPT: z-index layering.                                 │
 * │  z-index: 9000 puts the window above the sticky navbar          │
 * │  (z-index: 1000) and all section content.                       │
 * │                                                                 │
 * │  The window is hidden on mobile via the media query at the      │
 * │  bottom — a floating draggable widget would be unusable on a    │
 * │  touch screen with no pointer events.                           │
 * │                                                                 │
 * │  ▶  Next: See js/navigation.js (Step 9 of JS thread)           │
 * └─────────────────────────────────────────────────────────────────┘
 */

/* ===================================
   Floating Picks Window (desktop only)
   =================================== */

.win-window {
    position: fixed;
    top: 80px;
    right: 20px;
    width: 260px;
    min-width: 180px;
    background: #c0c0c0;
    border: 2px solid;
    border-color: #ffffff #808080 #808080 #ffffff;
    box-shadow: 2px 2px 0 #000;
    z-index: 9000;
    display: flex;
    flex-direction: column;
    font-family: 'Tahoma', 'MS Sans Serif', -apple-system, sans-serif;
    font-size: 11px;
}

.win-titlebar {
    background: linear-gradient(90deg, #000080 0%, #1084d0 100%);
    color: white;
    padding: 3px 4px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: move;
    user-select: none;
    flex-shrink: 0;
    gap: 4px;
}

.win-title-text {
    font-weight: bold;
    font-size: 11px;
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    pointer-events: none;
}

.win-controls {
    display: flex;
    gap: 2px;
    flex-shrink: 0;
}

.win-btn {
    width: 16px;
    height: 14px;
    background: #c0c0c0;
    border: 1px solid;
    border-color: #ffffff #808080 #808080 #ffffff;
    color: #000;
    font-size: 9px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    line-height: 1;
    font-family: inherit;
    flex-shrink: 0;
}

.win-btn:active {
    border-color: #808080 #ffffff #ffffff #808080;
}

.win-body {
    flex: 1;
    min-height: 80px;
    background: white;
    border: 2px inset #808080;
    margin: 4px;
    overflow-y: auto;
    padding: 4px;
}

.win-minimized .win-body,
.win-minimized .win-statusbar {
    display: none;
}

.win-icons-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(60px, 1fr));
    gap: 4px;
    padding: 2px;
}

.win-pick-icon {
    position: relative;
    text-align: center;
}

.win-pick-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    text-decoration: none;
    color: #000;
    padding: 4px 2px 3px;
    border: 1px dashed transparent;
}

.win-pick-link:hover,
.win-pick-link:focus {
    background: #000080;
    color: white;
    border-color: #000080;
    outline: none;
}

.win-pick-emoji {
    font-size: 28px;
    line-height: 1;
    display: block;
}

.win-pick-label {
    font-size: 9px;
    line-height: 1.2;
    text-align: center;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    word-break: break-word;
    max-width: 58px;
}

.win-pick-remove {
    position: absolute;
    top: -3px;
    right: -3px;
    width: 13px;
    height: 13px;
    background: #c0c0c0;
    border: 1px solid;
    border-color: #ffffff #808080 #808080 #ffffff;
    cursor: pointer;
    font-size: 7px;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 0;
    line-height: 1;
    color: #000;
}

.win-pick-icon:hover .win-pick-remove {
    display: flex;
}

.win-pick-remove:active {
    border-color: #808080 #ffffff #ffffff #808080;
}

.win-empty {
    padding: 8px 4px;
    color: #666;
    font-size: 10px;
    text-align: center;
    line-height: 1.4;
}

.win-statusbar {
    background: #c0c0c0;
    padding: 2px 6px;
    border-top: 1px solid #808080;
    font-size: 10px;
    color: #333;
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.win-credit {
    font-size: 9px;
    color: #555;
    text-align: center;
    padding: 2px 4px 3px;
    border-top: 1px solid #d0d0d0;
    background: #c0c0c0;
    flex-shrink: 0;
}

.win-credit a {
    color: #000080;
}

.win-resize-handle {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 14px;
    height: 14px;
    cursor: se-resize;
    background: linear-gradient(
        135deg,
        transparent 40%, #808080 40%, #808080 50%,
        transparent 50%, transparent 60%,
        #808080 60%, #808080 70%, transparent 70%
    );
}

/* Pin buttons — appear on card hover */
[data-picks-id] {
    position: relative;
}

.picks-pin-btn {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid #ccc;
    cursor: pointer;
    font-size: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.15s, background 0.15s;
    z-index: 20;
    padding: 0;
    line-height: 1;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

[data-picks-id]:hover .picks-pin-btn {
    opacity: 1;
}

.picks-pin-btn.pinned {
    opacity: 1;
    background: #ffd700;
    border-color: #c8a800;
}

/* Taskbar reopen button */
.win-reopen-btn {
    position: fixed;
    bottom: 80px;
    right: 20px;
    background: #c0c0c0;
    border: 2px solid;
    border-color: #ffffff #808080 #808080 #ffffff;
    padding: 3px 10px;
    cursor: pointer;
    font-size: 11px;
    font-family: 'Tahoma', sans-serif;
    z-index: 9000;
    box-shadow: 2px 2px 0 #000;
    color: #000;
}

.win-reopen-btn:active {
    border-color: #808080 #ffffff #ffffff #808080;
    box-shadow: 1px 1px 0 #000;
}

@media (max-width: 768px) {
    .win-window,
    .picks-pin-btn,
    .win-reopen-btn {
        display: none !important;
    }
}
