/* ============================================
   PROMPT LIST PAGE - Admin & Drag-Drop Styles
   Only loaded on: prompts/prompt_list.html
   Phase 1 CSS Cleanup - November 15, 2025
   ============================================ */

/* Admin Controls Panel */
.admin-controls {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 15px 20px;
    margin: 20px 40px;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.admin-controls h4 {
    margin: 0 0 10px 0;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.admin-controls p {
    margin: 0;
    opacity: 0.9;
    font-size: 14px;
}

.admin-controls .btn {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    font-size: 13px;
    padding: 5px 12px;
    margin-right: 8px;
    margin-top: 8px;
    border-radius: 5px;
    transition: all 0.3s ease;
}

.admin-controls .btn:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
    color: white;
    transform: translateY(-1px);
}

/* Admin overlay on cards */
.admin-overlay {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(0, 0, 0, 0.8);
    border-radius: 5px;
    padding: 5px;
    z-index: 10;
    display: flex;
    gap: 3px;
}

.admin-overlay .btn {
    padding: 3px 6px;
    font-size: 11px;
    line-height: 1;
    min-width: auto;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
}

.admin-overlay .btn:hover {
    background: rgba(255, 255, 255, 0.4);
    color: white;
}

/* ============================================
   DRAG-AND-DROP FUNCTIONALITY
   ============================================ */

/* Drag handle */
.drag-handle {
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 3px 8px;
    border-radius: 3px;
    font-size: 11px;
    cursor: grab;
    z-index: 15;
    display: none;
    user-select: none;
}

.drag-handle:active {
    cursor: grabbing;
}

.drag-handle.visible {
    display: block;
}

/* Dragging state */
.masonry-item.dragging {
    opacity: 0.3;
    transform: rotate(5deg) scale(1.05);
    z-index: 1000;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.4);
}

/* Drop zone */
.masonry-item.drag-over {
    transform: scale(1.05);
    border: 4px solid #667eea;
    border-radius: 12px;
    box-shadow: 0 0 30px rgba(102, 126, 234, 0.8);
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1), rgba(118, 75, 162, 0.1));
    position: relative;
    animation: pulseGlow 0.8s ease-in-out infinite alternate;
}

/* "DROP HERE" text overlay */
.masonry-item.drag-over::before {
    content: "DROP HERE";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(102, 126, 234, 0.9);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: bold;
    font-size: 14px;
    z-index: 1000;
    pointer-events: none;
    animation: dropTextPulse 0.6s ease-in-out infinite alternate;
}

/* Drop indicator line */
.drop-indicator {
    height: 4px;
    background: linear-gradient(90deg, #667eea, #764ba2);
    border-radius: 2px;
    margin: 8px 0;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.drop-indicator.active {
    opacity: 1;
}

/* Order display badge */
.order-display {
    position: absolute;
    top: 8px;
    left: 8px;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 3px 8px;
    border-radius: 3px;
    font-size: 11px;
    font-weight: bold;
    z-index: 10;
}

/* ============================================
   STICKY SAVE PANEL
   ============================================ */

.sticky-save-panel {
    position: fixed;
    top: 50%;
    right: 20px;
    transform: translateY(-50%);
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 15px;
    border-radius: 10px;
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
    z-index: 1000;
    display: none;
    min-width: 180px;
    text-align: center;
}

.sticky-save-panel.visible {
    display: block;
    animation: slideInRight 0.3s ease;
}

.sticky-save-panel h5 {
    margin: 0 0 10px 0;
    font-size: 14px;
    font-weight: 600;
}

.sticky-save-panel .changes-count {
    font-size: 12px;
    opacity: 0.9;
    margin-bottom: 15px;
}

.sticky-save-panel .btn {
    background: rgba(255, 255, 255, 0.9);
    color: #333;
    border: none;
    padding: 8px 16px;
    border-radius: 5px;
    font-weight: 600;
    margin: 2px;
    transition: all 0.2s ease;
}

.sticky-save-panel .btn:hover {
    background: white;
    transform: translateY(-1px);
}

.sticky-save-panel .btn-save {
    background: #28a745;
    color: white;
}

.sticky-save-panel .btn-save:hover {
    background: #218838;
}

/* ============================================
   PAGE-SPECIFIC ELEMENTS
   ============================================ */

/* End of results message */
.end-of-results {
    padding: 40px 0;
}

.end-message {
    animation: fadeIn 0.6s ease forwards;
}

.end-message h3 {
    font-weight: 600;
    margin-bottom: 10px;
}

.end-message p {
    font-size: 1.1rem;
    margin-bottom: 0;
}

/* ============================================
   ANIMATIONS
   ============================================ */

@keyframes pulseGlow {
    0% {
        box-shadow: 0 0 20px rgba(102, 126, 234, 0.6);
    }
    100% {
        box-shadow: 0 0 40px rgba(102, 126, 234, 1);
    }
}

@keyframes dropTextPulse {
    0% {
        transform: translate(-50%, -50%) scale(1);
    }
    100% {
        transform: translate(-50%, -50%) scale(1.1);
    }
}

@keyframes slideInRight {
    from {
        transform: translateY(-50%) translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateY(-50%) translateX(0);
        opacity: 1;
    }
}

/* ============================================
   RESPONSIVE ADJUSTMENTS
   ============================================ */

@media (max-width: 768px) {
    .admin-controls {
        margin: 20px 20px;
        padding: 12px 15px;
    }

    .sticky-save-panel {
        right: 10px;
        min-width: 150px;
    }
}
