/**
 * Main Title
*/

.gf-title-container {
    display: flex;
    align-items: center;
    margin: 1rem 1rem 0 1rem;
    height: 2rem;
}

.gf-title-display-main, .gf-title-display-secondary, .gf-title-display-version {
    font-size: 2rem;
    line-height: 2rem;
    align-self: baseline;
    margin-left: .25rem;
    font-weight: 300;
}

.gf-title-display-main {
    font-weight: 600;
}

.gf-title-display-version {
    font-size: 1rem;
}

@media (max-width: 512px) {
    .gf-title-display-secondary, .gf-title-display-version {
        display: none;
    }
}

/**
 * Modal
 *
 * General styling for pop-up modals
*/

.gf-modal-header-container {
    display: flex;
    align-items: center;
    height: 2rem;
}

.gf-modal-title {
    font-size: 1.5rem;
    line-height: 2rem;
    align-self: baseline;
    font-weight: 600;
    flex: 1 1 auto;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
}

.gf-modal-footer-container {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    min-height: 2rem;
}

.gf-modal-footer-left {
    display: flex;
    justify-content: flex-start;
    flex: 0 0 auto;
}

.gf-modal-footer-right {
    display: flex;
    justify-content: flex-end;
    flex: 1 0 auto;
    flex-wrap: wrap;
    max-width: 100%;
}

/**
 * Language Selector
 *
 * The dropdown language selectors that use the
 * jquery.ULS plugin
*/

.gf-selector-container {
    display: flex;
    align-items: stretch;
    justify-content: flex-start;
    height: 2.5rem;
    margin: 1rem 1rem 0 1rem;
}

.gf-selector-button-container {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
}

.gf-selector-text {
    font-size: 1rem;
    line-height: 2.5rem;
}

.gf-selector-source {
    border-right: 0;
    position: relative;
}

.gf-selector-target {
    border-left: 0;
}

.gf-selector-source, .gf-selector-target {
    padding: 0;
    flex: 1 0 auto;
    max-width: 400px;
}

.gf-selector-source::after, .gf-selector-source::before {
    content: ' ';
    position: absolute;
    top: 0;
    left: 100%;
    width: 0;
    height: 0;
    border-color: transparent transparent transparent #ffffff;
    border-style: solid;
    border-width: calc(1.25rem - 1px);
    z-index: 100;
}

.gf-selector-source::before {
    top: -1px;
    border-color: transparent transparent transparent #ccc;
    border-width: 1.25rem;
}

.gf-selector-source:hover::before {
    border-color: transparent transparent transparent #adadad;
}

.gf-selector-source:hover::after {
    border-color: transparent transparent transparent #e6e6e6;
}

/**
 * Seed
 *
 * The search box for providing a seed article
*/

.gf-seed-container {
    display: flex;
    align-items: center;
    height: 2.5rem;
    margin: 1rem 0 0 0;
    background: #ddd;
    border-color: #666 transparent transparent transparent;
    border-width: 1px;
    border-style: solid;
    position: relative;
}

.gf-seed-icon {
    flex: 0 0 auto;
    margin-left: 1rem;
}

.gf-seed-input {
    flex: 1 0 auto;
    margin-right: 1rem;
    border: 0;
    background: transparent;
    color: #111;
}

.gf-seed-input::-webkit-input-placeholder {
    color: #666;
}
.gf-seed-input:-moz-placeholder {
    color: #666;
    opacity: 1;
}
.gf-seed-input::-moz-placeholder {
    color: #666;
    opacity: 1;
}
.gf-seed-input:-ms-input-placeholder {
    color: #666;
}

/**
 * Input status
*/

.gf-input-status-container {
    display: flex;
    margin: 1rem;
}

.gf-input-status {
    flex: 1 1 auto;
    max-width: 800px;
    text-align: center;
}

/**
 * Suggestions
 *
 * These are the cards that show all the suggested
 * articles on a single screen
*/

.gf-all-suggestions-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start;
    margin: 1rem 0 0 1rem;
}

.gf-suggestion-container {
    display: flex;
    flex-direction: column;
    border: 1px solid #ccc;
    min-height: 16rem;
    width: 16rem;
    margin: 0 1rem 1rem 0;
    position: relative;
}

.gf-suggestion-container:hover {
    border-color: #347BFF;
}

.gf-suggestion-image {
    width: 100%;
    height: 8rem;
    border: none;
    background-size: cover;
    background-repeat: no-repeat;
    background-position-y: 33%;
    background-position-x: center;
    cursor: pointer;
    flex: 0 0 auto;
}

.gf-suggestion-body-container {
    display: flex;
    flex-direction: column;
    flex: 1 0 auto;
    cursor: pointer;
    margin-left: .1rem;
}

.gf-suggestion-title-container {
    min-height: 2rem;
    display: flex;
    align-items: center;
}

.gf-suggestion-title, .gf-suggestion-title-popover {
    font-size: 1.5rem;
    line-height: 2rem;
}

.gf-suggestion-title-popover {
    display: none;
    word-break: break-all;
}

/* Show the popover when the title is hovered */
.gf-suggestion-title-container:hover .gf-suggestion-title-popover {
    display: flex;
}
.gf-suggestion-title-container:hover .gf-suggestion-title {
    display: none;
}
.gf-suggestion-title-popover:active {
    display: flex;
}
.gf-suggestion-title-popover:active + .gf-suggestion-title {
    display: none;
}

.gf-suggestion-text {
    font-size: 1rem;
    overflow: hidden;
    flex: 1 0 auto;
}

.gf-suggestion-footer-container {
    display: flex;
    align-items: flex-end;
    margin-left: .1rem;
}

.gf-suggestion-views {
    font-size: .8rem;
    flex: 1 0 auto;
}

.gf-suggestion-flag {
    height: 1.5rem !important;
    width: 1.5rem !important;
}

.gf-suggestion-views, .gf-suggestion-title {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/**
 * Icons
*/

.gf-icon {
    width: 2rem;
    height: 2rem;
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    flex: 0 0 auto;
}

.gf-icon-lightbulb {
    background-image: url("images/lightbulb.svg");
}

.gf-icon-menu {
    background-image: url("images/menu.svg");
}

.gf-icon-expand {
    background-image: url("images/expand.svg");
    width: 1rem;
}

.gf-icon-close {
    background-image: url("images/close.svg");
}

.gf-icon-new-window {
    background-image: url("images/new_window.svg");
}

.gf-icon-flag {
    background-image: url("images/flag.svg");
}

.gf-icon-search {
    background-image: url("images/search.svg");
}

.gf-icon-previous {
    background-image: url("images/previous.svg");
}

.gf-icon-next {
    background-image: url("images/next.svg");
}

/**
 * Misc
*/

.gf-flex-float-right {
    margin-left: auto;
}

.gf-clickable {
    cursor: pointer;
}

.gf-clickable:hover {
    background-color: #ccc;
}

.gf-clickable-disabled {
    cursor: not-allowed;
}

.gf-clickable-disabled:hover {
    background-color: unset;
}

/**
 * Third Party Modifications
*/

input:focus {
    outline: unset;
}

.gf-icon-flag.dropdown-toggle::after,
.gf-icon-menu.dropdown-toggle::after {
    content: none;
}

.btn, .form-control, .modal-content, .dropdown-menu, .alert, .popover {
    border-radius: 0;
}

.modal-lg {
    max-width: 98%;
}

.embed-responsive-4by3 {
    padding-bottom: calc(100vh - 2 * (31px + 2.375rem) - 90px);
}

.nav-item {
    cursor: pointer;
}

.uls-search-label {
    visibility: hidden;
}

.uls-medium {
    width: 360px;
}

#typeahead-suggestions {
    position: absolute;
    top: calc(100% + 1px);
}

.suggestions-dropdown {
    width: auto !important;
}
