/**
 * Custom Styles for Living Realms Game Editor
 * Extends Tailwind CSS with additional utility classes
 */

/* Import animation styles */
@import url('animations.css');

/* Smooth transitions */
* {
    transition-property: background-color, border-color, color, fill, stroke;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    transition-duration: 150ms;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Focus styles */
input:focus,
textarea:focus,
select:focus {
    outline: none;
}

/* Button hover effects */
button:not(:disabled):hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

button:not(:disabled):active {
    transform: translateY(0);
}

/* Card hover effects */
.hover-lift:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

/* Loading spinner */
@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.animate-spin {
    animation: spin 1s linear infinite;
}

/* Fade in animation */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.3s ease-out;
}

/* Table row hover */
tbody tr {
    transition: background-color 0.2s;
}

tbody tr:hover {
    background-color: rgba(249, 250, 251, 1);
}

/* Modal backdrop */
.modal-backdrop {
    backdrop-filter: blur(2px);
}

/* Custom badge colors */
.badge-primary {
    background-color: rgba(99, 102, 241, 0.1);
    color: rgba(99, 102, 241, 1);
}

.badge-success {
    background-color: rgba(16, 185, 129, 0.1);
    color: rgba(16, 185, 129, 1);
}

.badge-warning {
    background-color: rgba(245, 158, 11, 0.1);
    color: rgba(245, 158, 11, 1);
}

.badge-danger {
    background-color: rgba(239, 68, 68, 0.1);
    color: rgba(239, 68, 68, 1);
}

/* Responsive table */
@media (max-width: 768px) {
    table {
        font-size: 0.875rem;
    }

    th, td {
        padding: 0.5rem !important;
    }
}

/* Print styles */
@media print {
    nav,
    button,
    .no-print {
        display: none !important;
    }
}

/* Quest Chain Specific Styles */
.quest-chain-list {
    list-style: none;
    padding: 0.5rem;
}

.quest-chain-item {
    cursor: move;
    user-select: none;
}

.quest-chain-item.dragging {
    opacity: 0.5;
}

.chain-preview {
    max-height: 400px;
    overflow-y: auto;
}

.chain-step {
    position: relative;
}

.step-number {
    flex-shrink: 0;
}

.step-content {
    flex: 1;
}

.step-arrow {
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Prerequisites section styles */
.prerequisites-section {
    background: rgba(249, 250, 251, 1);
    padding: 1rem;
    border-radius: 0.5rem;
    border: 1px solid rgba(229, 231, 235, 1);
}

.prerequisites-section .form-row {
    margin-bottom: 1rem;
}

.prerequisites-section .form-row:last-child {
    margin-bottom: 0;
}

.help-text {
    font-size: 0.75rem;
    color: rgba(107, 114, 128, 1);
    font-style: italic;
    margin-top: 0.25rem;
}

/* Badge colors */
.badge-gold {
    background-color: rgba(251, 191, 36, 0.1);
    color: rgba(180, 83, 9, 1);
}

.text-gold {
    color: rgba(251, 191, 36, 1);
}

/* Sortable list styles */
.sortable-list {
    list-style: none;
    padding: 0.5rem;
    min-height: 100px;
    border: 2px dashed rgba(229, 231, 235, 1);
    border-radius: 0.5rem;
}

.sortable-list li {
    padding: 0.75rem;
    background: white;
    border: 1px solid rgba(229, 231, 235, 1);
    margin: 0.25rem 0;
    cursor: move;
    border-radius: 0.375rem;
    user-select: none;
}

.sortable-list li.dragging {
    opacity: 0.5;
}
