/**
 * Market Plugin - Professional Dark Theme
 * Complementary styles for Tailwind CSS
 */

/* Navigation Links */
.nav-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
    color: #9ca3af;
    border-radius: 0.5rem;
    transition: all 0.2s;
}

.nav-link:hover {
    color: #ffffff;
    background-color: #1a1d21;
}

.nav-link.active {
    color: #ffffff;
    background-color: #1a1d21;
}

/* Dropdown Menus */
.dropdown-menu {
    box-shadow: 0 25px 50px -12px rgb(0 0 0 / 0.5);
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.625rem 1rem;
    font-size: 0.875rem;
    color: #d1d5db;
    transition: all 0.2s;
}

.dropdown-item:hover {
    color: #ffffff;
    background-color: #212529;
}

/* Notification Badge */
.notification-badge {
    display: none;
    position: absolute;
    top: 0;
    right: 0;
    width: 0.5rem;
    height: 0.5rem;
    background-color: #ef4444;
    border-radius: 9999px;
}

.notification-badge[data-count]:not([data-count=""]):not([data-count="0"]) {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    width: auto;
    padding: 0 0.25rem;
    font-size: 10px;
    font-weight: 700;
    color: #ffffff;
}

/* User Dropdown Toggle */
.user-dropdown.active .user-dropdown-menu,
#notificationsDropdown.active {
    display: block;
}

/* Notification Items */
.notification-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 1rem;
    border-bottom: 1px solid #212529;
    transition: background-color 0.2s;
}

.notification-item:hover {
    background-color: rgba(33, 37, 41, 0.5);
}

.notification-item:last-child {
    border-bottom: none;
}

.notification-item.warning {
    background-color: rgba(245, 158, 11, 0.05);
    border-bottom-color: rgba(245, 158, 11, 0.2);
}

.notification-item.info {
    background-color: rgba(59, 130, 246, 0.05);
    border-bottom-color: rgba(59, 130, 246, 0.2);
}

.notification-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border-radius: 9999px;
    background-color: #1a1d21;
    color: #9ca3af;
    flex-shrink: 0;
}

.notification-content p {
    font-size: 0.875rem;
    color: #d1d5db;
    margin-bottom: 0.25rem;
}

.notification-content small {
    font-size: 0.75rem;
    color: #6b7280;
}

.empty-notifications {
    text-align: center;
    padding: 2rem;
    color: #6b7280;
    font-size: 0.875rem;
}

/* Item Cards */
.item-card {
    background-color: #0f1114;
    border: 1px solid #1a1d21;
    border-radius: 0.5rem;
    overflow: hidden;
    transition: all 0.3s;
    cursor: pointer;
}

.item-card:hover {
    border-color: #212529;
    box-shadow: 0 20px 25px -5px rgb(0 0 0 / 0.3), 0 8px 10px -6px rgb(0 0 0 / 0.3);
    transform: translateY(-4px);
}

.item-card-header {
    position: relative;
    padding: 1rem;
    background: linear-gradient(to bottom right, #1a1d21, #0f1114);
    border-bottom: 1px solid #1a1d21;
}

.item-level {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.625rem;
    background-color: #2563eb;
    color: #ffffff;
    font-size: 0.75rem;
    font-weight: 700;
    border-radius: 0.25rem;
}

.item-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 2rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 9999px;
    font-size: 0.875rem;
}

.item-badge.excellent {
    background-color: #ca8a04;
    color: #ffffff;
}

.item-badge.luck {
    background-color: #059669;
    color: #ffffff;
}

.item-card-body {
    padding: 1rem;
}

.item-name {
    font-size: 1rem;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 0.75rem;
}

.item-options {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.item-option {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.5rem;
    background-color: rgba(59, 130, 246, 0.1);
    color: #60a5fa;
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: 0.25rem;
    font-size: 0.75rem;
    font-weight: 500;
}

.item-sockets {
    display: flex;
    gap: 0.375rem;
}

.socket {
    width: 1.5rem;
    height: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.25rem;
    border: 2px solid #212529;
    font-size: 0.75rem;
}

.socket.filled {
    background-color: #9333ea;
    border-color: #a855f7;
    color: #ffffff;
}

.item-card-footer {
    padding: 1rem;
    background-color: rgba(26, 29, 33, 0.5);
    border-top: 1px solid #1a1d21;
}

.item-seller {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.75rem;
    color: #9ca3af;
    margin-bottom: 0.75rem;
}

.item-price {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.item-price strong {
    font-size: 1.25rem;
    font-weight: 700;
    color: #ffffff;
}

.item-price span {
    font-size: 0.75rem;
    color: #9ca3af;
    text-transform: uppercase;
    font-weight: 500;
}

.item-actions {
    display: flex;
    gap: 0.5rem;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    font-weight: 500;
    font-size: 0.875rem;
    transition: all 0.2s;
    border: none;
    cursor: pointer;
}

.btn:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.5);
}

.btn-primary {
    background-color: #2563eb;
    color: #ffffff;
}

.btn-primary:hover {
    background-color: #1d4ed8;
}

.btn-secondary {
    background-color: #212529;
    color: #d1d5db;
}

.btn-secondary:hover {
    background-color: #343a40;
    color: #ffffff;
}

.btn-success {
    background-color: #059669;
    color: #ffffff;
}

.btn-success:hover {
    background-color: #047857;
}

.btn-danger {
    background-color: #dc2626;
    color: #ffffff;
}

.btn-danger:hover {
    background-color: #b91c1c;
}

.btn-sm {
    font-size: 0.8125rem;
    padding: 0.375rem 0.75rem;
}

.btn-lg {
    font-size: 1rem;
    padding: 0.75rem 1.5rem;
}

.btn-block {
    width: 100%;
}

/* Sidebar */
.sidebar-card {
    background-color: #0f1114;
    border: 1px solid #1a1d21;
    border-radius: 0.5rem;
    padding: 1.5rem;
}

.sidebar-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Filter Form */
.filter-group {
    margin-bottom: 1rem;
}

.filter-group label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: #d1d5db;
    margin-bottom: 0.5rem;
}

.filter-input {
    width: 100%;
    background-color: #1a1d21;
    color: #e5e7eb;
    border: 1px solid #212529;
    border-radius: 0.5rem;
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
    transition: all 0.2s;
}

.filter-input:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem;
    border-radius: 0.375rem;
    cursor: pointer;
    transition: background-color 0.2s;
}

.checkbox-label:hover {
    background-color: #1a1d21;
}

.checkbox-label input[type="checkbox"] {
    width: 1rem;
    height: 1rem;
    background-color: #1a1d21;
    border: 1px solid #212529;
    border-radius: 0.25rem;
    cursor: pointer;
}

.checkbox-label span {
    font-size: 0.875rem;
    color: #d1d5db;
}

.range-inputs {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 0.5rem;
    align-items: center;
}

.range-inputs span {
    font-size: 0.75rem;
    color: #6b7280;
    text-align: center;
}

/* Toolbar */
.items-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    background-color: #0f1114;
    border: 1px solid #1a1d21;
    border-radius: 0.5rem;
    margin-bottom: 1.5rem;
}

.items-count {
    font-size: 0.875rem;
    font-weight: 500;
    color: #d1d5db;
}

.items-sort {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.items-sort label {
    font-size: 0.875rem;
    color: #9ca3af;
}

.sort-select {
    background-color: #1a1d21;
    color: #e5e7eb;
    border: 1px solid #212529;
    border-radius: 0.5rem;
    padding: 0.375rem 0.75rem;
    font-size: 0.875rem;
    cursor: pointer;
}

.sort-select:focus {
    outline: none;
    border-color: #2563eb;
}

/* Items Grid */
.items-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

@media (max-width: 640px) {
    .items-grid {
        grid-template-columns: 1fr;
    }
}

/* Loading/Empty States */
.loading-state,
.empty-state,
.error-state {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem 1rem;
    text-align: center;
}

.loading-state i,
.empty-state i,
.error-state i {
    font-size: 3rem;
    color: #495057;
    margin-bottom: 1rem;
}

.loading-state p,
.empty-state p,
.error-state p {
    color: #9ca3af;
}

/* Pagination */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 2rem;
}

.page-btn {
    min-width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 0.75rem;
    background-color: #0f1114;
    border: 1px solid #1a1d21;
    color: #d1d5db;
    border-radius: 0.5rem;
    transition: all 0.2s;
    cursor: pointer;
}

.page-btn:hover:not(:disabled) {
    background-color: #1a1d21;
    color: #ffffff;
    border-color: #212529;
}

.page-btn.active {
    background-color: #2563eb;
    border-color: #2563eb;
    color: #ffffff;
}

.page-btn.active:hover {
    background-color: #1d4ed8;
}

.page-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.page-ellipsis {
    padding: 0 0.5rem;
    color: #495057;
}

/* Form Elements */
.form-group {
    margin-bottom: 1rem;
}

.form-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: #d1d5db;
    margin-bottom: 0.5rem;
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    background-color: #1a1d21;
    color: #e5e7eb;
    border: 1px solid #212529;
    border-radius: 0.5rem;
    padding: 0.625rem 1rem;
    font-size: 0.875rem;
    transition: all 0.2s;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.form-textarea {
    resize: vertical;
}

/* Badges */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.625rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 500;
}

.badge-success {
    background-color: rgba(16, 185, 129, 0.1);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.badge-warning {
    background-color: rgba(245, 158, 11, 0.1);
    color: #fbbf24;
    border: 1px solid rgba(245, 158, 11, 0.2);
}

.badge-danger {
    background-color: rgba(239, 68, 68, 0.1);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.badge-info {
    background-color: rgba(59, 130, 246, 0.1);
    color: #60a5fa;
    border: 1px solid rgba(59, 130, 246, 0.2);
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 0.5rem;
}

::-webkit-scrollbar-track {
    background-color: #0f1114;
}

::-webkit-scrollbar-thumb {
    background-color: #212529;
    border-radius: 9999px;
}

::-webkit-scrollbar-thumb:hover {
    background-color: #343a40;
}