/* Analytics Page Styles */

/* Small button variant */
.btn-sm {
    padding: 0.125rem 0.25rem !important;
    font-size: 0.875rem !important;
    line-height: 1.2 !important;
    min-width: auto !important;
}

/* Compact action buttons */
.compact-actions {
    display: flex;
    gap: 0.25rem;
    flex-wrap: nowrap;
    justify-content: flex-start;
    align-items: center;
}

.compact-actions a,
.compact-actions .btn {
    padding: 0.125rem 0.25rem !important;
    font-size: 0.875rem !important;
    line-height: 1.2 !important;
    min-width: auto !important;
    white-space: nowrap;
    flex-shrink: 0;
}

/* Badge tooltips */
.badge[title] {
    cursor: help;
    position: relative;
}

.badge[title]:hover {
    opacity: 0.8;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

/* Badge variants */
.badge-danger {
    background-color: #dc3545;
    color: white;
    cursor: help;
}

.badge-danger:hover {
    background-color: #c82333;
    box-shadow: 0 2px 4px rgba(220, 53, 69, 0.4);
}

.badge-success {
    background-color: #28a745;
    color: white;
}

.badge-success:hover {
    background-color: #218838;
    box-shadow: 0 2px 4px rgba(40, 167, 69, 0.4);
}

/* Protocol info box */
.protocol-info {
    background: #e8f4f8;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.protocol-info h3 {
    margin-top: 0;
    color: #2c3e50;
}

/* Capability badges */
.capabilities-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
}

.capability-badge {
    padding: 0.125rem 0.5rem;
    background: #17a2b8;
    color: white;
    border-radius: 3px;
    font-size: 0.8rem;
}

/* Address badges */
.address-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
}

.address-badge {
    padding: 0.125rem 0.5rem;
    background: #6c757d;
    color: white;
    border-radius: 3px;
    font-size: 0.8rem;
}

/* News sections (for ipv6_weekly_news) */
.news-section {
    background: #f9f9f9;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 30px;
}

.news-section h2 {
    margin-top: 0;
    padding-bottom: 10px;
    border-bottom: 2px solid #ddd;
}

.news-section.new-working {
    border-left: 4px solid #28a745;
}

.news-section.new-nonworking {
    border-left: 4px solid #ffc107;
}

.news-section.lost-ipv6 {
    border-left: 4px solid #dc3545;
}

.news-section.gained-ipv6 {
    border-left: 4px solid #17a2b8;
}

/* Stats summary cards */
.stats-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 30px;
}

.stat-card {
    background: white;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.stat-card h3 {
    font-size: 2rem;
    margin: 0 0 10px 0;
}

.stat-card p {
    margin: 0;
    color: #666;
}

.stat-card.working {
    border-top: 4px solid #28a745;
}

.stat-card.nonworking {
    border-top: 4px solid #ffc107;
}

.stat-card.lost {
    border-top: 4px solid #dc3545;
}

.stat-card.gained {
    border-top: 4px solid #17a2b8;
}

/* Info box */
.info-box {
    background: #f0f8ff;
    border-left: 4px solid #17a2b8;
    padding: 15px;
    border-radius: 4px;
    margin: 20px 0;
}

.info-box p {
    margin: 0;
}

/* Stats box */
.stats-box {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.stats-box h3 {
    margin: 0;
    color: #2c3e50;
}

/* Alert styles */
.alert {
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 4px;
    border: 1px solid transparent;
}

.alert-error {
    background-color: #f8d7da;
    border-color: #f5c6cb;
    color: #721c24;
}

.alert-warning {
    background-color: #fff3cd;
    border-color: #ffeaa7;
    color: #856404;
}

.alert-info {
    background-color: #d1ecf1;
    border-color: #bee5eb;
    color: #0c5460;
}

/* Table responsive */
.table-responsive {
    overflow-x: auto;
}

/* Actions column styling - ensure consistent width across all analytics tables */
table th:last-child,
table td:last-child {
    min-width: 145px;
    width: 145px;
}

/* Ensure sortable tables maintain proper column widths */
.sortable-table {
    table-layout: auto;
    width: 100%;
}

/* Tooltip helper classes */
.tooltip-copy-group {
    color: #6c757d;
    font-size: 0.875rem;
}
