/* ========================================
   Brand Citations Page Styles
======================================== */

/* History Table */
.history-table-wrapper {
    background: var(--gray-800);
    border: 1px solid var(--gray-700);
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 24px;
}

.history-table {
    width: 100%;
    border-collapse: collapse;
}

.history-table th {
    text-align: left;
    padding: 14px 20px;
    background: rgba(0, 0, 0, 0.2);
    color: var(--gray-400);
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid var(--gray-700);
}

.history-table td {
    padding: 16px 20px;
    border-bottom: 1px solid var(--gray-700);
    color: var(--gray-300);
    font-size: 14px;
    vertical-align: middle;
}

.history-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.02);
}

.history-table tbody tr:last-child td {
    border-bottom: none;
}

.date-cell {
    color: var(--gray-500);
    font-size: 13px;
    white-space: nowrap;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 16px;
    padding: 20px 0;
}

.pagination-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    background: var(--gray-800);
    border: 1px solid var(--gray-700);
    border-radius: 8px;
    color: var(--gray-400);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.pagination-btn:hover:not(:disabled) {
    border-color: var(--red-500);
    color: var(--red-500);
}

.pagination-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.pagination-info {
    color: var(--gray-500);
    font-size: 14px;
}

/* Date Range Selector */
.date-range-selector {
    display: flex;
    gap: 4px;
    background: var(--gray-800);
    border: 1px solid var(--gray-700);
    border-radius: 8px;
    padding: 4px;
}

.date-btn {
    padding: 8px 16px;
    border: none;
    background: transparent;
    color: var(--gray-400);
    font-size: 14px;
    font-weight: 500;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.date-btn:hover {
    color: #fff;
}

.date-btn.active {
    background: var(--red-500);
    color: #fff;
}

/* Domain Info Banner */
.domain-info-banner {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.1) 0%, rgba(34, 197, 94, 0.05) 100%);
    border: 1px solid rgba(34, 197, 94, 0.2);
    border-radius: 12px;
    padding: 16px 20px;
    margin-bottom: 24px;
}

.domain-info-content {
    display: flex;
    align-items: center;
    gap: 12px;
}

.domain-info-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: rgba(34, 197, 94, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #22c55e;
}

.domain-info-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.domain-tracking {
    font-size: 12px;
    color: var(--gray-400);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.domain-name {
    font-size: 16px;
    font-weight: 600;
    color: #22c55e;
}

/* Provider Breakdown */
.provider-breakdown {
    background: var(--gray-800);
    border: 1px solid var(--gray-700);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 24px;
}

.section-title {
    font-size: 16px;
    font-weight: 600;
    color: #fff;
    margin-bottom: 16px;
}

.provider-bars {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.provider-bar-item {
    display: flex;
    align-items: center;
    gap: 12px;
}

.provider-bar-name {
    width: 120px;
    font-size: 14px;
    color: var(--gray-300);
    display: flex;
    align-items: center;
    gap: 8px;
}

.provider-bar-name .provider-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.provider-bar-track {
    flex: 1;
    height: 24px;
    background: var(--gray-700);
    border-radius: 6px;
    overflow: hidden;
}

.provider-bar-fill {
    height: 100%;
    border-radius: 6px;
    display: flex;
    align-items: center;
    padding: 0 10px;
    font-size: 12px;
    font-weight: 600;
    color: #fff;
    transition: width 0.5s ease;
}

.provider-bar-count {
    font-size: 14px;
    font-weight: 600;
    color: var(--gray-300);
    width: 40px;
    text-align: right;
}

/* Provider Badge in Table */
.provider-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: var(--gray-700);
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
}

.provider-badge .provider-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

/* Query Cell in Table */
.query-cell {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.query-text {
    font-weight: 500;
    color: #fff;
}

.query-monitor {
    font-size: 12px;
    color: var(--gray-500);
}

/* Citation Cell in Table */
.citation-cell {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.citation-title {
    color: #fff;
    font-weight: 500;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.citation-url {
    font-size: 12px;
    color: var(--gray-500);
    max-width: 300px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.citation-url a {
    color: inherit;
    text-decoration: none;
}

.citation-url a:hover {
    color: var(--red-500);
}

/* Responsive */
@media (max-width: 768px) {
    .date-range-selector {
        width: 100%;
        justify-content: center;
    }

    .provider-bar-name {
        width: 80px;
        font-size: 12px;
    }

    .content-header-right {
        flex-direction: column;
        width: 100%;
    }

    .content-header-right .filter-select {
        width: 100%;
    }
}
