/* 
 * Custom Styles for Devices Portal
 * Tailwind CSS is used as the base framework
 */

/* Root color variables */
:root {
    --primary-blue: #2563eb;
    --primary-blue-dark: #1d4ed8;
    --danger-red: #dc2626;
    --success-green: #16a34a;
    --warning-yellow: #ca8a04;
}

/* Smooth transitions */
* {
    transition: background-color 0.2s ease, border-color 0.2s ease;
}

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

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

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

::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Form input focus states */
input:focus,
select:focus,
textarea:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* Button hover effects */
button:not(:disabled) {
    cursor: pointer;
}

button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Table row hover effect */
tbody tr:hover {
    background-color: #f8fafc;
}

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

/* Status badge colors */
.status-active {
    background-color: #dcfce7;
    color: #166534;
}

.status-inactive {
    background-color: #f3f4f6;
    color: #374151;
}

.status-pending {
    background-color: #fef3c7;
    color: #92400e;
}

.status-damaged {
    background-color: #fee2e2;
    color: #991b1b;
}

.status-lost {
    background-color: #e9d5ff;
    color: #6b21a8;
}

.status-retired {
    background-color: #f1f5f9;
    color: #334155;
}

/* Animation for success message */
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

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

.notification {
    animation: slideDown 0.3s ease-out;
}

/* Loading spinner */
.spinner {
    border: 3px solid #f3f4f6;
    border-top: 3px solid #2563eb;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
}

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

    100% {
        transform: rotate(360deg);
    }
}

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

    .px-6 {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }
}

/* Print styles */
@media print {

    nav,
    footer,
    .print-hide {
        display: none;
    }

    body {
        background: white;
    }
}