/**
 * Account Vault - Custom Styles
 *
 * Extends Tailwind CSS with custom components and utilities.
 */

/* Base styles */
* {
    scrollbar-width: thin;
    scrollbar-color: #475569 #1e293b;
}

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

::-webkit-scrollbar-track {
    background: #1e293b;
}

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

::-webkit-scrollbar-thumb:hover {
    background: #64748b;
}

/* Focus styles */
input:focus,
select:focus,
textarea:focus,
button:focus {
    outline: none;
}

/* Form input styles */
input[type="text"],
input[type="password"],
input[type="email"],
input[type="url"],
select,
textarea {
    transition: border-color 0.2s ease;
}

/* Loading spinner */
.spinner {
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-top-color: #0ea5e9;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    animation: spin 0.8s linear infinite;
    display: inline-block;
}

.spinner-sm {
    width: 16px;
    height: 16px;
    border-width: 2px;
}

.spinner-lg {
    width: 40px;
    height: 40px;
    border-width: 4px;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Toast notifications */
.toast {
    animation: slideIn 0.3s ease-out;
}

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

/* Fade animations */
.fade-in {
    animation: fadeIn 0.2s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Modal animations */
.modal-enter {
    animation: modalEnter 0.2s ease-out;
}

@keyframes modalEnter {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Table styles */
table {
    border-collapse: collapse;
}

table th {
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
}

/* Button styles */
button {
    cursor: pointer;
}

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

/* Link styles */
a {
    transition: color 0.2s ease;
}

/* Card hover effect */
.card-hover {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card-hover:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.3);
}

/* Status badge styles */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    font-weight: 500;
    border-radius: 9999px;
}

.badge-active {
    background-color: rgba(34, 197, 94, 0.2);
    color: #4ade80;
}

.badge-suspended {
    background-color: rgba(234, 179, 8, 0.2);
    color: #facc15;
}

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

.badge-sold {
    background-color: rgba(100, 116, 139, 0.2);
    color: #94a3b8;
}

/* Platform icon fallback */
.platform-icon {
    width: 24px;
    height: 24px;
    border-radius: 4px;
    background-color: #6366f1;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 600;
}

/* Sidebar navigation active state */
.nav-link.active {
    background-color: #0ea5e9;
    color: white;
}

/* Password visibility toggle */
.password-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #64748b;
    transition: color 0.2s ease;
}

.password-toggle:hover {
    color: #94a3b8;
}

/* Search modal */
.search-modal {
    backdrop-filter: blur(4px);
}

.search-result {
    transition: background-color 0.15s ease;
}

.search-result:hover {
    background-color: rgba(51, 65, 85, 0.5);
}

.search-result.selected {
    background-color: rgba(14, 165, 233, 0.2);
}

/* Keyboard shortcut badges */
kbd {
    font-family: 'SF Mono', 'Menlo', monospace;
    font-size: 0.75rem;
    background-color: #334155;
    padding: 0.125rem 0.375rem;
    border-radius: 0.25rem;
    border: 1px solid #475569;
}

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

.progress-bar {
    height: 100%;
    background-color: #0ea5e9;
    transition: width 0.3s ease;
}

/* Empty state */
.empty-state {
    text-align: center;
    padding: 3rem;
    color: #64748b;
}

.empty-state svg {
    margin: 0 auto 1rem;
    opacity: 0.5;
}

/* Dropdown menu */
.dropdown {
    position: relative;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 0.5rem;
    background-color: #1e293b;
    border: 1px solid #334155;
    border-radius: 0.5rem;
    min-width: 160px;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.3);
    z-index: 50;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s ease;
}

.dropdown.active .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-item {
    display: block;
    padding: 0.5rem 1rem;
    color: #cbd5e1;
    transition: background-color 0.15s ease;
}

.dropdown-item:hover {
    background-color: #334155;
}

/* Tag chips */
.tag-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    border-radius: 9999px;
    background-color: #334155;
    color: #e2e8f0;
}

.tag-chip-color {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

/* Tooltip */
[data-tooltip] {
    position: relative;
}

[data-tooltip]::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    padding: 0.25rem 0.5rem;
    background-color: #0f172a;
    color: #e2e8f0;
    font-size: 0.75rem;
    border-radius: 0.25rem;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.15s ease;
    margin-bottom: 0.5rem;
}

[data-tooltip]:hover::after {
    opacity: 1;
    visibility: visible;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .sidebar {
        position: fixed;
        left: -100%;
        z-index: 40;
        transition: left 0.3s ease;
    }

    .sidebar.open {
        left: 0;
    }

    .table-responsive {
        overflow-x: auto;
    }

    .hide-mobile {
        display: none;
    }
}

/* Print styles */
@media print {
    .no-print {
        display: none !important;
    }

    body {
        background: white;
        color: black;
    }
}

/* Dark mode adjustments (for future light mode support) */
@media (prefers-color-scheme: light) {
    /* Can add light mode styles here if needed */
}
