
/* ==========================================================================  
   GENERAL STYLES
   ========================================================================== */

.form-row:has(input:disabled) label,
.form-row:has(textarea:disabled) label
{
    opacity: .5;
    pointer-events: none;
}

.button-container
{
    display: flex;
    flex-flow: wrap;
    gap: 1rem;
}

details summary
{
    cursor: pointer;
    font-size: 1.6rem;
}

details[open] summary
{
    margin-bottom: 2rem;
}




/* ==========================================================================  
   FORM
   ========================================================================== */

.link-crawler-form
{
    margin-bottom: 4rem;
}

.link-crawler-form__crawl-settings
{
    margin: 4rem 0;
}

.link-crawler-form__crawl-settings[open]
{
    border-bottom: 1px solid var(--background-tertiary);
    padding-bottom: 2rem;
}

.link-crawler-form__crawl-settings.disabled
{
    pointer-events: none;
}

.link-crawler-form__crawl-settings[open] summary
{
    border-bottom: 1px solid var(--background-tertiary);
    padding-bottom: 2rem;
}

.link-crawler-form__crawl-settings.disabled summary
{
    opacity: .5;
}

.form-row--flex
{
    align-items: center;
    display: flex;
    gap: 2rem 3rem;
}

@media only screen and (max-width: 1024px)
{

    .form-row--flex
    {
        align-items: flex-start;
        flex-flow: column;
    }

    .form-row:where(.two-columns)
    {
        column-gap: 0;
        columns: 1;
    }

}

@media only screen and (max-width: 1024px)
{

    label[for="link-crawler-form__ignore-url-patterns"]
    {
        margin-top: 4rem;
    }

}

.link-crawler-form__ignore-mime-types,
.link-crawler-form__ignore-url-patterns
{
    font-size: 1.6rem;
    height: 14rem;
}

.link-crawler-form__cancel-button
{
    display: none;
}




/* ==========================================================================  
   CRAWL SUMMARY
   ========================================================================== */

.crawl-summary-wrapper
{
    display: none;
    padding-top: 6rem;
}

.crawl-summary
{
    display: flex;
    gap: 4rem;
}

@media only screen and (max-width: 800px)
{

    .crawl-summary
    {
        flex-flow: column;
    }

}

.crawl-summary__stats
{
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    justify-content: center;
}

.crawl-summary__health-score
{
    line-height: 1;
    margin-bottom: 2rem !important;
}

.crawl-summary__health-score span
{
    display: block;
    font-family: "Francois One", sans-serif;
    font-size: 12rem;
    letter-spacing: -2px;
    margin-top: 1rem;
}

.crawl-summary__health-score--good
{
    color: var(--colour-success);
}

.crawl-summary__health-score--ok
{
    color: var(--colour-warning);
}

.crawl-summary__health-score--bad
{
    color: var(--colour-error);
}

.crawl-summary__breakdown
{
    margin-bottom: 2rem;
}

.crawl-summary__table td
{
    padding: .5rem;
}

.crawl-summary__table td:last-child
{
    text-align: right;
}

.crawl-summary__crawl-date
{
    font-size: 1.6rem;
}

.crawl-summary__chart
{
    flex-shrink: 0;
    height: auto !important;
    max-height: 100%;
    max-width: 40% !important;
}

@media only screen and (max-width: 800px)
{

    .crawl-summary__chart
    {
        max-width: none !important;
        width: 100% !important;
    }

}




/* ==========================================================================  
   RESULTS
   ========================================================================== */

.results-wrapper
{
    display: none;
    margin: 6rem 0;
}

.results-wrapper__header
{
    background: var(--background-primary);
    padding: 2rem 0;
    position: sticky;
    top: 7.8rem;
    z-index: 99;
}

@media only screen and (max-width: 680px)
{

    .results-wrapper__header
    {
        top: 7.2rem;
    }

}


/* --- Filters --- */

.filters__toggle-filters
{
    background: var(--background-secondary);
    display: none;
    float: right;
}

@media only screen and (max-width: 800px)
{

    .filters__toggle-filters
    {
        display: inline-block;
    }

}

.filters__toggle-filters::after
{
    display: none;
}

.results-wrapper h2
{
    line-height: 5.36rem;
    margin-bottom: 0;
}

.filters
{
    display: flex;
    flex-flow: wrap;
    gap: 2rem;
    margin-top: 2rem;
}

@media only screen and (max-width: 800px)
{

    .filters
    {
        height: 0;
        interpolate-size: allow-keywords;
        margin-top: 0;
        overflow: hidden;
        transition: all 200ms ease-in-out;
    }

    .filters.filters--open
    {
        height: auto;
        margin-top: 2rem;
    }

}

.filters__add-select
{
    font-family: "Francois One", sans-serif;
    max-width: 14rem;
}

.filters__add-select,
.filters__select
{
    font-size: 1.6rem;
}

.filters__add-select::after
{
    display: none;
}

.filters__add-select option
{
    background-color: var(--background-secondary);
    font-family: "Open Sans", sans-serif;
    text-align: left;
    text-transform: none;
}

.filters__add-select option:first-child
{
    color: var(--colour-neutral-500);
}

.filters__add-select option:not(:first-child),
.filters__select option:not(:first-child)
{
    color: var(--text-primary);
}

.filters__wrapper
{
    align-items: center;
    display: inline-flex;
    flex: 1 1 auto;
    position: relative;
}

.filters__select
{
    color: #aaa;
    background: var(--background-secondary) radial-gradient(circle at center,var(--colour-neutral-750),var(--colour-neutral-700))
}

.filters__select--active
{
    color: var(--text-primary);
}

.filters__clear
{
    background: none;
    border: none;
    color: var(--text-primary);
    cursor: pointer;
    display: none;
    font-size: 3rem;
    padding: .5rem;
    position: absolute;
    right: .5rem;
}

.filters__select--active + .filters__clear
{
    display: inline-block;
}

.filters__text-box
{
    font-size: 1.6rem;
    padding-right: 4rem;
}


/* --- Results table --- */

.results-table__no-results
{
    font-size: 1.8rem;
    margin: 6rem 0;
    text-align: center;
}

.results-table__clear-filters
{
    white-space: nowrap;
}

.results-table__no-results .bi
{
    font-size: 2.4rem;
    margin-right: 1rem;
}

.results-table__row
{
    transition: background 200ms ease-in-out, margin-bottom 200ms ease-in-out;
}

.results-table__row:not(.expanded)
{
    border-bottom: 1px solid var(--background-tertiary);
}

.results-table__row.expanded
{
    border-radius: 1rem;
    margin-bottom: 2rem;
    padding: 0;
}

.results-table__link-summary
{
    align-items: center;
    cursor: pointer;
    display: flex;
    gap: 1rem;
    line-height: 1.5;
    overflow: hidden;
    padding: 1.5rem 0;
    user-select: none;
}

.results-table__row:where(.expanded) .results-table__link-summary
{
    padding: 2rem;
}

@media only screen and (max-width: 600px)
{

    .results-table__row:where(.expanded) .results-table__link-summary
    {
        align-items: flex-start;
        flex-flow: column;
    }

}

.link-summary__expand-button
{
    appearance: none;
    background: none;
    border: none;
    color: var(--text-primary);
    cursor: pointer;
    flex: 0 0 auto;
    font-size: 1.4rem;
    padding: 0;
    width: 3rem;
}

@media only screen and (max-width: 600px)
{

    .results-table__row:where(.expanded) .link-summary__expand-button
    {
        margin-bottom: 1rem;
    }

}

.link-summary__url
{
    align-items: center;
    display: flex;
    min-width: 0;
}

@media only screen and (max-width: 600px)
{

    .results-table__row:where(.expanded) .link-summary__url
    {
        display: block;
    }

}

.link-summary__favicon
{
    font-size: 2.4rem;
    margin-right: 1rem;
}

@media only screen and (max-width: 600px)
{

    .results-table__row:where(.expanded) .link-summary__favicon
    {
        display: none;
    }

}

.link-summary__url-text
{
    display: block;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.results-table__row:where(.expanded) .link-summary__url-text
{
    font-size: 1.8rem;
    white-space: normal;
    word-break: break-all;
}

@media only screen and (max-width: 600px)
{

    .results-table__row:where(.expanded) .link-summary__url-text
    {
        display: inline;
    }

}

.external-link
{
    align-items: center;
    color: var(--text-primary);
    display: inline-flex;
    flex: 0 0 auto;
    font-size: 1.4rem;
    margin-left: .5rem;
}

.link-summary__status
{
    flex: 0 0 auto;
    margin-left: auto;
}

@media only screen and (max-width: 600px)
{

    .link-summary__status
    {
        font-size: 0;
    }

}

.results-table__row:where(.expanded) .link-summary__status
{
    display: none;
}

.link-summary__status::after
{
    margin-left: 1rem;
}

.link-summary__status::after,
.link-details td[data-label="Status"]::before
{
    font-family: "bootstrap-icons";
    font-size: 2.4rem;
    vertical-align: middle;
}

.link-details td[data-label="Status"]::before
{
    margin-right: 1rem;
}

.results-table__row:not(.error):not(.redirect) .link-summary__status::after,
.results-table__row:not(.error):not(.redirect) .link-details td[data-label="Status"]::before
{
    color: var(--colour-success);
    content: "\f26b";
}

.results-table__row:where(.error) .link-summary__status::after,
.results-table__row:where(.error) .link-details td[data-label="Status"]::before
{
    color: var(--colour-error);
    content: "\f33b";
}

.results-table__row:where(.redirect) .link-summary__status::after,
.results-table__row:where(.redirect) .link-details td[data-label="Status"]::before
{
    color: var(--colour-warning);
    content: "\f141";
}

.results-table__details
{
    height: 0;
    interpolate-size: allow-keywords;
    opacity: 0;
    overflow: hidden;
    transition: all 200ms ease-in-out;
}

.results-table__row.expanded .results-table__details
{
    height: auto;
    opacity: 1;
}

.link-details__wrapper
{
    padding: 2rem;
}

.link-details
{
    border-collapse: collapse;
    width: 100%;
}

.link-details th
{
    width: 15rem;
}

@media only screen and (max-width: 600px)
{

    .link-details th
    {
        padding-bottom: 0 !important;
        width: auto;
    }

}

.link-details th,
.link-details td
{
    border-bottom: 1px solid var(--background-tertiary) !important;
    font-size: 1.6rem;
    line-height: 1.5;
    padding: 1rem;
}

@media only screen and (max-width: 600px)
{

    .link-details th,
    .link-details td
    {
        border-bottom: none !important;
        display: block;
        padding-left: 0;
        padding-right: 0;
    }

}

.link-details tr:last-child th,
.link-details tr:last-child td
{
    border-bottom: none !important;
}

@media only screen and (max-width: 600px)
{

    .link-details td
    {
        border-bottom: 1px solid var(--background-tertiary) !important;
    }

}

.link-details td[data-label="Actions"]
{
    display: flex;
    flex-flow: wrap;
    gap: 2rem;
}

@media only screen and (max-width: 600px)
{

    .results-wrapper .button-container .button
    {
        width: 100%;
    }

}

.results__export-csv-results-button::after,
.results__export-csv-all-links-button::after
{
    content: "\f743" !important;
}

.results__export-xml-sitemap-button::after
{
    content: "\f76b" !important;
}

.results__clear-crawl-results-button
{
    margin-left: auto;
}

@media only screen and (max-width: 1180px)
{

    .results__clear-crawl-results-button
    {
        margin-left: 0;
    }

}

.results__clear-crawl-results-button::after
{
    content: "\f5dd" !important;
}




/* ==========================================================================  
   LINKS MODAL
   ========================================================================== */

.links-modal
{
    align-items: center;
    display: flex;
    inset: 0;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    position: fixed;
    transition: all 200ms ease-in-out;
    visibility: hidden;
    z-index: 1000;
}

.links-modal:where(.links-modal--open)
{
    opacity: 1;
    pointer-events: auto;
    visibility: visible;
}

.links-modal__content
{
    background: var(--background-primary);
    border: 1px solid var(--colour-neutral-550);
    border-radius: var(--border-radius);
    box-shadow:
        var(--box-shadow-inset-light),
        var(--box-shadow-inset-dark),
        var(--box-shadow-dark);
    max-height: 80vh;
    max-width: 100rem;
    overflow-y: auto;
    position: relative;
    transform: translateY(2rem);
    transition: all 200ms ease-in-out;
    width: 90%;
    z-index: 1001;
}

.links-modal:where(.links-modal--open) .links-modal__content
{
    transform: translateY(0);
}

.links-modal__header
{
    background: var(--background-primary);
    border-bottom: 1px solid var(--background-tertiary);
    padding: 3rem;
    position: sticky;
    top: 0;
    z-index: 10;
}

@media only screen and (max-width: 800px)
{

    .links-modal__header
    {
        padding: 2rem;
    }

}

.links-modal__title
{
    font-size: 3.2rem;
    line-height: 4.2rem;
    margin-bottom: 1px;
}

.links-modal__close
{
    appearance: none;
    background: transparent;
    border: none;
    color: var(--text-primary);
    cursor: pointer;
    font-size: 4rem;
    line-height: 1;
    padding: 0;
    position: absolute;
    top: 3rem;
    right: 3rem;
}

.links-modal__description
{
    font-size: 1.6rem;
    font-style: italic;
    margin-bottom: 0 !important;
    word-wrap: break-word;
}

.links-modal__list
{
    margin: 0;
    padding: 3rem;
}

@media only screen and (max-width: 800px)
{

    .links-modal__list
    {
        padding: 2rem;
    }

}

.links-modal__list-item
{
    color: var(--colour-neutral-500);
    border-bottom: 1px solid var(--background-tertiary);
    padding: 2rem 0;
}

.links-modal__list-item:first-child
{
    padding-top: 0;
}

.links-modal__list-item:last-child
{
    border-bottom: none;
    padding-bottom: 0;
}

p.links-modal__link-header
{
    display: flex;
    font-size: 1.8rem;
    margin-bottom: 1rem;
}

.links-modal__link-text
{
    color: var(--text-primary) !important;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.links-modal__link-detail
{
    font-size: 1.6rem;
    line-height: 1.2;
    margin-bottom: 0;
}

.links-modal code
{
    white-space: normal;
    word-break: break-all;
}

.link-detail__highlighted
{
    background: var(--background-tertiary);
    border-radius: 3px;
    color: var(--colour-neutral-300);
    padding: 0 2px;
}