/* dashboard css */

.site-card {
    background: white;
    border: 1px solid #e0e6ed;
    border-radius: 6px;
    padding: 12px 15px;
    margin-bottom: 12px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.brand-section {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.brand-section img {
    width: 14px;
    height: 14px;
    border-radius: 2px;
    object-fit: cover;
}

.brand-name {
    color: #3498db;
    font-weight: 600;
    font-size: 0.85rem;
    text-decoration: none;
}

.brand-url {
    color: #8e959c;
    font-size: 0.8rem;
    text-decoration: none;
}

.section-divider {
    border: 0;
    border-top: 1px solid #dddedf;
    margin: 0 -15px 12px -15px;
    opacity: 1;
}

.stats-table {
    width: 100%;
    table-layout: fixed;
}

.stats-table td {
    vertical-align: top;
    padding: 0 5px;
}

.label-text {
    color: #000;
    font-weight: 600;
    font-size: 0.65rem;
    margin-bottom: 4px;
    display: block;
}

.value-main {
    font-size: 1.1rem;
    font-weight: 700;
    color: #333;
    display: flex;
    align-items: center;
    gap: 4px;
    line-height: 1.1;
}

.url-text {
    color: #3498db;
    font-weight: 600;
    font-size: 0.8rem;
    text-decoration: none;
    word-break: break-all;
}

.text-blue {
    color: #3498db;
}

.trend {
    font-size: 0.75rem;
    font-weight: 700;
    margin-top: 2px;
}

.time-info {
    color: #6c757d;
    font-size: 0.7rem;
    font-weight: 400;
}

.gauge-container {
    position: relative;
    width: 30px;
    height: 15px;
    overflow: hidden;
    display: inline-block;
    margin-left: 2px;
}

.gauge-arch {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: conic-gradient(from 270deg, #fd7e14 0deg, #fd7e14 70deg, #dee2e6 70deg, #dee2e6 180deg);
    mask: radial-gradient(farthest-side, transparent 65%, white 66%);
    -webkit-mask: radial-gradient(farthest-side, transparent 65%, white 66%);
}

.btn-setup {
    background-color: #0d6efd;
    color: white;
    border: none;
    padding: 3px 10px;
    border-radius: 4px;
    font-weight: 600;
    font-size: 0.75rem;
}

.dropdown-menu {
    border: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    font-size: 0.85rem;
    border-radius: 8px;
}

.dropdown-item {
    padding: 8px 16px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.dropdown-item i {
    font-size: 1rem;
}

.text-delete {
    color: #dc3545;
}


/* MOBILE RESPONSIVE CSS */

@media (max-width: 768px) {
    .stats-table,
    .stats-table tbody,
    .stats-table tr,
    .stats-table td {
        display: block;
        width: 100% !important;
    }
    .stats-table td {
        padding: 8px 0;
        border-bottom: 1px solid #f8f9fa;
    }
    .stats-table td:last-child {
        border-bottom: none;
    }
    .label-text {
        margin-bottom: 2px;
    }
    .site-card {
        padding: 15px;
    }
    .col-lg-8 {
        padding: 10px !important;
    }
}


/* dashboard css end */

.empty-audit-state {
    border: 2px dashed #ff6b35;
    border-radius: 10px;
    background-color: #fafafa;
    padding: 50px 20px;
    margin-top: 2rem;
}


/* Custom Button Styling */

.btn-audit-start {
    background-color: #ff6b35;
    color: white;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: none;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.btn-audit-start:hover {
    background-color: #e85a2a;
    color: white;
    transform: scale(1.05);
}


/* Responsive Fixes */

@media (max-width: 768px) {
    .empty-audit-state {
        padding: 50px 15px;
        margin: 15px;
        border-width: 1.5px;
    }
    .btn-audit-start {
        font-size: 0.85rem;
        padding: 10px 15px !important;
        max-width: 280px;
        margin: 0 auto;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    .btn-audit-start i {
        font-size: 1rem;
    }
}

.custom-nav {
    border-bottom: 1px solid #b4b4b4;
    margin-left: 12px !important;
}

.nav-link {
    color: #000;
    font-weight: 600;
    font-size: 0.85rem;
    padding: 10px 1rem !important;
    transition: 0.3s;
    cursor: pointer !important;
}

.nav-link:hover {
    color: #F25C27;
}

.nav-link.active {
    color: #F25C27;
    border-bottom: 3px solid #F25C27;
}

.nav-item {
    margin-bottom: -1px;
}

.seo-card {
    border-radius: 8px;
    border: 1px solid #e0e0e0;
    background: #ffffff;
    padding: 25px;
}

.progress {
    background-color: #f0f2f5;
    overflow: visible;
}

.progress-bar-custom {
    height: 8px;
    border-radius: 10px;
    margin-bottom: 20px;
}

.progress-bar {
    border-radius: 10px;
}

.bg-Errors {
    background-color: #FF4954;
}

.bg-Warning {
    background-color: #FF8C44;
}

.bg-Notices {
    background-color: #2CB3FF;
}

.bg-Passed {
    background-color: #50e3a4;
}

.score-circle {
    width: 160px;
    height: 160px;
    background: radial-gradient(circle, #ffffff 60%, #fffcf0 100%);
    border: 10px solid #f8f9fa;
    border-top-color: #FF8C44;
    border-right-color: #FF8C44;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    border-radius: 50%;
}

.beta-tag {
    background: linear-gradient(135deg, #fff0e0 0%, #ffe0c0 100%);
    color: #fd7e14;
    padding: 4px 12px;
    font-size: 10px;
    letter-spacing: 1px;
    border: 1px solid rgba(253, 126, 20, 0.2);
}


/* AI Partial Circle Styling */

.ai-circle-container {
    position: relative;
    width: 160px;
    height: 160px;
    margin: 0 auto;
}

.ai-circle-svg {
    transform: rotate(135deg);
}

.ai-circle-bg {
    fill: none;
    stroke: #f1f1f1;
    stroke-width: 12;
    stroke-linecap: round;
    stroke-dasharray: 306, 408;
}

.ai-circle-progress {
    fill: none;
    stroke: #50e3a4;
    stroke-width: 12;
    stroke-linecap: round;
    stroke-dasharray: 306, 408;
    transition: stroke-dashoffset 1s ease-in-out;
}

.ai-circle-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}

.custom-issue-text {
    color: #3498db !important;
    font-size: 0.85rem !important;
    font-weight: 500 !important;
    text-align: center !important;
    vertical-align: middle;
}


/* =======================
MOBILE RESPONSIVE FIXES
======================= */

@media (max-width: 991px) {
    /* Navbar */
    .nav {
        overflow-x: auto;
        overflow-y: hidden;
        white-space: nowrap;
        flex-wrap: nowrap;
        scrollbar-width: none;
    }
    .nav::-webkit-scrollbar {
        display: none;
    }
    .nav-link {
        padding: 0.7rem 1rem !important;
        font-size: 0.7rem;
    }
    .seo-card {
        padding: 20px;
        border-radius: 16px;
    }
    .score-circle {
        width: 130px;
        height: 130px;
        border-width: 8px;
    }
    .score-circle h1 {
        font-size: 1.8rem;
    }
    /* AI Circle */
    .ai-circle-container {
        width: 130px;
        height: 130px;
    }
    .ai-circle-svg {
        width: 130px;
        height: 130px;
    }
    .ai-circle-text h2 {
        font-size: 1.5rem;
    }
}

@media (max-width: 767.97px) {
    .custom-nav {
        margin-left: 8px !important;
    }
    .seo-card {
        padding: 16px;
        border-radius: 10px;
    }
    .seo-card h5 {
        font-size: 1rem;
    }
    .seo-card button {
        font-size: 0.8rem;
        padding: 6px 12px;
    }
    .progress-bar-custom {
        height: 6px;
        margin-bottom: 14px;
    }
    .seo-card .text-muted {
        font-size: 0.85rem;
    }
    .seo-card a.btn-link {
        font-size: 0.85rem;
    }
}


/* table css */

.issues-table-card {
    border-radius: 10px;
    border: none;
    background: #ffffff;
    overflow: hidden;
}

.table thead th {
    background-color: #f8f9fa;
    border-bottom: 1px solid #eee;
    color: #6c757d;
    font-size: 0.85rem;
    text-transform: uppercase;
    padding: 15px;
}

.table tbody td {
    padding: 10px 15px;
    vertical-align: middle;
    border-bottom: 2px solid #f1f1f1;
}

.table tbody tr:hover td {
    background-color: #F1F0F5 !important;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.table tbody tr:hover span.fw-medium {
    color: #000 !important;
}

.ai-badge {
    background-color: #eef2ff;
    color: #F25C27;
    font-size: 10px;
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: bold;
    margin-left: 8px;
}

.how-to-fix {
    color: #6c757d;
    text-decoration: none;
    font-size: 0.9rem;
}

.how-to-fix:hover {
    color: #F25C27;
    border-bottom-color: #F25C27;
}

.issue-icon {
    width: 24px;
    text-align: center;
    margin-right: 10px;
}


/* Mobile Optimization */

@media (max-width: 576px) {
    .table tbody td {
        display: block;
        width: 100%;
        text-align: left !important;
        padding: 10px 20px;
        border-bottom: none;
    }
    .table tbody tr {
        display: block;
        /* border-bottom: 10px solid #f8f9fa;
    padding: 10px 0; */
    }
    .issue-icon {
        margin-right: 5px;
    }
    .mobile-issues-count {
        font-size: 0.85rem;
        background: #e7f1ff;
        padding: 2px 8px;
        border-radius: 5px;
        display: inline-block;
        margin-top: 5px;
    }
}


/* Success Theme for Overview Empty State */

.success-icon-circle-small {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    background-color: #e8f5e9;
    margin-bottom: 12px;
}

.success-icon-circle-small i {
    font-size: 1.5rem;
    color: #28a745;
}

.success-msg-title {
    font-weight: 600;
    color: #000;
}


/* Overview Footer Styling */

.view-all-footer {
    cursor: pointer;
    background-color: #e2e6ea;
    border-top: 1px solid #ced4da;
    padding: 12px;
    text-align: center;
}

.view-all-footer .footer-link {
    text-decoration: none;
    color: #000;
    font-size: 0.85rem;
    font-weight: 700;
}


/* table css end */


/* issue css */

.success-icon-circle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    background-color: #e8f5e9;
    margin-bottom: 1rem;
}


/* Icon Styling */

.success-icon-circle i {
    font-size: 2rem;
    color: #28a745;
}

.success-msg-title {
    font-weight: 600;
    color: #212529;
    font-size: 14px;
    margin-bottom: 0.25rem;
}

.success-msg-subtitle {
    color: #000;
    font-size: 0.95rem;
    font-size: 12px;
}

.issue-filter-nav {
    display: inline-flex;
    border: 1px solid #6c6f72;
    border-radius: 4px;
    overflow: hidden;
    background: #fff;
    margin-bottom: 25px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.issue-filter-nav::-webkit-scrollbar {
    display: none;
}

.filter-btn {
    padding: 8px 16px;
    font-size: 0.75rem;
    font-weight: 600;
    color: #000;
    text-decoration: none;
    border-right: 1px solid #8c949b;
    background: #fff;
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
    flex-shrink: 0;
}

.filter-btn:last-child {
    border-right: none;
}

.filter-btn.active {
    background-color: #FFF1ED !important;
    color: #000 !important;
    position: relative;
    z-index: 1;
}

.filter-btn.active span {
    color: #000;
}

.filter-btn:hover:not(.active) {
    background-color: #f8f9fa;
    color: #F25C27;
}


/* Mobile specific adjustments */

@media (max-width: 576px) {
    .issue-filter-nav {
        display: flex;
        margin-bottom: 15px;
    }
    .filter-btn {
        padding: 10px 14px;
        font-size: 0.7rem;
    }
}

.issue-item-card {
    border-left: 5px solid #dee2e6;
    transition: transform 0.2s;
    cursor: pointer;
}

.issue-item-card:hover {
    transform: scale(1.01);
}

.border-error {
    border-left-color: #dc3545 !important;
}

.border-warning {
    border-left-color: #ffc107 !important;
}

.border-notice {
    border-left-color: #0dcaf0 !important;
}


/* Main container for groups */

.audit-group-container {
    background: #fff;
    overflow: hidden;
    margin-bottom: 30px;
}

.group-header {
    padding: 15px 20px;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 8px;
    background: #fff;
}


/* Success border color */

.border-top-success {
    border-top: 4px solid #28a745 !important;
}

.text-success {
    color: #28a745 !important;
}


/* Top borders based on type */

.border-top-error {
    border-top: 4px solid #ff3c3c !important;
}

.border-top-warning {
    border-top: 4px solid #dda036 !important;
}

.border-top-notice {
    border-top: 4px solid #2296d2 !important;
}

.border-top-success {
    border-top: 4px solid #7fc84e !important;
}

.audit-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 20px;
    border-bottom: 1px solid #f1f1f1;
    transition: background 0.2s;
}

.audit-row:last-child {
    border-bottom: none;
}

.audit-row:hover {
    background: #F1F0F5;
}

.issue-text {
    font-size: 0.95rem;
    color: #333;
}

.issue-text a {
    color: #3498db;
    text-decoration: none;
    font-weight: 500;
}

.fix-link {
    color: #888 !important;
    font-size: 0.85rem;
    margin-left: 10px;
    text-decoration: underline !important;
}

.new-issues-count {
    font-size: 0.85rem;
    color: #3498db;
    font-weight: 500;
}

.info-icon {
    font-size: 12px;
    color: #ccc;
    cursor: help;
}


/* Mobile Responsive Adjustments */

@media (max-width: 768px) {
    .audit-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
        padding: 15px;
    }
    .issue-text {
        line-height: 1.4;
    }
    .fix-link {
        display: block;
        margin-left: 0;
        margin-top: 5px;
    }
    .new-issues-count {
        align-self: flex-end;
        font-size: 0.8rem;
        background: #f8f9fa;
        padding: 2px 8px;
        border-radius: 4px;
    }
    .filter-btn {
        padding: 6px 12px;
        font-size: 0.8rem;
    }
}


/* issue end */


/* crawled section */

.success-icon-circle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    background-color: #e8f5e9;
    margin-bottom: 1.2rem;
}

.success-icon-circle i {
    font-size: 2rem;
    color: #28a745;
}

.success-msg-title {
    font-weight: 600;
    color: #212529;
    margin-bottom: 0.25rem;
}

.success-msg-subtitle {
    color: #000;
    font-size: 12px;
}

.btn-orange {
    background-color: #F25C27;
    color: white;
    border: none;
    transition: 0.3s;
}

.btn-orange:hover {
    background-color: #d44b1d;
    color: white;
    transform: translateY(-1px);
}

#empty-crawl {
    background: #ffffff;
    border: 2px dashed #e0e0e0;
    border-radius: 12px;
    margin: 10px 0;
}

#empty-crawl-state {
    background: #ffffff;
    border: 2px dashed #e0e0e0;
    border-radius: 12px;
    margin: 20px 0;
}

.btn-orange {
    background-color: #f05a28;
    color: white;
    border: none;
}

.btn-orange:hover {
    background-color: #d84a1d;
    color: white;
}


/* Table Wrapper for Horizontal Scroll */

.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border: 1px solid #f1f1f1;
    /* border-radius: 8px; */
    /* margin-bottom: 1rem; */
}

.custom-table {
    width: 100%;
    min-width: 800px;
    border-collapse: collapse;
}

.custom-table th,
.custom-table td {
    white-space: nowrap;
    padding: 12px 15px;
}

.url-link {
    display: inline-block;
    max-width: 500px;
    overflow: hidden;
    text-overflow: ellipsis;
    vertical-align: middle;
    color: #3498db;
    text-decoration: none;
}

.table-responsive::-webkit-scrollbar {
    height: 6px;
}

.table-responsive::-webkit-scrollbar-thumb {
    background: #dee2e6;
    border-radius: 10px;
}

.custom-table thead {
    background-color: #f8f9fa;
}

.custom-table th {
    font-size: 0.85rem;
    color: #000;
    font-weight: 600;
    border-bottom: 2px solid #e0e1e3;
    padding: 12px;
}

.custom-table td {
    font-size: 0.9rem;
    vertical-align: middle;
    padding: 12px 8px;
    color: #333;
}

.dataTables_wrapper .dataTables_filter {
    display: none;
}

table.dataTable.no-footer {
    border-bottom: none !important;
}

.status-badge {
    padding: 5px 12px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.8rem;
}

.bg-success-subtle {
    background-color: #e8f5e9;
    color: #2e7d32;
    border: 1px solid #c8e6c9;
}

.url-link:hover {
    text-decoration: underline;
}

.external-icon {
    font-size: 12px;
    margin-left: 5px;
    color: #adb5bd;
}

.table-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    gap: 15px;
}

.search-wrapper {
    position: relative;
    flex: 1;
    max-width: 400px;
}

.search-input {
    width: 100%;
    padding: 10px 15px 10px 40px;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    font-size: 0.9rem;
    outline: none;
    transition: border-color 0.3s;
}

.search-input:focus {
    border-color: #F25C27;
}

.search-icon {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #adb5bd;
}

@media (max-width: 576px) {
    .table-controls {
        flex-direction: column;
        align-items: stretch;
    }
    .search-wrapper {
        max-width: 100%;
    }
}

@media (max-width: 767px) {
    #myCrawlTable thead {
        display: none !important;
    }
    .custom-table {
        min-width: 100% !important;
    }
    .custom-table td {
        white-space: normal !important;
        display: block;
        width: 100% !important;
        border-bottom: 1px solid #eee;
    }
    .url-link {
        max-width: 100% !important;
        word-break: break-all;
    }
    .table-responsive {
        overflow-x: hidden !important;
    }
}


/* crawled end */


/* passed section */

.danger-icon-circle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    background-color: #fceaea;
    margin-bottom: 1rem;
}

.danger-icon-circle i {
    font-size: 2rem;
    color: #dc3545;
}

.danger-msg-title {
    font-weight: 600;
    color: #212529;
    font-size: 14px;
    margin-bottom: 0.25rem;
}

.danger-msg-subtitle {
    color: #000;
    font-size: 12px;
}


/* passes end */


/* ai issue css */

.ai-search-badge-small {
    background-color: #63b3ed;
    color: #ffffff;
    padding: 2px 12px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 10px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1.5;
    border: none;
    vertical-align: middle;
}


/* Fix link styling if needed */

.fix-link {
    color: #000;
    border-bottom: 1px dashed #ccc;
}


/* ai issue end */


/* Desktop default */

.popover {
    max-width: 400px !important;
    border-radius: 10px;
}


/* Mobile Devices Fix */

@media (max-width: 576px) {
    .custom-popover {
        max-width: 280px !important;
        margin-left: 10px;
        margin-right: 30px !important;
    }
    .popover {
        max-width: 90vw !important;
        border-radius: 10px;
    }
    .popover .popover-arrow {
        display: block !important;
    }
    .popover-body {
        font-size: 0.75rem;
        padding: 10px;
        word-wrap: break-word;
    }
    h1.fs-3 {
        font-size: 1.3rem !important;
    }
}

.spin {
    animation: spin 1s linear infinite;
}

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

.fix-tooltip {
    position: absolute;
    width: 380px;
    max-width: 95vw;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15);
    padding: 15px;
    z-index: 9999;
    display: none;
}

.tooltip-columns {
    display: flex;
    gap: 10px;
}

.tooltip-columns div {
    width: 50%;
}

.tooltip-columns .green {
    background: #eaf6ef;
    padding: 8px;
    border-radius: 6px;
}

.fix-tooltip h6 {
    font-size: 13px;
    font-weight: 700;
}

.fix-tooltip p {
    font-size: 12px;
    line-height: 1.5;
}


/* MOBILE BEHAVIOR */

@media (max-width: 768px) {
    .fix-tooltip {
        position: fixed;
        left: 50% !important;
        top: 50% !important;
        transform: translate(-50%, -50%);
        width: 95%;
        max-height: 80vh;
        overflow-y: auto;
    }
}