/**
 * NC4 Framework (https://github.com/NC-4/NC4)
 * © NC4 Project.
 *
 * Licensed under The FreeBSD License
 * For full copyright and license information, please see the LICENSE.txt
 * Redistributions of files must retain the above copyright notice.
 *
 * @author  　　一般社団法人 教育のための科学研究所 <https://www.s4e.jp/>
 * @author  　　国立研究開発法人 科学技術振興機構 <https://www.jst.go.jp/>
 * @author  　　リーディング・スキル・テスト株式会社 <https://www.rstest.co.jp/>
 * @copyright  NC4 Project
 * @since      4.0.0
 * @license    https://opensource.org/licenses/BSD-2-Clause FreeBSD License
 */

.nearby-topics-licenses {
    margin: 4px 0 -8px;
    text-align: right;
}

.nearby-topics-index {
    column-gap: 15px;
    display: grid;
    grid-template-columns: repeat(1, auto);
    /*margin-bottom: 20px;*/
    /*row-gap: 20px;*/
}

.nearby-topics-topic {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    margin-bottom: 20px;
    overflow: hidden;
}

.nearby-topics-more {
    /*grid-column-end: -1;*/
    /*grid-column-start: 1;*/
    grid-column: 1 / -1;
}

@media (max-width: 767px) {
    .nearby-topics-index {
        grid-template-columns: repeat(2, auto);
    }
}

.nearby-topics-topic-title {
    flex: 0 0 auto;
    font-weight: bold;
    line-height: 1.5em;
    margin: 0.75em 0;
    max-height: calc(3 * 1.5em);
    overflow: hidden;
}

.nearby-topics-topic-title a {
    color: inherit;
}

.nearby-topics-topic-thumbnail-container {
    position: relative;
    width: 100%;
}

.nearby-topics-topic-thumbnail-container::before {
    content: "";
    display: block;
    padding-top: 56.25%;
}

.nearby-topics-topic-thumbnail-inner {
    background-color: #f5f5f5;
    border-radius: 4px;
    inset: 0;
    overflow: hidden;
    position: absolute;
}

.nearby-topics-topic-thumbnail-inner a {
    align-items: center;
    display: flex;
    height: 100%;
    justify-content: center;
    width: 100%;
}

.nearby-topics-topic-thumbnail {
    height: 100%;
    object-fit: cover;
    width: 100%;
}

.nearby-topics-topic-thumbnail-badge {
    border-radius: 4px;
    max-height: 48px;
    max-width: 48px;
}
/** トピックスのサムネイル画像が地図（緊急連絡）の場合 */
.nearby-topics-topic-thumbnail-map {
    border: 1px solid #dee2e6;
    border-radius: 4px;
    box-sizing: border-box;
    height: 100%;
    width: 100%;
}

.nearby-topics-topic-footer {
    column-gap: 5px;
    display: grid;
    flex: 0 0 auto;
    grid-template-columns: min-content auto;
}

.nearby-topics-topic-footer:not(:last-child) {
    margin-bottom: 10px;
}

.nearby-topics-topic-badge {
    align-self: center;
    display: inline-block;
    grid-column: 1;
    grid-row: 1 / 3;
    user-select: none;
}

.nearby-topics-topic-badge img {
    background-color: #ffffff;
    /*border: 1px solid #dee2e6;*/
    border-radius: 0.25em;
    height: 32px;
    object-fit: contain;
    width: 32px;
}

.nearby-topics-topic-school-name {
    font-size: 0.85em;
    grid-column: 2;
    grid-row: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.nearby-topics-topic-school-name a {
    color: inherit;
}

.nearby-topics-topic-date {
    color: #6c757d;
    font-size: 0.85em;
    grid-column: 2;
    grid-row: 2;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.nearby-topics-alert {
    margin-bottom: 0;
}
