/* OctaStories - Custom Styles */

/* Status Badge Colors */
.status-pending {
    @apply bg-gray-100 text-gray-800;
}

.status-running {
    @apply bg-blue-100 text-blue-800;
}

.status-completed {
    @apply bg-green-100 text-green-800;
}

.status-failed {
    @apply bg-red-100 text-red-800;
}

.status-skipped {
    @apply bg-yellow-100 text-yellow-800;
}

/* Task Card Animations */
.task-card {
    transition: all 0.2s ease-in-out;
}

.task-card: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);
}

/* Loading Spinner */
.spinner {
    border: 2px solid #f3f3f3;
    border-top: 2px solid #6366f1;
    border-radius: 50%;
    width: 16px;
    height: 16px;
    animation: spin 1s linear infinite;
    display: inline-block;
}

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

/* Subtask Indentation */
.subtask-container {
    margin-left: 1.5rem;
    border-left: 2px solid #e5e7eb;
    padding-left: 1rem;
}

/* Progress Bar */
.progress-bar {
    height: 4px;
    background-color: #e5e7eb;
    border-radius: 2px;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    background-color: #6366f1;
    transition: width 0.3s ease-in-out;
}

/* Button States */
.btn-run {
    @apply px-4 py-2 bg-indigo-600 text-white text-sm font-medium rounded-md;
    @apply hover:bg-indigo-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500;
    @apply disabled:opacity-50 disabled:cursor-not-allowed;
    transition: all 0.15s ease-in-out;
}

.btn-run:disabled {
    @apply bg-gray-400;
}

.btn-retry {
    @apply px-4 py-2 bg-orange-500 text-white text-sm font-medium rounded-md;
    @apply hover:bg-orange-600 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-orange-500;
    transition: all 0.15s ease-in-out;
}

.btn-secondary {
    @apply px-4 py-2 bg-gray-200 text-gray-700 text-sm font-medium rounded-md;
    @apply hover:bg-gray-300 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-gray-500;
    transition: all 0.15s ease-in-out;
}

/* Card Styles */
.card {
    @apply bg-white rounded-lg shadow-sm border border-gray-200;
}

.card-header {
    @apply px-6 py-4 border-b border-gray-200;
}

.card-body {
    @apply px-6 py-4;
}

/* Table Styles */
.table-container {
    @apply overflow-x-auto;
}

.table {
    @apply min-w-full divide-y divide-gray-200;
}

.table th {
    @apply px-6 py-3 bg-gray-50 text-left text-xs font-medium text-gray-500 uppercase tracking-wider;
}

.table td {
    @apply px-6 py-4 whitespace-nowrap text-sm;
}

/* Toast Notifications */
.toast {
    position: fixed;
    bottom: 1rem;
    right: 1rem;
    padding: 1rem 1.5rem;
    border-radius: 0.5rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    z-index: 50;
    transform: translateY(100%);
    opacity: 0;
    transition: all 0.3s ease-in-out;
}

.toast.show {
    transform: translateY(0);
    opacity: 1;
}

.toast-success {
    @apply bg-green-500 text-white;
}

.toast-error {
    @apply bg-red-500 text-white;
}

.toast-info {
    @apply bg-blue-500 text-white;
}

/* Collapsible Sections */
.collapse-toggle {
    cursor: pointer;
    user-select: none;
}

.collapse-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-in-out;
}

.collapse-content.expanded {
    max-height: 1000px;
}

/* Step Type Icons/Colors */
.step-topics { @apply text-purple-600; }
.step-paragraph { @apply text-blue-600; }
.step-translate { @apply text-green-600; }
.step-image { @apply text-pink-600; }
.step-audio { @apply text-yellow-600; }
.step-video { @apply text-red-600; }
.step-metadata { @apply text-indigo-600; }
