@import url('https://cdn.jsdelivr.net/npm/tailwindcss@2.2.19/dist/tailwind.min.css');

/* Custom styles for digital signage CMS */
.scene-canvas {
    position: relative;
    background: #f0f0f0;
    border: 2px dashed #ccc;
    min-height: 400px;
}

.layer-item {
    position: absolute;
    cursor: move;
    border: 1px solid transparent;
    transition: border-color 0.2s;
}

.layer-item:hover {
    border-color: #3b82f6;
}

.layer-item.selected {
    border-color: #ef4444;
    box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.3);
}

.drag-handle {
    position: absolute;
    top: -10px;
    right: -10px;
    width: 20px;
    height: 20px;
    background: #3b82f6;
    border-radius: 50%;
    cursor: grab;
}

.resize-handle {
    position: absolute;
    bottom: -5px;
    right: -5px;
    width: 10px;
    height: 10px;
    background: #ef4444;
    cursor: se-resize;
}

/* Player status indicators */
.player-online {
    color: #10b981;
}

.player-offline {
    color: #ef4444;
}

.player-inactive {
    color: #f59e0b;
}

/* Asset grid */
.asset-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
}

.asset-item {
    border: 2px solid transparent;
    transition: border-color 0.2s, transform 0.2s;
}

.asset-item:hover {
    border-color: #3b82f6;
    transform: translateY(-2px);
}

.asset-item.selected {
    border-color: #ef4444;
}

/* Custom dropdown */
.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-content {
    display: none;
    position: absolute;
    background-color: white;
    min-width: 160px;
    box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
    z-index: 1;
    right: 0;
    border-radius: 4px;
}

.dropdown:hover .dropdown-content {
    display: block;
}

/* Loading spinner */
.spinner {
    border: 2px solid #f3f3f3;
    border-top: 2px solid #3b82f6;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Toast notifications */
.toast {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 12px 20px;
    border-radius: 6px;
    color: white;
    z-index: 1000;
    animation: slideIn 0.3s ease-out;
}

.toast.success {
    background-color: #10b981;
}

.toast.error {
    background-color: #ef4444;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Responsive design */
@media (max-width: 768px) {
    .scene-canvas {
        min-height: 300px;
    }
    
    .asset-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }
    
    nav .flex {
        flex-direction: column;
        height: auto;
        padding: 1rem 0;
    }
    
    nav .flex > div {
        margin: 0.5rem 0;
    }
}
