/* Custom styles for Trade & Tariff Impact Tracker */

* {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

/* Navigation */
.nav-link {
    @apply inline-flex items-center px-1 pt-1 border-b-2 border-transparent text-sm font-medium text-gray-500 hover:text-gray-700 hover:border-gray-300 transition-colors duration-200;
}

.nav-link.active {
    @apply border-blue-500 text-gray-900;
}

/* Custom animations */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

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

@keyframes slideIn {
    from { opacity: 0; transform: translateX(-20px); }
    to { opacity: 1; transform: translateX(0); }
}

/* Update status indicators */
.status-indicator {
    @apply inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium;
}

.status-high { @apply bg-red-100 text-red-800; }
.status-medium { @apply bg-yellow-100 text-yellow-800; }
.status-low { @apply bg-green-100 text-green-800; }
.status-info { @apply bg-blue-100 text-blue-800; }

/* Data source cards */
.data-source-card {
    @apply bg-white border border-gray-200 rounded-lg p-4 hover:shadow-md transition-shadow duration-200;
}

.data-source-card .reliability-score {
    @apply inline-flex items-center px-2 py-1 rounded-full text-xs font-medium bg-gray-100 text-gray-800;
}

.reliability-score.high { @apply bg-green-100 text-green-800; }
.reliability-score.medium { @apply bg-yellow-100 text-yellow-800; }
.reliability-score.low { @apply bg-red-100 text-red-800; }

/* Executive order styling */
.executive-order {
    @apply border-l-4 border-purple-500 bg-purple-50 p-4 rounded-r-lg;
}

.executive-order.high-impact {
    @apply border-red-500 bg-red-50;
}

.executive-order.medium-impact {
    @apply border-yellow-500 bg-yellow-50;
}

/* Industry impact cards */
.impact-card {
    @apply bg-white border border-gray-200 rounded-lg p-4 hover:border-gray-300 transition-colors duration-200;
}

.impact-positive { @apply border-l-4 border-green-500; }
.impact-negative { @apply border-l-4 border-red-500; }
.impact-neutral { @apply border-l-4 border-gray-500; }

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

/* Loading states */
.loading-skeleton {
    @apply animate-pulse bg-gray-200 rounded;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .nav-link {
        @apply block px-3 py-2 text-base font-medium;
    }
    
    .chart-container {
        height: 250px;
    }
}

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

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

::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

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

/* Tariff-specific styles */
.country-card {
    @apply transition-all duration-200 hover:scale-105;
}

.tariff-rate {
    @apply inline-flex items-center justify-center min-w-12;
}

.tariff-rate.bg-green-100 { @apply bg-green-100 text-green-800; }
.tariff-rate.bg-blue-100 { @apply bg-blue-100 text-blue-800; }
.tariff-rate.bg-yellow-100 { @apply bg-yellow-100 text-yellow-800; }
.tariff-rate.bg-orange-100 { @apply bg-orange-100 text-orange-800; }
.tariff-rate.bg-red-100 { @apply bg-red-100 text-red-800; }

/* Modal styles */
.modal-backdrop {
    @apply backdrop-blur-sm;
}

/* Table hover effects */
.hover\:bg-gray-50:hover {
    @apply bg-gray-50;
}

/* Tariff change animations */
.tariff-change {
    animation: slideInFromRight 0.3s ease-out;
}

@keyframes slideInFromRight {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Country flag sizing */
.country-flag {
    font-size: 1.5rem;
    line-height: 1;
}

/* Dashboard metric cards */
.metric-card {
    @apply transition-all duration-200;
}

.metric-card:hover {
    @apply shadow-md transform scale-105;
}

.metric-card:active {
    @apply transform scale-100;
}

/* Modal enhancements */
.modal-content {
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Enhanced table styling */
.hover\:bg-gray-50:hover tbody tr:hover {
    @apply bg-gray-50;
}

/* Impact level indicators */
.impact-high { @apply bg-red-100 text-red-800; }
.impact-medium { @apply bg-yellow-100 text-yellow-800; }
.impact-low { @apply bg-green-100 text-green-800; }
.impact-positive { @apply bg-green-100 text-green-800; }

/* Nabors logo styling */
.nabors-logo {
    @apply transition-opacity duration-200;
}

.nabors-logo:hover {
    @apply opacity-80;
}

/* Logo in header responsive behavior */
@media (max-width: 768px) {
    .header-logo-section {
        @apply flex-col items-start;
    }
    
    .header-logo-section .nabors-logo {
        @apply mt-2;
    }
}

/* Search and filter styling */
.filter-controls input:focus,
.filter-controls select:focus {
    @apply ring-2 ring-blue-500 border-blue-500;
}

/* =====================================================================
   NOTIFICATIONS & STATUS INDICATORS
   ===================================================================== */

.notification {
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    margin-bottom: 8px;
    opacity: 0;
    transform: translateX(100%);
    animation: slideInNotification 0.3s ease-out forwards;
}

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

.notification-content {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    gap: 8px;
}

.notification-icon {
    font-size: 16px;
    flex-shrink: 0;
}

.notification-message {
    flex: 1;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.4;
}

.notification-close {
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    color: #6b7280;
    transition: color 0.2s;
    padding: 0;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.notification-close:hover {
    color: #374151;
}

.notification-info {
    border-left: 4px solid #3b82f6;
}

.notification-success {
    border-left: 4px solid #10b981;
}

.notification-warning {
    border-left: 4px solid #f59e0b;
}

.notification-error {
    border-left: 4px solid #ef4444;
}

/* Status indicators */
.status-connected {
    color: #10b981 !important;
}

.status-connected::before {
    content: '●';
    margin-right: 4px;
    color: #10b981;
}

.status-disconnected {
    color: #ef4444 !important;
}

.status-disconnected::before {
    content: '●';
    margin-right: 4px;
    color: #ef4444;
}

/* API Test Button */
.api-test-button {
    position: fixed;
    top: 60px;
    right: 10px;
    z-index: 9999;
    padding: 8px 12px;
    background: #007bff;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 500;
    box-shadow: 0 2px 8px rgba(0, 123, 255, 0.3);
    transition: all 0.2s;
}

.api-test-button:hover {
    background: #0056b3;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.4);
}

/* Print styles */
@media print {
    .no-print { display: none !important; }
    body { background: white !important; }
    .bg-gray-50 { background: white !important; }
    .shadow { box-shadow: none !important; }
    #tariffModal { display: none !important; }
    #notifications { display: none !important; }
    .api-test-button { display: none !important; }
}