/* Use the production Superfish accordion markup and theme on narrow screens. */
#cdfi-mainnav .sf-accordion-toggle,
#cdfi-mainnav .sf-accordion-button {
    display: none;
}

@media (max-width: 991px) {
    #cdfi-mainnav .sf-accordion-toggle,
    #cdfi-mainnav .sf-accordion-button {
        display: block;
    }

    #cdfi-mainnav .sf-main {
        display: none !important;
    }

    #cdfi-mainnav .sf-main.sf-expanded {
        display: block !important;
    }
}

.step-menu-toggle {
    display: none;
}

@media (max-width: 767px) {
    .step-menu-toggle {
        display: block;
    }

    .vertical-step {
        display: none;
    }

    .vertical-step.step-menu-expanded {
        display: block;
    }
}

#superfish-main .sf-depth-2.menuparent > ul {
    position: absolute;
    left: 100%;
    top: 0;
    min-width: 200px;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    z-index: 1001;
}

#superfish-main .sf-depth-2.menuparent {
    position: relative;
}

#superfish-main .sf-depth-3 a {
    padding: 8px 15px;
    display: block;
    color: #333;
    text-decoration: none;
    white-space: normal;
    max-width: 250px;
}

#superfish-main .sf-depth-3 a:hover {
    background: #f5f5f5;
}

/* Vertical step navigation - lower z-index than main menu */
.vertical-step {
    position: relative;
    z-index: 1;
}

.layout__region--first {
    position: relative;
    z-index: 1;
}

.layout--twocol-section > .layout__region {
    min-width: 0;
}

.node--type-cdfi-staff .layout--twocol-section > .layout__region,
.node--type-cdfi-news .layout--twocol-section > .layout__region {
    min-width: auto;
}

/* Resource Banks Gallery */
div.responsive {
    padding: 6px;
    float: left;
    width: 24.99999%;
}

div.gallery {
    border: 1px solid #ccc;
}

div.gallery:hover {
    border: 1px solid #777;
}

div.gallery img {
    width: 100%;
    height: auto;
}

div.desc {
    padding: 10px;
    text-align: center;
    font-size: 14px;
    color: #333;
    background: #f5f5f5;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.resource-banks-gallery-block div.gallery img {
    height: 150px;
}

.resource-banks-gallery-block div.desc {
    padding: 15px;
    font-size: 11px;
    line-height: 1.42857;
    color: #000;
    background: transparent;
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
}

.bond-guarantee-documents-view .js-form-item-sort-by > label,
.bond-guarantee-documents-view .js-form-item-sort-order > label {
    display: inline-block !important;
}

.bond-guarantee-documents-view #edit-field-cdfi-document-tags-target-id {
    background-image: url("/themes/contrib/stable/images/core/throbber-inactive.png");
    background-position: 100% 50%;
    background-repeat: no-repeat;
}

@media only screen and (max-width: 700px) {
    div.responsive {
        width: 49.99999%;
        margin: 6px 0;
    }
}

@media only screen and (max-width: 500px) {
    div.responsive {
        width: 67%;
    }
}

/* Social Media Sharing */
.social-media-sharing {
    display: block;
}

.social-media-sharing ul {
    padding-left: 0px;
    display: inline-flex;
    text-align: center;
}

.social-media-sharing li {
    display: inline-block;
    margin-right: 15px;
    list-style: none;
    list-style-type: none;
}

.social-media-sharing .share {
    cursor: pointer;
}

.social-media-sharing .share img {
    width: 40px;
}

/* Accessibility: Fix placeholder contrast ratio (WCAG AA 4.5:1) */
.usagov-search-autocomplete::placeholder {
    color: #757575;
    opacity: 1;
}

.usagov-search-autocomplete::-webkit-input-placeholder {
    color: #757575;
}

.usagov-search-autocomplete::-moz-placeholder {
    color: #757575;
}

.usagov-search-autocomplete:-ms-input-placeholder {
    color: #757575;
}

/* Accessibility: Fix footer sitename contrast ratio (WCAG AA 4.5:1) */
.sitename {
    color: #9a9c9e;
}

/* Footer rendering parity with the existing Drupal theme. */
#cdfi-footer2 .sitename {
    color: #8e9092;
}

#cdfi-footer1 .container,
#cdfi-footer2 .container {
    position: relative;
    top: -0.234375px;
}

/* Match Superfish's rendered mobile end state for interactive step menus. */
@media only screen and (max-width: 767px) {
    .steps ul.sf-menu ul {
        top: 100% !important;
    }

    .steps .sf-depth-1.sfHover > .step {
        background: url("/sites/cdfi/themes/custom/cdfi/css/images/arrow-process.png") no-repeat center bottom !important;
    }

    .steps .step-numbers > li.sf-depth-1.sfHover > .step::after {
        content: none;
        display: inline;
        clear: none;
    }

    .steps .step-numbers ul .step {
        text-align: left;
    }

    .steps .step-numbers ul .step::before,
    .steps .step-numbers ul .step::after {
        content: none;
        display: inline;
        clear: none;
    }
}
