/**
 * 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
 */

* {
    overflow-wrap: break-word;
    word-break: break-all;
}

/**
 * Pタグ
 */
p {
    margin-bottom: 0;
}

blockquote {
    border-left: 5px solid #eee;
    margin: 0 0 20px;
    padding: 10px 20px;
}

.copyright {
    display: flex;
    flex-direction: column;
    height: 40px;
    justify-content: center;
    margin-top: 20px;
    text-align: center;
}

@media (max-width: 767px) {
    .navbar-brand {
        max-width: 200px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
}

.inline-block {
    display: inline-block;
}

/**
 * クランプ文字（…）を付与する(1行)
 */
.text-ellipsis,
.text-nickname {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.text-nickname {
    max-width: 120px;
}

/**
 * 複数行でクランプ文字（…）を付与する
 * Chrome(Edge)とSafari限定
 */
.text-multiline-ellipsis {
    -webkit-box-orient: vertical; /* stylelint-disable-line property-no-deprecated */
    display: -webkit-box;
    overflow: hidden;
    width: 100%;
}
.text-multiline-ellipsis.ellipsis-row-2 {
    -webkit-line-clamp: 2;
}
.text-multiline-ellipsis.ellipsis-row-3 {
    -webkit-line-clamp: 3;
}
.text-multiline-ellipsis.ellipsis-row-4 {
    -webkit-line-clamp: 4;
}

/**
 * フレーム枠
 */
.nc4-frame {
    margin-bottom: 18px;
}
.nc4-frame:last-child {
    margin-bottom: 10px;
}
.nc4-frame:first-child {
    margin-top: 8px;
}
body > main.container,
body > footer.container {
    margin-top: 8px;
}

.nc4-add-frame {
    margin-bottom: 16px;
    margin-top: 8px;
}
footer .nc4-add-frame {
    margin-top: 16px;
}
.card.text-bg-none,
.card.border-none {
    background-color: transparent;
    border-radius: 0;
    border-width: 0;
}
.card.text-bg-none > .card-header,
.card.border-none > .card-header {
    background-color: transparent;
    border: 0;
    border-radius: 0;
    padding-left: 0;
    padding-right: 0;
}
.card.text-bg-none > .card-body,
.card.border-none > .card-body {
    background-color: transparent;
    border: 0;
    border-radius: 0;
    padding: 0;
}
.modal-body .card {
    border-style: none;
}

.modal-body .card-footer {
    background: none;
}

/* frame内 */
.nc4-frame header {
    margin-bottom: 16px;
}

/**
 * ボタン関連
 */
.nc4-edit-btn {
    margin-bottom: 8px;
}
.btn.nc4-btn:not(:last-child) {
    margin-right: 6px;
}
.btn.nc4-btn:not(:first-child) {
    margin-left: 6px;
}
.btn.btn-sm.nc4-inline-btn {
    font-size: 0.75rem;
    padding: 1px 5px;
}
.nc4-inline-margin-x,
.btn.nc4-btn.nc4-inline-margin-x {
    margin-left: 1.4rem;
}
.btn.nc4-btn.nc4-move-up {
    margin-right: 4px;
}
.btn.nc4-btn.nc4-move-down {
    margin-left: 4px;
}
.btn.nc4-btn.frame-setting-btn {
    margin-left: 2px;
    margin-right: 2px;
}
.btn.nc4-btn-xs {
    font-size: 0.75em;
    padding: 0.1em 0.4em;
}

/**
 * Form関連
 */
.form-check-outer {
    display: block;
    margin-bottom: .125rem;
    min-height: 1.5rem;
    padding-left: 1.5em;
}
.form-legend-label {
    font-size: 1rem;
}
.nc4-period .form-check-inline {
    display: block;
}
.form-check > .form-check-inline:not(:first-child) {
    margin-left: 1em;
}
.input-group > .nc4-multi-input-prepend,
.input-group > .nc4-multi-input-append {
    flex: 1 1 auto;
    min-width: 0;
    position: relative;
    width: 1%;
}
.input-group > .nc4-multi-input-prepend + .input-group-text
{
    height: 38px;
}
.input-group > .nc4-multi-input-prepend > .form-control,
.input-group > .nc4-multi-input-append > .form-control {
    border-radius: 0;
}
.input-group > .nc4-multi-input-prepend > .form-control {
    border-bottom-left-radius: var(--bs-border-radius);
    border-top-left-radius: var(--bs-border-radius);
}
.input-group > .nc4-multi-input-append > .form-control {
    border-bottom-right-radius: var(--bs-border-radius);
    border-top-right-radius: var(--bs-border-radius);
}

/**
 * ラジオボタン、チェックボックスの色調整
 */
.form-check-input {
    border-color: #9f9f9f;
}
.form-check-input:not(:checked):disabled {
    background-color: #e6e6e6;
}

/**
 * アコーディオン
 */
/* bootstrapのaccordionがパディング取り過ぎなため */
.accordion .nc4-accordion-button {
    padding: 8px 16px;
}

/**
 * ウィザード
 */
.progress.nc4-wizard {
    font-size: inherit;
    height: auto;
    text-align: center;
}
.progress.nc4-wizard .nc4-wizard-bar {
    display: inline-block;
    flex-direction: column;
    justify-content: center;
    overflow: hidden;
    padding: 4px;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.progress.nc4-wizard .nc4-wizard-bar .badge {
    margin-bottom: 2px;
}

/**
 * タブ
 */
.nav.nc4-nav {
    margin-bottom: 16px;
}

/**
 * ワークフローコメント
 */
.nc4-workflow-input-comment {
    margin: .5em 0;
}

.nc4-workflow-comments {
    margin-top: .5em;
}

.nc4-workflow-comments-body > .nc4-comment {
    border-top: 1px solid #ddd;
    padding: .1em 1em;
}

.nc4-workflow-comments-body > .nc4-comment:first-child {
    border: 0;
}

/**
 * More
 */
.nc4-workflow-comments-more-btn {
    border-color: #ccc;
    border-radius: 0 0 4px 4px;
    border-style: solid;
    border-width: 0 1px 1px 1px;
    padding: 10px 40px;
}

/**
 * displayアニメーション(item.classList.toggle('nc4-active'))
 * d-noneがimportant指定となっているため、importantとする
 */
/* csslint important: false */
.d-none.nc4-active{
    animation: appear 1.5s ease;
    display: block !important;
}
/* csslint important: true */
@keyframes appear {
    0%{
        opacity: 0;
    }
    100%{
        opacity: 1;
    }
}

/**
 * 言語切り替え
 */
.nc4-switch-lang {
    padding:7px;
}
.nc4-switch-lang a {
    display:inline;
}
.nc4-switch-lang span {
    padding: 6px;
}

/**
 * モーダル
 */
.modal-title .breadcrumb {
    margin-bottom: 0;
}
/**
 * テーブル
 */
table:not(.table) tbody,table:not(.table) td,table:not(.table) tfoot,
table:not(.table) th,table:not(.table) thead,table:not(.table) tr {
    border-width: 1px;
}

/**
 * blockquoteトグルボタン
 */
.nc-btn-blockquote {
    border-radius: 0;
    font-size: 0.7em;
    margin-bottom: 8px;
    margin-top: 8px;
    padding: 0 10px;
}
