/*  Top Trades Section */
.slick-prev:focus,
.slick-next:focus {
    outline: 3px solid #0d6efd;
    outline-offset: 4px;
    border-radius: 50%;
}

/* Current Open Tabs : Alphastock Filters */
.nav-link:focus,
.form-select:focus {
    outline: 3px solid #0d6efd;
    outline-offset: 2px;
    box-shadow: none;
}

.stock-card:focus {
    outline: 3px solid #0d6efd;
    outline-offset: 4px;
    box-shadow: none;
}

.visually-hidden {
    position: absolute !important;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;

    display: grid;
    /* grid-template-columns: repeat(2, auto); */
    column-gap: 40px;
    row-gap: 10px;
}

.footer-links li {
    margin: 0;
}

.footer-links a {
    text-decoration: none;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ==========================================
   Browser Zoom 200% Fix
========================================== */

.trade-info {
    gap: 12px;
}

.return-block,
.duration-block {
    min-width: 120px;
}

@media (max-width: 1200px) {

    .trade-divider {
        display: none;
    }

    .trade-info {
        flex-direction: column;
        align-items: flex-start !important;
    }
}


/* ==========================================
   WCAG Reflow Fix
   320px Width / 400% Zoom
========================================== */

@media (max-width: 320px) {

    /* Card spacing */
    .top-trades .card {
        margin: 5px !important;
    }

    /* Prevent content overflow */
    .trade-footer {
        flex-direction: column;
        align-items: flex-start !important;
        flex-wrap: wrap;
        gap: 10px;
    }

    /* Full width blocks */
    .return-block,
    .duration-block {
        width: 100%;
        min-width: unset;
    }

    /* Hide divider */
    .trade-divider,
    .top-trades .vr {
        display: none !important;
    }

    /* Badge text wrapping */
    .top-trades .badge {
        white-space: normal;
        word-break: break-word;
        line-height: 1.4;
        max-width: 100%;
    }

    /* Company name wrapping */
    .top-trades .card-title,
    .top-trades h5 {
        word-break: break-word;
        overflow-wrap: break-word;
    }

    /* Card footer padding */
    .top-trades .card-footer {
        padding: 1rem !important;
    }

    /* Prevent slick overflow */
    .top-trades .slick-list {
        overflow: hidden;
    }

    /* Slick arrows */
    .top-trades .slick-prev {
        left: -10px !important;
        z-index: 10;
    }

    .top-trades .slick-next {
        right: -10px !important;
        z-index: 10;
    }

    /* Dots spacing */
    .top-trades .slick-dots {
        bottom: -35px;
    }

    /* Card body */
    .top-trades .card-body {
        padding: 1rem !important;
    }

    /* Prevent image shrinking */
    .trade-footer img {
        flex-shrink: 0;
    }
}


/* ==========================================
   Slick Equal Height Fix
========================================== */
@media (max-width: 320px) {

    .top-trades .card {
        margin: 5px !important;
        height: auto !important;
    }

    .top-trades .card-body,
    .top-trades .card-footer {
        padding: 1rem !important;
    }

    .trade-footer {
        flex-wrap: wrap;
        align-items: flex-start !important;
        gap: 10px;
    }

    .trade-divider,
    .top-trades .vr {
        display: none !important;
    }

    .return-block,
    .duration-block {
        min-width: auto;
        width: 100%;
    }

    .top-trades .badge {
        white-space: normal;
        word-break: break-word;
        max-width: 100%;
    }

    .top-trades .card-title,
    .top-trades h5 {
        word-break: break-word;
        overflow-wrap: break-word;
    }

    /* Arrows */
    .top-trades .slick-prev {
        left: -8px !important;
        z-index: 10;
    }

    .top-trades .slick-next {
        right: -8px !important;
        z-index: 10;
    }
}

@media (max-width: 320px) {

    .top-trades .slick-dots {
        display: flex !important;
        justify-content: center;
        align-items: center;
        flex-wrap: nowrap !important;
        overflow-x: auto;
        overflow-y: hidden;
        white-space: nowrap;
        width: 100%;
        padding: 0;
        margin: 15px 0 0;
    }

    .top-trades .slick-dots li {
        margin: 0 2px;
        flex: 0 0 auto;
    }
}

@media (max-width: 320px) {

    .top-trades .slick-dots li button:before {
        font-size: 8px !important;
    }

    .top-trades .slick-dots li {
        width: 12px;
        height: 12px;
    }
}

@media (max-width: 320px) {

    .top-trades .slick-dots {
        display: none !important;
    }
}

/* WCAG Reflow Fix - 320px / 400% Zoom */
@media (max-width: 320px) {

    html,
    body {
        overflow-x: hidden;
        width: 100%;
    }

    .container,
    .container-fluid {
        max-width: 100%;
        padding-left: 1rem !important;
        padding-right: 1rem !important;
    }

    .container.px-5.flex-nowrap {
        display: flex;
        flex-wrap: wrap !important;
    }

    .navbar-brand {
        width: 100%;
        margin-bottom: 10px;
    }

    .navbar-collapse {
        width: 100%;
        justify-content: flex-start !important;
        flex-wrap: wrap;
    }

    img {
        max-width: 100%;
        height: auto;
    }

    .row {
        margin-left: 0;
        margin-right: 0;
    }
}

@media (max-width: 320px) {

    /* Current Trades Tabs */
    .nav.nav-tabs.flex-nowrap {
        flex-wrap: wrap !important;
    }

    .nav.nav-tabs.flex-nowrap .nav-item {
        flex: 1 1 100%;
        margin-bottom: 5px;
    }

    /* Prevent page level horizontal scrolling */
    body,
    html {
        overflow-x: hidden;
    }
}

@media (max-width: 320px) {

    .flex-nowrap {
        flex-wrap: wrap !important;
    }

    body,
    html {
        overflow-x: hidden;
    }
}