/* Wallet Discovery Styles */

/* Filter Section */
.filter-section {
    background-color: rgba(15, 23, 42, 0.8);
    border: 1px solid rgba(59, 130, 246, 0.25);
    border-radius: 8px;
    padding: 1.65rem;
    margin-bottom: 1.65rem;
    transition: padding 0.4s ease, margin 0.4s ease;
}

.filter-section.collapsed {
    padding: 1.1rem 1.65rem;
    margin-bottom: 1.1rem;
}

.filter-title {
    font-size: 1.24rem;
    font-weight: 600;
    color: #00f0ff;
    margin-bottom: 1.1rem;
}

/* Filter Collapse Button */
.filter-collapse-btn {
    background: rgba(0, 240, 255, 0.05);
    border: 1px solid rgba(0, 240, 255, 0.2);
    color: #00f0ff;
    padding: 0.35rem 0.6rem;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.filter-collapse-btn:hover {
    background: rgba(0, 240, 255, 0.1);
    border-color: rgba(0, 240, 255, 0.4);
}

.filter-collapse-btn .collapse-arrow {
    transition: transform 0.3s ease;
}

.filter-collapse-btn.collapsed .collapse-arrow {
    transform: rotate(180deg);
}

/* Filter Content Collapsible */
.filter-content {
    max-height: 2000px;
    overflow: hidden;
    transition: max-height 0.4s ease-in-out, opacity 0.3s ease-in-out;
    opacity: 1;
}

.filter-content.collapsed {
    max-height: 0;
    opacity: 0;
}

/* Timeframe Tabs */
.timeframe-tabs {
    display: flex;
    gap: 0.55rem;
    margin-bottom: 1.65rem;
    flex-wrap: wrap;
}

.timeframe-tab {
    padding: 0.55rem 1.1rem;
    background-color: rgba(30, 41, 59, 0.6);
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: 6px;
    color: #94a3b8;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.96rem;
    font-weight: 500;
}

.timeframe-tab:hover {
    background-color: rgba(30, 41, 59, 0.9);
    border-color: rgba(59, 130, 246, 0.5);
    color: #e2e8f0;
}

.timeframe-tab.active {
    background: linear-gradient(90deg, #00f0ff 0%, #00a8ff 100%);
    border-color: #00f0ff;
    color: #000000;
}

/* Filter Inputs Grid */
.filter-inputs {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.1rem;
    margin-bottom: 1.65rem;
}

.filter-input-group {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
}

.filter-label {
    font-size: 0.83rem;
    text-transform: uppercase;
    color: #60a5fa;
    font-weight: 600;
    letter-spacing: 0.025em;
}

.filter-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.filter-input {
    width: 100%;
    padding: 0.69rem 0.83rem;
    background-color: rgba(30, 41, 59, 0.6);
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: 6px;
    color: #ffffff;
    font-size: 0.96rem;
    transition: all 0.2s ease;
}

.filter-input:focus {
    outline: none;
    border-color: #00f0ff;
    background-color: rgba(30, 41, 59, 0.8);
}

.filter-input::placeholder {
    color: #64748b;
}

.filter-input-suffix {
    position: absolute;
    right: 0.83rem;
    color: #64748b;
    font-size: 0.96rem;
    pointer-events: none;
}

/* Filter Buttons */
.filter-buttons {
    display: flex;
    gap: 0.83rem;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 0.69rem 1.65rem;
    border-radius: 6px;
    font-size: 0.96rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
}

.filter-btn-primary {
    background: linear-gradient(90deg, #00f0ff 0%, #00a8ff 100%);
    color: #000000;
}

.filter-btn-primary:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

.filter-btn-secondary {
    background-color: rgba(30, 41, 59, 0.6);
    border: 1px solid rgba(59, 130, 246, 0.3);
    color: #ffffff;
}

.filter-btn-secondary:hover {
    background-color: rgba(30, 41, 59, 0.9);
    border-color: rgba(59, 130, 246, 0.5);
}

/* Table Container */
.discovery-table-container {
    width: 100%;
    max-height: calc(100vh - 400px);
    min-height: 400px;
    overflow-x: auto;
    overflow-y: auto;
    position: relative;
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
}

/* Custom scrollbar for webkit browsers */
.discovery-table-container::-webkit-scrollbar {
    height: 8px;
    width: 8px;
}

.discovery-table-container::-webkit-scrollbar-track {
    background: rgba(30, 41, 59, 0.4);
    border-radius: 4px;
}

.discovery-table-container::-webkit-scrollbar-thumb {
    background: rgba(0, 240, 255, 0.5);
    border-radius: 4px;
}

.discovery-table-container::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 240, 255, 0.7);
}

/* Table Styles */
.discovery-table {
    width: 100%;
    min-width: 2200px;
    border-collapse: separate;
    border-spacing: 0;
}

/* Table Header */
.discovery-table thead {
    position: sticky;
    top: 0;
    z-index: 100;
    background-color: rgba(15, 23, 42, 1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

.discovery-table thead tr {
    display: grid;
    grid-template-columns: 0.4fr 0.9fr 0.6fr 0.6fr 0.7fr 0.8fr 0.6fr 0.8fr 0.7fr 0.6fr 0.7fr 0.6fr 0.9fr 0.6fr;
    background-color: rgba(15, 23, 42, 1);
}

/* Table Body */
.discovery-table tbody tr {
    display: grid;
    grid-template-columns: 0.4fr 0.9fr 0.6fr 0.6fr 0.7fr 0.8fr 0.6fr 0.8fr 0.7fr 0.6fr 0.7fr 0.6fr 0.9fr 0.6fr;
    position: relative;
    z-index: 1;
}

/* Table Cells */
.discovery-table th,
.discovery-table td {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.69rem 0.41rem;
    border-right: 1px solid rgba(59, 130, 246, 0.25);
    border-bottom: 1px solid rgba(59, 130, 246, 0.38);
    font-size: 0.83rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Allow tooltips to overflow from headers */
.discovery-table thead th {
    overflow: visible !important;
    position: relative;
    background-color: rgba(15, 23, 42, 1);
    z-index: 100;
}

.discovery-table tbody td {
    overflow: hidden;
    background-color: rgba(15, 23, 42, 0.8);
    z-index: 1;
}

.discovery-table th p {
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.28rem;
    width: 100%;
}

/* Custom Tooltip for Table Headers */
.table-info-icon {
    cursor: help;
    font-size: 11px;
    opacity: 0.7;
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.2s;
    z-index: 1;
}

.table-info-icon:hover {
    opacity: 1;
}

.table-info-icon::after {
    content: attr(data-tooltip);
    position: absolute;
    top: 100%;
    margin-top: 5.5px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(15, 23, 42, 0.98);
    color: #e2e8f0;
    padding: 0.55rem 0.83rem;
    border-radius: 6px;
    font-size: 0.83rem;
    white-space: normal;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s, visibility 0.2s;
    visibility: hidden;
    border: 1px solid rgba(0, 240, 255, 0.5);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.6);
    z-index: 1000;
    font-weight: 400;
    line-height: 1.4;
    min-width: 110px;
    max-width: 198px;
    text-align: center;
    text-transform: none;
}

.table-info-icon:hover::after {
    opacity: 1;
    visibility: visible;
}

.table-info-icon::before {
    content: '';
    position: absolute;
    top: 100%;
    margin-top: -1px;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-bottom-color: rgba(0, 240, 255, 0.5);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s, visibility 0.2s;
    visibility: hidden;
    z-index: 1000;
}

.table-info-icon:hover::before {
    opacity: 1;
    visibility: visible;
}

.discovery-table th:last-child,
.discovery-table td:last-child {
    border-right: none;
}

/* Header Cells */
.discovery-table th {
    background-color: rgba(15, 23, 42, 1);
    font-weight: 600;
}

/* Body Cells */
.discovery-table tbody tr {
    background-color: rgba(15, 23, 42, 0.8);
    transition: background-color 0.2s ease;
}

.discovery-table tbody tr:hover {
    background-color: rgba(30, 41, 59, 0.9);
}

.discovery-table tbody tr:hover td {
    background-color: rgba(30, 41, 59, 0.9);
}

/* Text Colors */
.text-rebrand-white {
    color: #ffffff;
}

.text-rebrand-green {
    color: #10b981;
}

.text-rebrand-red {
    color: #ef4444;
}

.text-rebrand-light-blue {
    color: #60a5fa;
}

.text-rebrand-accent {
    color: #00f0ff;
}

/* Button Styles */
.bg-rebrand-grad {
    background: linear-gradient(90deg, #00f0ff 0%, #00a8ff 100%);
}

/* Hover Effects */
a:hover {
    opacity: 0.8;
    transition: opacity 0.2s ease;
}

/* Loading State */
.loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(15, 23, 42, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
}

.loading-spinner {
    width: 53px;
    height: 53px;
    border: 4.4px solid rgba(0, 240, 255, 0.2);
    border-top-color: #00f0ff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

/* Empty State */
.empty-state {
    text-align: center;
    padding: 4.4rem 2.2rem;
}

.empty-state-icon {
    margin: 0 auto 1.1rem;
    color: #60a5fa;
    opacity: 0.5;
}

.empty-state-title {
    font-size: 1.24rem;
    color: #60a5fa;
    margin-bottom: 0.55rem;
}

.empty-state-text {
    font-size: 0.96rem;
    color: #94a3b8;
    max-width: 30.8rem;
    margin: 0 auto;
}

/* Pagination */
.pagination-container {
    display: flex;
    flex-direction: column;
    gap: 1.1rem;
    align-items: center;
    justify-content: space-between;
    margin-top: 1.1rem;
    padding: 0.83rem 1.1rem;
    background-color: rgba(15, 23, 42, 0.8);
    border-top: 1px solid rgba(59, 130, 246, 0.4);
    position: sticky;
    bottom: 0;
    z-index: 5;
}

.pagination-info {
    font-size: 0.96rem;
    color: #60a5fa;
    text-align: center;
}

.pagination-controls {
    display: flex;
    align-items: center;
    gap: 0.55rem;
}

.pagination-btn {
    background-color: rgba(30, 41, 59, 0.8);
    border: 2px solid rgba(59, 130, 246, 1);
    color: #00f0ff;
    padding: 0.55rem 1.1rem;
    border-radius: 8px;
    font-size: 0.96rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.41rem;
}

.pagination-btn:hover:not(:disabled) {
    background-color: rgba(30, 41, 59, 1);
    border-color: #60a5fa;
}

.pagination-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
    border-color: rgba(59, 130, 246, 0.4);
    color: rgba(255, 255, 255, 0.4);
}

.pagination-page-info {
    font-size: 0.96rem;
    color: #ffffff;
    padding: 0 0.83rem;
    font-weight: 500;
}

.pagination-page-number {
    color: #00f0ff;
    font-weight: 700;
}

/* Responsive */
@media (max-width: 768px) {
    .discovery-table {
        min-width: 1980px;
    }
    
    .discovery-table th,
    .discovery-table td {
        padding: 0.55rem 0.28rem;
        font-size: 0.77rem;
    }
    
    .filter-inputs {
        grid-template-columns: 1fr;
    }
    
    .timeframe-tabs {
        justify-content: center;
    }
    
    .pagination-container {
        flex-direction: column;
    }
    
    .pagination-btn span {
        display: none;
    }
}

@media (min-width: 640px) {
    .pagination-container {
        flex-direction: row;
    }
    
    .pagination-btn span {
        display: inline;
    }
}