/* Story Modal */
.story-modal.in {
    display: block;
}
.story-modal-dialog {
    height: auto;
}
.story-modal-content {
    height: 100%;
    -webkit-box-shadow: 0 5px 15px rgba(0,0,0,.5);
    box-shadow: 0 5px 15px rgba(0,0,0,.5);
}

.story-modal-media {
    background-color: black;
    max-height: 70vh;
    position: relative;
    text-align: center;
}
.story-modal-media-image {
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 70vh;
}

.story-modal-media-video {
    position: relative;
    display: block;
    width: 100%;
    overflow: hidden;
    padding: 0;
}

.story-modal-media-video iframe {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
}

.story-modal-details {
    background-color: #f9f9f9;
}
.story-modal-details-inner {
    width: 100%;
    height: 100%;
}
.story-modal-details .story-content-container {
    background-color: white;
    padding: 1em;
}

.story-modal-details .story-buttons-container {
    padding: 0.5em 1em;
    border-top: 1px solid #f5f5f5;
    border-bottom: 1px solid #f5f5f5;
    background-color: white;
}
.story-modal-details .story-buttons-container .btn-share-container {
    position: relative;
}
.story-modal-details .story-buttons-container .btn-share-container > ul {
    position: absolute;
    display: none;
    top: 0;
    padding: .4em 0;
    right: 100%;
    list-style: none;
    min-width: 100px;
    text-align: end;
    margin-inline-end: .5em;
}
[dir="rtl"] .story-modal-details .story-buttons-container .btn-share-container > ul {
    right: auto;
    left: 100%;
}
.story-modal-details .story-buttons-container .btn-share-container.open > ul {
    display: block;
    z-index: 991;
}
.story-modal-details .story-buttons-container .btn-share-container > ul > li {
    display: inline;
    padding: 0 0.2em;
}
.story-modal-details .story-buttons-container .btn-share-container > ul > li a {
    text-decoration: none;
}
.story-modal-details .story-buttons-container .btn-share-container .btn-share {
    padding-left: 0.5em;
    padding-right: 0.5em;
    background: none;
    box-shadow: none;
    color: #333;
    border: 0;
}
.story-modal-details .story-buttons-container .btn-share-container .btn-share:hover,
.story-modal-details .story-buttons-container .btn-share-container .btn-share:focus {
    background: none;
    box-shadow: none;
    border: 0;
    color: #000;
}
.story-modal-details .story-category-container {
    margin-bottom: 1em;
}

.hive-stories .story-modal .btn.btn-vote {
    padding-left: 0.75em;
    padding-right: 0.75em;
    background: none;
    box-shadow: none;
    border: 0;
    border-inline-end: 1px solid #f5f5f5;
}
.hive-stories .story-modal .btn.btn-vote:hover,
.hive-stories .story-modal .btn.btn-vote:focus {
    background: none;
    box-shadow: none;
    border: 0;
    border-inline-end: 1px solid #f5f5f5;
}

.story-modal .story-loader {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%)
}

.hive-stories .story-modal .btn.btn-close {
    float: right;
}
[dir="rtl"] .hive-stories .story-modal .btn.btn-close {
    float: left;
}
.hive-stories.hive-block-mobile .filter-label {
    display: none;
}

.story-modal .story-featured-flag {
    margin-inline-start: -1em;
    margin-bottom: 1em;
}

.story-modal .story-comment-form {
    margin: 1em 0;
}

.story-modal .comments {
    margin-top: 0.75em;
    padding: 1em;
}
.story-modal .comments .show-more-container {
    margin-top: 1em;
}
.story-modal .comments .dropdown-sort {
    margin-inline-start: 0;
    margin-bottom: 0.5em;
}
.story-modal .comments .alert-no-comments {
    text-align: center;
    margin-top: 1em;
}

.story-modal .comments-mode-threaded .comment-level-1 {
    margin-inline-start: 2.5em;
}
.story-modal .comments-mode-threaded .comment-level-2 {
    margin-inline-start: 5em;
}
.story-modal .comments-mode-threaded .comment-level-3 {
    margin-inline-start: 7.5em;
}
.story-modal .comments-mode-threaded .comment-level-4 {
    margin-inline-start: 10em;
}
.story-modal .comments-mode-threaded .comment-level-5 {
    margin-inline-start: 12.5em;
}
.story-modal .comment-container {
    margin-bottom: 0.5em;
}
.story-modal .comment {
    position: relative;
    padding: 0.5em 0.3em 0.3em;
    padding-inline-start: 3em;
    border: 2px solid transparent;
    border-bottom: 1px solid #efefef;
}
.story-modal .comment .btn-reply {
    font-size: 0.9em;
    text-decoration: underline;
}
.story-modal .comment-avatar {
    position: absolute;
    top: 0.5em;
    left: 0.5em;
    width: 2em;
    height: 2em;
}
[dir="rtl"] .story-modal .comment-avatar {
    left: auto;
    right: 0.5em
}
.story-modal .comment-avatar img {
    max-width: 2em;
    max-height: 2em;
}
.story-modal .comment-form {
    padding: 1em;
    background-color: #efefef;
}

.story-modal .comment-form textarea[name="comment"] {
    height: 8rem;
}

.story-modal .comment-form .alert-server-error {
    margin: 0.5em auto;
}

@media screen and (min-width: 480px) {
    .story-modal-dialog {
        margin: 0.5em;
    }
}
@media screen and (min-width: 768px) {
    .story-modal-dialog {
        margin: 1em;
    }
    .story-modal-dialog.no-media {
        max-width: 600px;
        margin-left: auto;
        margin-right: auto;
    }
}
@media screen and (min-width: 992px) {
    .story-modal-content {
        display: flex;
    }

    .story-modal-dialog {
        margin: 1.5em;
    }
    .story-modal-dialog:not(.no-media) {
        height: calc(100% - 3em);
    }

    .story-modal-media {
        max-height: none;
        height: 100%;
        width: 60%;
        flex: 0 0 60%;
        overflow: hidden;
    }

    .story-modal-media-image {
        top: 50%;
        position: relative;
        transform: translateY(-50%);
        height: auto;
        max-width: 100%;
        max-height: 100%;
    }

    .story-modal-media-video {
        top: 50%;
        transform: translateY(-50%);
    }

    .story-modal-details {
        height: 100%;
        width: 100%;
        overflow: auto;
    }
}
@media screen and (min-width: 1200px) {
    .story-modal-dialog {
        margin: 2em;
    }
    .story-modal-dialog:not(.no-media) {
        height: calc(100% - 4em);
    }
}

/* Story Form Modal */
.story-form-modal .modal-header {
    border-bottom: 0;
}

.story-form-modal .modal-title {
    margin-bottom: 0;
}

.story-form-modal .close {
    font-size: 30px;
}

.story-form-modal .story-type-switch {
    display: flex;
}

.story-form-modal .story-type-switch input {
    position: absolute !important;
    clip: rect(0, 0, 0, 0);
    height: 1px;
    width: 1px;
    border: 0;
    left: 0;
    overflow: hidden
}
.story-form-modal .story-type-switch label {
    display: inline-block;
    width: 100px;
    padding: 6px 12px;
    border: 1px solid #ccc;
    border-right-width: 0;
    text-align: center;
    float: left;
    flex: 1;
}
.story-form-modal .story-type-switch label::before {
    display: none !important;
}
.story-form-modal .story-type-switch label:hover {
    cursor: pointer;
}
.story-form-modal .story-type-switch input:focus + label {
    outline: 5px auto -webkit-focus-ring-color;
    outline-offset: -2px;
}
.story-form-modal .story-type-switch label:first-of-type {
    border-radius: 4px 0 0 4px;
}
[dir="rtl"] .story-form-modal .story-type-switch label:first-of-type {
    border-radius: 0 4px 4px 0;
}
.story-form-modal .story-type-switch label:last-of-type {
    border-radius: 0 4px 4px 0;
    border-inline-end-width: 1px;
}
[dir="rtl"] .story-form-modal .story-type-switch label:last-of-type {
    border-radius: 4px 0 0 4px;
}

.story-form-modal .multimedia-upload-wrap {
    margin-left: -15px;
    margin-right: -15px;
    margin-bottom: 15px;
    padding: 0 15px 15px;
    border-bottom: 1px solid #efefef;
}
.story-form-modal .file-upload-label {
    margin-bottom: 5px;
    max-width: 100%;
    display: inline-block;
}
.story-form-modal .file-upload .form-control-static {
    padding: 6px 12px;
    width: 100%;
    border: 1px solid #ccc;
}

.story-form-modal .file-upload .input-group-addon {
    padding: 0;
    border-radius: 0;
}

.story-form-modal .file-upload input[type="file"] {
    width: 0.1px;
    height: 0.1px;
    opacity: 0;
    overflow: hidden;
    position: absolute;
    z-index: 0;
}

.story-form-modal .file-upload .btn-remove-file {
    background: none;
    padding: 6px 12px;
    color: #333;
}

.hive-block.hive-stories label.form-file-button {
    padding:10px 20px;
    display: inline-block;
    cursor: pointer; /* "hand" cursor */
    margin-bottom: 0;
}

.hive-block.hive-stories .file-upload input[type="file"]:disabled + label.form-file-button {
    background: #eee;
    color: #525252;
    border-color: #525252;
    cursor: not-allowed;
}

/* FastClick issue */
.hive-block.hive-stories label.form-file-button * {
    pointer-events: none;
}

/* Story CTA */
.hive-stories-cta {
    padding: 2em;
    margin-bottom: 1em;
}

.hive-stories-cta .btn-add-submission {
    margin-inline-end: 1em;
}
.hive-stories-cta .submissions-counter {
    display: inline-block;
    padding: 0.4em 0; /* standard button top/bottom padding */
}

/* Story Container */
.stories-container .stories {
    margin: 0 -15px;
}
.stories-container .show-more-container {
    margin-top: 1em;
}

/* Story Featured Flag */
.story-featured-flag {
    text-transform: uppercase;
    display: inline-block;
    padding: 0.3em 1em;
    font-size: 1em;
    position: relative;
    background-color: #0f7483;
    color: #0f7483;
    letter-spacing: 1px;
    line-height: 1.5em;
}

.story-featured-flag::before {
    content: '';
    position: absolute;
    top: 0;
    left: 100%;
    border-top: 1.05em solid currentColor;
    border-inline-end: 1em solid transparent;
    border-bottom: 1.05em solid currentColor;
}
[dir="rtl"] .story-featured-flag::before {
    left: auto;
    right: 100%;
}

.story-featured-flag span {
    color: white;
}

/* Story Card */
.story-card {
    width: calc(100% - 30px);
    box-shadow: 0 2px 6px 0 rgba(3,2,2,0.15);
    border-radius: 10px;
    margin: 0 15px 30px;
}
.story-card:hover {
    box-shadow: 0 2px 4px 0 rgba(0,0,0,0.4);
}

.story-card-header {
    position: relative;
}

.story-card-header .media-image {
    width: 100%;
    max-width: 100%;
    height: auto;
    border-top-left-radius: 10px;
    border-top-right-radius: 10px;
}
.story-card-header .media-video-container {
    position: relative;
    overflow: hidden;
    border-top-left-radius: 10px;
    border-top-right-radius: 10px;
    padding-top: 56.25%;
    background-color: black;
}
.story-card-header .media-video {
    width: 100%;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
}
.story-card-header .video-play-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    color: white;
    transform: translate(-50%, -50%);
    font-size: 3em;
}

.story-card-header .story-featured-flag {
    position: absolute;
    top: 1em;
    left: 0;
}
[dir="rtl"] .story-card-header .story-featured-flag {
    left: auto;
    right: 0;
}

.story-card-media-overlay {
    position: absolute;
    top: 0;
    right: 0;
    left: 0;
    background-color: rgba(255, 255, 255, 0.3);
}
.story-card:hover .story-card-media-overlay {
    bottom: 0;
}

.story-card-body {
    padding: 1em;
}

.story-card-body .story-featured-flag {
    margin-inline-start: -1em;
    margin-bottom: 1em;
}

.story-card-footer {
    border-top: 1px solid #ccc;
    background-color: #f9f9f9;
    color: #687485;
    padding: 0.5em 1em;
    border-bottom-left-radius: 10px;
    border-bottom-right-radius: 10px;
    display: flex;
}
.story-card-footer .col-1 {
    flex: 1 0 0%;
}
.story-card-footer .col-2 {
    flex: 0 0 auto;
}

.story-card-footer .vote-count {
    margin-inline-end: 0.5em;
}
.story-card-footer .vote-count-label,
.story-card-footer .comment-count-label {
    display: none;
}
@media screen and (min-width: 768px) {
    .story-card-footer .vote-count-label,
    .story-card-footer .comment-count-label {
        display: inline;
    }
}

.hive-stories .story-card .btn.btn-mark-featured {
    padding: 0;
    background: none;
    box-shadow: none;
    color: grey;
    border: 0;
}
.hive-stories .story-card .btn.btn-mark-featured:hover,
.hive-stories .story-card .btn.btn-mark-featured:focus {
    background: none;
    box-shadow: none;
    color: #2A93CC;
}
.hive-stories .story-card .btn.btn-mark-featured.flag-active {
    color: #0a5d99;
}
.story-card .dropdown-menu-featured-labels {
    max-height: 150px;
    overflow-y: auto;
}
.story-card .dropdown-menu-featured-labels a {
    text-decoration: none;
    color: grey;
}
.story-card .dropdown-menu-featured-labels a:hover,
.story-card .dropdown-menu-featured-labels a:focus {
    text-decoration: none;
    color: #333;
}

.hive-stories .story-card .story-card-link {
    text-decoration: none;
    display: block;
}
.story-card .story-card-link:hover,
.story-card .story-card-link:focus {
    text-decoration: none;
}

.hive-stories.hive-block-tablet .story-card {
    width: calc(50% - 30px);
}
.hive-stories.hive-block-desktop .story-card {
    width: calc(33.33% - 30px);
}
.hive-stories.hive-block-desktop-lg .story-card {
    width: calc(25% - 30px);
}
.hive-stories.hive-block-desktop-xl .story-card {
    width: calc(16.66% - 30px);
}

/* Story Filter */

.hive-stories .stories-filter {
    margin-bottom: 1em
}
.hive-stories .stories-filter {
    display: flex;
    flex-wrap: wrap;
}
.hive-stories .stories-filter .form-control {
    margin: 0;
    height: 38px;
    padding-inline-end: 1.5em;
}
.hive-stories .stories-filter .col-1,
.hive-stories .stories-filter .col-2,
.hive-stories .stories-filter .col-3 {
    flex: 1 1 100%;
    margin-bottom: 0.5em;
}
.hive-stories .stories-filter .col-1 {
    display: flex;
    flex-wrap: nowrap;
}
.hive-stories .stories-filter .col-1 .search,
.hive-stories .stories-filter .col-1 .sort-by {
    flex: 1 1 auto;
    width: 50%;
}
.hive-stories .stories-filter .col-1 .search {
    position: relative;
    margin-inline-end: 0.25em;
    height: 38px;
}
.hive-stories .stories-filter .col-1 .search .form-control {
    margin: 0;
    padding: 0.4em 0.8em;
}
.hive-stories .stories-filter .col-1 .search .fa-search {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    right: 0.5em;
}
[dir="rtl"] .hive-stories .stories-filter .col-1 .search .fa-search {
    right: auto;
    left: 0.5em;
}
.hive-stories .stories-filter .col-1 .sort-by {
    margin-inline-start: 0.25em;
}
.hive-stories .stories-filter .col-3.filters-collapsed {
    display: none;
}
.hive-stories .stories-filter .col-3 .form-control {
    margin-bottom: 0.5em;
}
.hive-stories.hive-block-desktop .stories-filter {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    width: 100%;
}
.hive-stories.hive-block-desktop  .stories-filter .dropdown-toggle {
    max-width: none;
    -ms-text-overflow: ellipsis;
    text-overflow: ellipsis;
    overflow: hidden;
}
.hive-stories .stories-filter .dropdown-filter .dropdown-toggle {
    margin-bottom: 0 !important;
}

.sidebar .hive-stories.hive-block-desktop .stories-filter {
    margin-bottom: 0.5em;
}

@media screen and (min-width: 560px) {
    .hive-stories .stories-filter .col-1 {
        flex-wrap: nowrap;
    }
    .hive-stories .stories-filter .col-1 .sort-by button {
        min-width: auto !important;
        width: 100%;
        overflow: hidden;
        -ms-text-overflow: ellipsis;
        text-overflow: ellipsis;
    }
}

/*.hive-stories.hive-block-tablet .stories-filter,
.hive-stories.hive-block-desktop .stories-filter {
    flex-wrap: nowrap;
}*/
.hive-stories.hive-block-tablet .stories-filter .dropdown-filter,
.hive-stories.hive-block-desktop .stories-filter .dropdown-filter {
    margin-inline-start: 0;
}
.hive-stories.hive-block-tablet .stories-filter .btn.dropdown-toggle,
.hive-stories.hive-block-desktop .stories-filter .btn.dropdown-toggle {
    min-width: 8em;
    max-width: 8em;
    -ms-text-overflow: ellipsis;
    text-overflow: ellipsis;
    overflow: hidden;
}
.hive-stories.hive-block-tablet .stories-filter .dropdown-filter.open .btn.dropdown-toggle,
.hive-stories.hive-block-desktop .stories-filter .dropdown-filter.open .btn.dropdown-toggle {
    min-width: 8em;
}
.hive-stories.hive-block-tablet .stories-filter .col-3 select,
.hive-stories.hive-block-desktop .stories-filter .col-3 select {
    display: inline-block;
    width: auto;
    max-width: 150px;
    margin-inline-start: 0.5em;
}
.hive-stories.hive-block-tablet .stories-filter .col-2,
.hive-stories.hive-block-desktop .stories-filter .col-2,
.hive-stories.hive-block-tablet :not(.toggle-filter) .col-3,
.hive-stories.hive-block-desktop :not(.toggle-filter) .col-3 {
    order: 1;
    flex-basis: 40%;
    margin-inline-end: .5em;
}
.hive-stories.hive-block-tablet .stories-filter .col-1,
.hive-stories.hive-block-desktop .stories-filter .col-1 {
    order: 2;
    flex-basis: 59%;
}
.hive-stories.hive-block-tablet .filter-toggle .col-3,
.hive-stories.hive-block-desktop .filter-toggle .col-3 {
    order: 3;
}
.hive-stories.hive-block-tablet .stories-filter .filter-label,
.hive-stories.hive-block-desktop .stories-filter .filter-label {
    display: inline-block;
}
.hive-stories.hive-block-tablet .stories-filter .btn-reset-filter,
.hive-stories.hive-block-desktop .stories-filter .btn-reset-filter {
    display: inline-block;
    margin-inline-start: .5em;
    height: 38px;
    width: 38px;
    padding: 0;
    vertical-align: baseline;
}
.hive-stories.hive-block-tablet .stories-filter .btn-reset-filter-mobile,
.hive-stories.hive-block-desktop .stories-filter .btn-reset-filter-mobile {
    display: none;
}
.hive-stories.hive-block-tablet .stories-filter .col-1 .search,
.hive-stories.hive-block-desktop .stories-filter .col-1 .search {
    width: 60%;
}
.hive-stories.hive-block-tablet .stories-filter .col-1 .sort-by,
.hive-stories.hive-block-desktop .stories-filter .col-1 .sort-by {
    width: 40%;
}
.hive-stories.hive-block-desktop-md .stories-filter .col-2,
.hive-stories.hive-block-desktop-lg .stories-filter .col-2,
.hive-stories.hive-block-desktop-xl .stories-filter .col-2 {
    display: none;
}
.hive-stories.hive-block-desktop-md .stories-filter .col-1,
.hive-stories.hive-block-desktop-lg .stories-filter .col-1,
.hive-stories.hive-block-desktop-xl .stories-filter .col-1 {
    order: 2;
    flex-basis: 30%;
}
.hive-stories.hive-block-desktop-md .stories-filter .col-3,
.hive-stories.hive-block-desktop-lg .stories-filter .col-3,
.hive-stories.hive-block-desktop-xl .stories-filter .col-3 {
    order: 1;
    flex-basis: 69%;
}
.hive-stories.hive-block-desktop-md .stories-filter .col-3.filters-collapsed,
.hive-stories.hive-block-desktop-lg .stories-filter .col-3.filters-collapsed,
.hive-stories.hive-block-desktop-xl .stories-filter .col-3.filters-collapsed {
    display: flex;
    align-items: baseline;
}

/* Story Common */
.story-byline {
    margin-bottom: 0.5em;
}
.story-byline .line {
    padding: 0 0.5em
}

.label.story-category {
    background: none;
    color: #3D4958;
    border: 1px solid #d4d4d4;
    text-transform: uppercase;
    text-align: start;
    white-space: normal;
    display: inline-block;
}
.hive-stories .alert-server-error {
    margin-top: 1em;
}
.ccm-page .hive-stories .loader {
    display:block;
}
