/* Site Link Analyzer Styles */
.sla-container {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

.sla-card {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    padding: 40px;
    border: 1px solid #e5e7eb;
}

.sla-title {
    font-size: 28px;
    font-weight: 700;
    color: #111827;
    margin: 0 0 10px 0;
    text-align: center;
}

.sla-description {
    font-size: 16px;
    color: #6b7280;
    text-align: center;
    margin: 0 0 30px 0;
}

.sla-form {
    display: flex;
    gap: 12px;
    max-width: 600px;
    margin: 0 auto 20px;
    flex-wrap: wrap;
}

.sla-input {
    flex: 1;
    min-width: 250px;
    padding: 12px 16px;
    font-size: 16px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
    font-family: inherit;
}

.sla-input:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.sla-button {
    padding: 12px 24px;
    font-size: 16px;
    font-weight: 600;
    color: #ffffff;
    background: #3b82f6;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.2s, transform 0.1s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-family: inherit;
    white-space: nowrap;
}

.sla-button:hover {
    background: #2563eb;
}

.sla-button:active {
    transform: translateY(1px);
}

.sla-button:disabled {
    background: #9ca3af;
    cursor: not-allowed;
}

.sla-button-secondary {
    background: #10b981;
    font-size: 14px;
    padding: 8px 16px;
}

.sla-button-secondary:hover {
    background: #059669;
}

/* Spinner */
.sla-spinner {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.sla-spinner-icon {
    width: 20px;
    height: 20px;
    animation: rotate 2s linear infinite;
}

.sla-spinner-icon .path {
    stroke: #ffffff;
    stroke-linecap: round;
    animation: dash 1.5s ease-in-out infinite;
}

@keyframes rotate {
    100% {
        transform: rotate(360deg);
    }
}

@keyframes dash {
    0% {
        stroke-dasharray: 1, 150;
        stroke-dashoffset: 0;
    }
    50% {
        stroke-dasharray: 90, 150;
        stroke-dashoffset: -35;
    }
    100% {
        stroke-dasharray: 90, 150;
        stroke-dashoffset: -124;
    }
}

/* Error Message */
.sla-error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #dc2626;
    padding: 12px 16px;
    border-radius: 8px;
    max-width: 600px;
    margin: 0 auto 20px;
    text-align: center;
}

/* Results Section */
.sla-results {
    margin-top: 30px;
    animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.sla-results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 10px;
}

.sla-results-header h3 {
    margin: 0;
    font-size: 20px;
    color: #111827;
}

.sla-search-box {
    margin-bottom: 20px;
}

.sla-search-box .sla-input {
    max-width: 400px;
}

/* Table Styles */
.sla-table-wrapper {
    overflow-x: auto;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    max-height: 600px;
    overflow-y: auto;
}

.sla-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    background: #ffffff;
}

.sla-table thead {
    background: #f9fafb;
    position: sticky;
    top: 0;
    z-index: 10;
}

.sla-table th {
    padding: 12px 16px;
    text-align: left;
    font-weight: 600;
    color: #374151;
    border-bottom: 2px solid #e5e7eb;
    white-space: nowrap;
}

.sla-table td {
    padding: 12px 16px;
    border-bottom: 1px solid #e5e7eb;
    vertical-align: top;
}

.sla-table tbody tr:hover {
    background: #f9fafb;
}

.sla-table tbody tr:last-child td {
    border-bottom: none;
}

/* Links in Table */
.sla-link-list {
    max-height: 150px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.sla-link {
    color: #3b82f6;
    text-decoration: none;
    font-size: 13px;
    word-break: break-all;
    display: block;
    padding: 2px 0;
}

.sla-link:hover {
    text-decoration: underline;
    color: #2563eb;
}

.sla-link-count {
    display: inline-block;
    padding: 2px 8px;
    background: #dbeafe;
    color: #1e40af;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 8px;
}

.sla-no-links {
    color: #9ca3af;
    font-style: italic;
    font-size: 13px;
}

/* Stats */
.sla-stats {
    margin-top: 20px;
    padding: 16px;
    background: #f3f4f6;
    border-radius: 8px;
    display: flex;
    gap: 30px;
    flex-wrap: wrap;
    justify-content: center;
}

.sla-stat-item {
    text-align: center;
}

.sla-stat-value {
    font-size: 24px;
    font-weight: 700;
    color: #111827;
    display: block;
}

.sla-stat-label {
    font-size: 14px;
    color: #6b7280;
}

/* Responsive */
@media (max-width: 768px) {
    .sla-card {
        padding: 24px;
    }
    
    .sla-title {
        font-size: 24px;
    }
    
    .sla-form {
        flex-direction: column;
    }
    
    .sla-input {
        width: 100%;
        min-width: unset;
    }
    
    .sla-button {
        width: 100%;
    }
    
    .sla-results-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .sla-table th,
    .sla-table td {
        padding: 8px 12px;
        font-size: 13px;
    }
}

/* Scrollbar Styling */
.sla-table-wrapper::-webkit-scrollbar,
.sla-link-list::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

.sla-table-wrapper::-webkit-scrollbar-track,
.sla-link-list::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.sla-table-wrapper::-webkit-scrollbar-thumb,
.sla-link-list::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

.sla-table-wrapper::-webkit-scrollbar-thumb:hover,
.sla-link-list::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}