/* Component Styles for Botija Forex AI Trading Bot */

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

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.toast {
    animation: slideIn 0.3s ease-out;
}

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

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.btn-primary {
    @apply px-4 py-2 bg-green-600 hover:bg-green-700 rounded-lg font-medium transition;
}

.btn-danger {
    @apply px-4 py-2 bg-red-600 hover:bg-red-700 rounded-lg font-medium transition;
}

.btn-secondary {
    @apply px-4 py-2 bg-gray-600 hover:bg-gray-700 rounded-lg font-medium transition;
}

.card {
    @apply bg-gray-800 rounded-lg border border-gray-700 p-6;
}

.badge-success {
    @apply px-3 py-1 bg-green-600 text-white rounded-full text-sm font-medium;
}

.badge-danger {
    @apply px-3 py-1 bg-red-600 text-white rounded-full text-sm font-medium;
}

.badge-warning {
    @apply px-3 py-1 bg-yellow-600 text-white rounded-full text-sm font-medium;
}

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

::-webkit-scrollbar-track {
    background: rgba(31, 41, 55, 0.5);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: rgba(75, 85, 99, 0.8);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(107, 114, 128, 0.8);
}

/* Buttons */
.btn-forex {
    transition: all 0.2s ease;
    font-weight: 600;
}

.btn-forex:hover:not(:disabled) {
    transform: scale(1.02);
}

.btn-forex:active:not(:disabled) {
    transform: scale(0.98);
}

.btn-forex:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Badge Styles */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
}

.badge-success {
    background-color: rgba(34, 197, 94, 0.2);
    color: #22c55e;
}

.badge-danger {
    background-color: rgba(239, 68, 68, 0.2);
    color: #ef4444;
}

.badge-warning {
    background-color: rgba(245, 158, 11, 0.2);
    color: #f59e0b;
}

.badge-info {
    background-color: rgba(59, 130, 246, 0.2);
    color: #3b82f6;
}

/* Tooltip */
.tooltip {
    position: relative;
}

.tooltip::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    padding: 0.5rem;
    background: rgba(17, 24, 39, 0.95);
    color: white;
    font-size: 0.75rem;
    border-radius: 0.375rem;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s;
}

.tooltip:hover::after {
    opacity: 1;
}

/* Loading Skeleton */
.skeleton {
    background: linear-gradient(90deg, rgba(55, 65, 81, 0.3) 0%, rgba(75, 85, 99, 0.5) 50%, rgba(55, 65, 81, 0.3) 100%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
}

@keyframes skeleton-loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Progress Bar */
.progress-bar {
    height: 4px;
    background: rgba(55, 65, 81, 0.5);
    border-radius: 2px;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #22c55e, #16a34a);
    transition: width 0.3s ease;
}

/* Countdown Timer */
.countdown-box {
    min-width: 60px;
    text-align: center;
    padding: 0.5rem;
    background: rgba(31, 41, 55, 0.6);
    border-radius: 0.5rem;
}

.countdown-value {
    font-size: 1.5rem;
    font-weight: 700;
    font-family: 'JetBrains Mono', monospace;
}

.countdown-label {
    font-size: 0.625rem;
    text-transform: uppercase;
    color: #9ca3af;
}

/* Log Entry Styles */
.log-entry {
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
    font-size: 0.75rem;
    padding: 0.25rem 0;
    border-bottom: 1px solid rgba(55, 65, 81, 0.2);
}

.log-entry:last-child {
    border-bottom: none;
}

.log-timestamp {
    color: #6b7280;
}

.log-level-info { color: #3b82f6; }
.log-level-warning { color: #f59e0b; }
.log-level-error { color: #ef4444; }
.log-level-success { color: #22c55e; }

/* Responsive Utilities */
@media (max-width: 768px) {
    .mobile-scroll {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .mobile-stack {
        flex-direction: column;
    }
}

/* Chart Container */
.chart-container {
    position: relative;
    height: 200px;
    width: 100%;
}

/* Number Formatting */
.number-up {
    color: #22c55e;
}

.number-down {
    color: #ef4444;
}

.number-neutral {
    color: #9ca3af;
}

/* Focus Styles for Accessibility */
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

/* Selection */
::selection {
    background-color: rgba(59, 130, 246, 0.3);
    color: white;
}
