/* Status Container Styles */
.status-title {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
}

.pt-2rem {
    padding-top: 2rem;
}

.field {
    margin-block: 0px;
}

.status-message {
    margin: 0;
    color: #6c757d;
}

/* Summary Stats */
.summary-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 24px;
}

.stat-card {
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
}

.stat-number {
    font-size: 24px;
    font-weight: bold;
    color: #495057;
}

.stat-label {
    font-size: 14px;
    color: #6c757d;
    margin-top: 4px;
}

/* Filter Controls */
.filter-controls {
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 24px;
}

.filter-row {
    display: flex;
    gap: 16px;
    align-items: center;
    flex-wrap: wrap;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.filter-label {
    font-size: 12px;
    color: #6c757d;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.filter-select {
    padding: 8px 12px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    background: white;
    font-size: 14px;
}

/* Table Styles */
.broken-links-table {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    overflow-x: auto;
}

.table-header {
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
    padding: 16px 20px;
    font-weight: 600;
    color: #495057;
}

.table {
    width: 100%;
    border-collapse: collapse;
}

.table th {
    background: #f8f9fa;
    padding: 12px 16px;
    text-align: left;
    font-weight: 600;
    color: #495057;
    border-bottom: 2px solid #e9ecef;
    font-size: 13px;
}

.table td {
    padding: 16px;
    border-bottom: 1px solid #f1f3f4;
    vertical-align: top;
}

.table tr:hover {
    background: #f8f9fa;
}

.table tr.no-results {
    text-align: center;
    color: #6c757d;
    font-style: italic;
}

/* Link Type Badges */
.link-type {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.link-type.internal {
    background: #e3f2fd;
    color: #1976d2;
}

.link-type.external {
    background: #f3e5f5;
    color: #7b1fa2;
}

/* Status Code Styling */
.status-code {
    font-family: monospace;
    font-weight: bold;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
}

.status-code.error {
    background: #ffebee;
    color: #c62828;
}

.status-code.warning {
    background: #fff3e0;
    color: #ef6c00;
}

/* URL Display */
.url-display {
    max-width: 300px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.url-link {
    color: #1976d2;
    text-decoration: none;
}

.url-link:hover {
    text-decoration: underline;
}

/* Expand Button */
.expand-btn {
    background: #007cba;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.expand-btn:hover {
    background: #005a87;
}

.expand-btn.expanded {
    background: #6c757d;
}

/* Expandable Row */
.expandable-row {
    display: none;
}

.expandable-row.show {
    display: table-row !important;
}

.expandable-content {
    background: #f8f9fa;
    border-left: 4px solid #007cba;
    padding: 16px;
}

.detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 16px;
}

.detail-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.detail-label {
    font-size: 11px;
    color: #6c757d;
    text-transform: uppercase;
    font-weight: 500;
    letter-spacing: 0.5px;
}

.detail-value {
    font-size: 13px;
    color: #495057;
    word-break: break-word;
}

/* Responsive */
@media(max-width: 768px) {
    .filter-row {
        flex-direction: column;
        align-items: stretch;
    }

    .summary-stats {
        grid-template-columns: 1fr;
    }

    .table {
        font-size: 12px;
    }

    .url-display {
        max-width: 200px;
    }
}

.no-results td {
    text-align: center;
    font-style: italic;
    color: #666;
}

/* Device Selector */
.device-selector {
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 24px;
}

.device-tabs {
    display: flex;
    gap: 8px;
    background: #f8f9fa;
    padding: 4px;
    border-radius: 8px;
    width: fit-content;
}

.device-tab {
    padding: 8px 16px;
    border-radius: 6px;
    border: none;
    background: transparent;
    color: #6c757d;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.device-tab:hover {
    background: #e9ecef;
    color: #495057;
}

.device-tab.active {
    background: #007cba;
    color: white;
}

.device-icon {
    width: 16px;
    height: 16px;
}

/* Score Overview */
.scores-overview {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 32px;
}

.score-card {
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    padding: 24px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.score-circle {
    position: relative;
    width: 80px;
    height: 80px;
    margin: 0 auto 16px;
}

.score-circle svg {
    width: 80px;
    height: 80px;
    transform: rotate(-90deg);
}

.score-circle .background {
    fill: none;
    stroke: #f1f3f4;
    stroke-width: 6;
}

.score-circle .progress {
    fill: none;
    stroke-width: 6;
    stroke-linecap: round;
    transition: stroke-dasharray 0.3s ease;
}

.score-circle .score-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 18px;
    font-weight: bold;
    color: #1a1a1a;
}

.score-title {
    font-size: 14px;
    font-weight: 600;
    color: #495057;
    margin: 0;
    text-transform: capitalize;
}

/* Performance Metrics */
.performance-section {
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 24px;
}

.section-title {
    font-size: 18px;
    font-weight: 600;
    color: #1a1a1a;
    margin: 0 0 24px;
    padding-bottom: 12px;
    border-bottom: 2px solid #f1f3f4;
}

.metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.metric-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    border-radius: 8px;
    background: #f8f9fa;
    transition: all 0.2s ease;
}

.metric-item:hover {
    background: #e9ecef;
}

.metric-status {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    flex-shrink: 0;
}

.metric-status.good {
    background: #009967;
}

.metric-status.warning {
    background: #fc9105;
}

.metric-status.error {
    background: #fb2c36;
}

.metric-content {
    flex: 1;
}

.metric-name {
    font-size: 14px;
    font-weight: 500;
    color: #495057;
    margin: 0 0 4px;
}

.metric-value {
    font-size: 16px;
    font-weight: 600;
    margin: 0;
}

.metric-value.good {
    color: #009967 !important;
}

.metric-value.warning {
    color: #fc9105 !important;
}

.metric-value.error {
    color: #fb2c36 !important;
}

/* Info Panel */
.info-panel {
    background: #f3f7fc;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 24px;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
}

.info-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.info-label {
    font-size: 12px;
    color: #6c757d;
    text-transform: uppercase;
    font-weight: 500;
    letter-spacing: 0.5px;
}

.info-value {
    font-size: 14px;
    color: #495057;
    font-weight: 500;
}

/* Responsive Design */
@media(max-width: 768px) {
    .scores-overview {
        grid-template-columns: repeat(2, 1fr);
    }

    .metrics-grid {
        grid-template-columns: 1fr;
    }

    .device-tabs {
        width: 100%;
        justify-content: center;
    }
}

.loading-container {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 40px 0;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f1f3f4;
    border-top: 4px solid #007cba;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Certificate Chain Styles */
.certificate-chain {
    margin: 30px 0;
}

.certificate-card {
    background: #ffffff;
    border: 1px solid #e3e5e8;
    border-radius: 8px;
    margin-bottom: 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    transition: all 0.2s ease;
    position: relative;
}

.certificate-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.certificate-header {
    padding: 20px 24px 16px;
    border-bottom: 1px solid #f1f3f4;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.certificate-title {
    font-size: 16px;
    font-weight: 600;
    color: #1a1a1a;
    margin: 0 0 4px;
}

.certificate-type {
    font-size: 13px;
    color: #707070;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.certificate-status {
    display: flex;
    align-items: center;
    gap: 8px;
}

.certificate-status .status-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

.validity-period {
    font-size: 12px;
    color: #666;
    margin-top: 4px;
}

.certificate-body {
    padding: 0 24px 24px;
}

.certificate-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 16px;
}

.cert-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.cert-field-label {
    font-size: 11px;
    color: #999;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 500;
}

.cert-field-value {
    font-size: 13px;
    color: #333;
    word-break: break-all;
    line-height: 1.4;
}

.cert-field-value.mono {
    font-family: Monaco, Consolas, 'Courier New', monospace;
    background: #f8f9fa;
    padding: 4px 8px;
    border-radius: 4px;
    border: 1px solid #e9ecef;
}

.chain-connector {
    display: flex;
    justify-content: center;
    margin: -10px 0;
    position: relative;
    z-index: 1;
}

.chain-arrow {
    width: 32px;
    height: 32px;
    background: #f8f9fa;
    border: 2px solid #e3e5e8;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
}

.chain-arrow::after {
    content: '↓';
    font-size: 16px;
    font-weight: bold;
}

/* Responsive adjustments */
@media(max-width: 768px) {
    .certificate-grid {
        grid-template-columns: 1fr;
    }

    .certificate-header {
        flex-direction: column;
        gap: 12px;
        align-items: flex-start;
    }
}

/* Skeleton Card Loading Styles */
.skeleton-card {
    background: #fafbfc;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
    margin-bottom: 20px;
    position: relative;
    overflow: hidden;
    border: 1px solid #e9ecef;
}

.skeleton-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.6), transparent);
    animation: skeleton-loading 1.5s infinite;
}

.skeleton-card-header {
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid #e9ecef;
}

.skeleton-card-body {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.skeleton-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.skeleton-line {
    height: 16px;
    background: #e0e0e0;
    border-radius: 4px;
    position: relative;
    overflow: hidden;
}

.skeleton-line::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.8), transparent);
    animation: skeleton-loading 1.5s infinite;
}

.skeleton-line-long {
    width: 100%;
}

.skeleton-line-medium {
    width: 70%;
}

.skeleton-line-short {
    width: 40%;
}

@keyframes skeleton-loading {
    0% {
        left: -100%;
    }
    100% {
        left: 100%;
    }
}

/* Fade out animation for refresh */
.fade-out {
    opacity: 0;
    transition: opacity 0.2s ease-out;
}

/* Loading Dots Animation */
.loading-dots::after {
    content: '';
    animation: loading-dots 2s infinite;
    padding-left: 3px;
}

@keyframes loading-dots {
    0%, 20% {
        content: '.';
    }
    40% {
        content: '..';
    }
    60%, 100% {
        content: '...';
    }
}

/* Button Loading State */
.btn .spinner {
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
    margin-right: 8px;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.details-title {
    font-size: 18px;
    font-weight: 600;
    color: #1a1a1a;
    margin: 0 0 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e3e5e8;
}

.broken-links-col {
    min-width: 8rem;
}

#details-container-wrapper {
    margin-bottom: 14px;
}