/* ノート送信ボタン */
.note_submit {
    width: fit-content;
    padding: 1% 3%;
    font-weight: bolder;
    background-color: var(--main_color);
    border-radius: 20px;
    display: flex;
    margin-left: auto;
    margin-right: 0;
    margin-bottom: 3%;
    align-items: center;
    cursor: pointer;
    color: var(--button_text_color);
    font-size: inherit;
    border: black solid 2px;
    justify-content: center;
}

.note_submit.loading {
    cursor: not-allowed;
    color: gray;
    background-color: #ccc;
}

.loading-spinner {
    border: 2px solid #ccc;
    border-top: 2px solid #000;
    border-radius: 50%;
    width: 16px;
    height: 16px;
    animation: spin 1s linear infinite;
    margin-left: 5px;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

/* ノートメニュー */
.note_menu {
    display: flex;
    flex-wrap: wrap;
    color: var(--button_text_color);
}

/* note入力エリア */
.input_block {
    margin-top: 1em;
}

.input_area {
    width: 100%;
    resize: none;
    overflow-x: hidden;
    line-break: anywhere;
    font-size: 20px;
    border-radius: 10px;
    border: 1px solid black;
    box-sizing: border-box;
}

.input_area:focus {
    outline: 2px solid var(--main_color);
}

.note_content {
    min-height: 200px;
}

.cw_content {
    min-height: 16px;
}

/* メニュー チェックボックス */
.cw input[type="checkbox"],
.note_end_mizuna input[type="checkbox"],
[class$="_selecter"] input[type="checkbox"],
.form_clear input[type="button"] {
    opacity: 0;
    -webkit-appearance: none;
    appearance: none;
    position: absolute;
}

/* メニュー ボタンレイアウト */
.menu_button {
    background-color: var(--main_color);
    padding: 0.5em;
    margin: 0.2em;
    border-radius: 50%;
    border: rgb(223, 222, 222) 2px solid;
    opacity: 0.5;
    width: 2.3em;
    height: 2.3em;
    user-select: none;
    text-align: center;
    cursor: pointer;
}

.menu_button svg {
    display: flex;
    position: relative;
    align-items: center;
    justify-content: center;
    margin-right: auto;
    margin-left: auto;
}

.menu_button p {
    margin: 0;
    margin-top: -0.2em;
    width: 100%;
    text-align: center;
    font-size: calc(1em / 2);
    font-weight: bold;
}

.note_end_mizuna input[type="checkbox"]:checked ~ .menu_button,
.followers_selecter input[type="checkbox"]:checked ~ .menu_button,
.home_selecter input[type="checkbox"]:checked ~ .menu_button,
.public_selecter input[type="checkbox"]:checked ~ .menu_button,
.cw input[type="checkbox"]:checked ~ .menu_button {
    opacity: 1;
    border-color: #000000;
}

[class$="_selecter"] {
    display: flex;
    align-items: center;
}

.visibility {
    display: flex;
}

.select_theme_mode_button_area {
    display: flex;
    word-break: keep-all;
}

.select_theme_mode_button_area button {
    opacity: 0.5;
}

.now_select_theme_mode_button_color {
    opacity: 1 !important;
}

.form_clear .menu_button,
.select_picture .menu_button {
    opacity: 1;
    border-color: #000000;
}

.form_clear .menu_button:active,
.select_picture .menu_button:active {
    opacity: 0.5;
    border-color: rgb(223, 222, 222);
}

/* スマホ表示 */
@media screen and (max-width: 520px) {
    /* スマホ用ノートボタン */
    .note_submit {
        padding: 0.75em 2em;
    }
}

.input_info {
    display: flex;
    width: 100%;
    margin-bottom: 0.1em;
    user-select: none;
}

.now_input_user_area {
    align-items: center;
}

.now_input_user {
    display: flex;
    align-items: center;
}

.now_input_user_none {
    display: none;
}

.now_input_user_block {
    display: block;
}

.now_input_user_icon {
    width: 1em;
    height: 1em;
    border-radius: 50%;
    aspect-ratio: 1/1;
}

.now_input_user_text {
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ノート文字数カウント */
#charCountSpace {
    color: transparent;
}

.content_char_count {
    margin: 0;
    margin-right: 0;
    margin-left: auto;
    width: fit-content;
}

/* 画像アップロード */
#input_image_area {
    display: flex;
    max-width: 100%;
}

#fileInput {
    display: none;
}

.input_image_preview_area {
    display: flex;
    max-width: calc(100% - (3em + 0.2em));
    overflow-x: scroll;
}

.input_image_preview {
    width: 3em;
    height: 3em;
    object-fit: cover;
    border-radius: 25%;
    border: #000 1px solid;
    margin: 0.1em;
}

/* 画像拡大表示 */
#imageModal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    transform: scale(0.8);
    transition: opacity 0.1s ease-out, transform 0.1s ease-out;
    pointer-events: none;
}

#imageModal.active {
    opacity: 1;
    transform: scale(1);
    pointer-events: auto;
    background: rgba(0, 0, 0, 0.8);
}

/* モーダル内の画像 */
.modal-content {
    max-width: 90%;
    max-height: 90%;
    border-radius: 5px;
}

/* 削除ボタン */
#deleteImageButton {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    padding: 10px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 10;
    transition: background 0.2s;
}

#deleteImageButton:hover {
    background: rgba(255, 255, 255, 1);
}

#deleteImageButton svg {
    width: 24px;
    height: 24px;
}


/* ノート履歴 */
#note_list {
    background-color: var(--main_color);
    padding: 0.5em;
    border-radius: 50%;
    border: rgb(223, 222, 222) 2px solid;
    user-select: none;
    text-align: center;
    cursor: pointer;
    position: absolute;
    bottom: 10vw;
    right: 10vw;
    width: 3em;
    height: 3em;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.5;
}

#note_list svg {
    width: 2.5em;
    height: 2.5em;
}
