/* Exchange Platform Custom Styles */

/* RTL Support */
[dir="rtl"] {
    direction: rtl;
    text-align: right;
}

[dir="rtl"] .space-x-4 > :not([hidden]) ~ :not([hidden]) {
    --tw-space-x-reverse: 1;
}

/* Custom Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes slideIn {
    from { transform: translateX(-100%); }
    to { transform: translateX(0); }
}

.animate-fade-in {
    animation: fadeIn 0.6s ease-out;
}

.animate-slide-in {
    animation: slideIn 0.3s ease-out;
}

/* Custom Button Styles */
.btn-primary {
    background-color: #2563eb;
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 600;
    transition: all 0.3s;
    outline: none;
    border: none;
    cursor: pointer;
}

.btn-primary:hover {
    background-color: #1d4ed8;
}

.btn-primary:focus {
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.5);
}

.btn-secondary {
    background-color: #d1d5db;
    color: #374151;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 600;
    transition: all 0.3s;
    outline: none;
    border: none;
    cursor: pointer;
}

.btn-secondary:hover {
    background-color: #9ca3af;
}

.btn-success {
    background-color: #059669;
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 600;
    transition: all 0.3s;
    outline: none;
    border: none;
    cursor: pointer;
}

.btn-success:hover {
    background-color: #047857;
}

.btn-danger {
    background-color: #dc2626;
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 600;
    transition: all 0.3s;
    outline: none;
    border: none;
    cursor: pointer;
}

.btn-danger:hover {
    background-color: #b91c1c;
}

/* Card Styles */
.card {
    background-color: white;
    border-radius: 0.5rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    padding: 1.5rem;
    transition: all 0.3s;
}

.card:hover {
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.card-header {
    border-bottom: 1px solid #e5e7eb;
    padding-bottom: 1rem;
    margin-bottom: 1rem;
}

.card-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: #111827;
}

/* Form Styles */
.form-input {
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 0.375rem;
    outline: none;
    transition: all 0.3s;
}

.form-input:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.form-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: #374151;
    margin-bottom: 0.5rem;
}

.form-error {
    margin-top: 0.25rem;
    font-size: 0.875rem;
    color: #dc2626;
}

.form-help {
    margin-top: 0.25rem;
    font-size: 0.75rem;
    color: #6b7280;
}

/* Navigation Styles */
.nav-link {
    color: #374151;
    padding: 0.5rem 0.75rem;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.3s;
}

.nav-link:hover {
    color: #2563eb;
}

.nav-link.active {
    color: #2563eb;
    background-color: #eff6ff;
}

/* Table Styles */
.table {
    min-width: 100%;
    border-collapse: collapse;
}

.table-header {
    background-color: #f9fafb;
}

.table-header th {
    padding: 0.75rem 1.5rem;
    text-align: left;
    font-size: 0.75rem;
    font-weight: 500;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.table-body {
    background-color: white;
    border-top: 1px solid #e5e7eb;
}

.table-row {
    transition: all 0.2s;
}

.table-row:hover {
    background-color: #f9fafb;
}

.table-cell {
    padding: 1rem 1.5rem;
    white-space: nowrap;
    font-size: 0.875rem;
    color: #111827;
}

/* Status Badges */
.status-active {
    display: inline-flex;
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 9999px;
    background-color: #dcfce7;
    color: #166534;
}

.status-inactive {
    display: inline-flex;
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 9999px;
    background-color: #fecaca;
    color: #991b1b;
}

.status-pending {
    display: inline-flex;
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 9999px;
    background-color: #fef3c7;
    color: #92400e;
}

/* Loading Spinner */
.spinner {
    display: inline-block;
    width: 1rem;
    height: 1rem;
    border: 2px solid #d1d5db;
    border-top: 2px solid #2563eb;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Custom Scrollbar */
.custom-scrollbar::-webkit-scrollbar {
    width: 6px;
}

.custom-scrollbar::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 3px;
}

.custom-scrollbar::-webkit-scrollbar-thumb {
    background: #94a3b8;
    border-radius: 3px;
}

.custom-scrollbar::-webkit-scrollbar-thumb:hover {
    background: #64748b;
}

/* Exchange Rate Display */
.exchange-rate {
    font-size: 1.125rem;
    font-weight: 600;
    color: #111827;
}

.exchange-rate.positive {
    color: #059669;
}

.exchange-rate.negative {
    color: #dc2626;
}

/* Currency Flags */
.currency-flag {
    width: 1.5rem;
    height: 1.5rem;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid #e5e7eb;
}

/* Responsive Grid */
.grid-responsive {
    display: grid;
    grid-template-columns: repeat(1, minmax(0, 1fr));
    gap: 1.5rem;
}

@media (min-width: 768px) {
    .grid-responsive {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (min-width: 1024px) {
    .grid-responsive {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

/* Mobile Menu */
.mobile-menu {
    display: none;
}

@media (max-width: 767px) {
    .mobile-menu {
        display: block;
    }
}

.mobile-menu.active {
    display: block;
}

/* Print Styles */
@media print {
    .no-print {
        display: none !important;
    }
    
    .print-break {
        page-break-after: always;
    }
}

/* Dark Mode Support (Future Enhancement) */
@media (prefers-color-scheme: dark) {
    .dark-mode {
        background-color: #111827;
        color: white;
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .high-contrast {
        border: 2px solid black;
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    .animate-fade-in,
    .animate-slide-in {
        animation: none;
    }
    
    .transition {
        transition: none;
    }
}