/* モーダル */
.modal,
.album_modal,
.withdrawal_modal,
.costhelpModal {
    display: none;
    position: fixed;
    z-index: 1;
    left: 0;
    top: 0;
    height: 100vh;
    height: 100dvh;
    width: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.5);
}

.modal-inner {
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.modal-content {
    background-color: var(--bg-200);
    width: 91.79%;
    height: 68.22vw;
    border: 1px solid var(--bg-300);
    border-radius: 4px;
    box-shadow: 0 5px 8px 0 rgba(0, 0, 0, 0.2), 0 7px 20px 0 rgba(0, 0, 0, 0.17);
    animation-name: modalopen;
    animation-duration: 1s;
    padding: 3.68% 5.52% 0;
}

@keyframes modalopen {
    from {
        opacity: 0
    }

    to {
        opacity: 1
    }
}

.modal-header h1 {
    margin: 1rem 0;
}

.modal-header {
    background: lightblue;
    padding: 3px 15px;
    display: flex;
    justify-content: space-between;
}

.modalClose,
.album_modalClose,
.withdrawal_modalClose,
.costhelpClose {
    display: block;
    text-align: right;
}

.modalClose i ,
.album_modalClose i,
.withdrawal_modalClose i,
.costhelpClose i {
    color: var(--bg-300);
    font-size: 1.43rem;
}

.modalClose:hover ,
.album_modalClose:hover,
.withdrawal_modalClose:hover,
costhelpClose:hover {
    cursor: pointer;
}

.modal-body {
    padding: 10px 20px;
}

.modal-body .text_label {
    display: block;
    font-size: 1.14rem;
    margin: 0 0 1.16% 0;
}

.modal-body input[type="text"] {
    display: block;
    width: 100%;
    font-size: 1.14rem;
    border-radius: 4px;
    background-color: var(--bg-100);
    padding: 3.11% 5.83%;
}

.modal-body .checkbox_label {
    display: block;
    margin: 6.62% 0 0;
}

.modal-body .checkbox_label input[type="checkbox"] {
    position: relative;
    width: 7.19%;
    aspect-ratio: 1;
    /* height: 5.07vw; */
    border: 1px solid var(--text-200);
    background-color: var(--bg-100);
    vertical-align: -5px;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    margin: 0 3.43% 0 0;
}

.modal-body .checkbox_label input[type="checkbox"]:checked:before {
    position: absolute;
    top: 5%;
    left: 28%;
    transform: rotate(50deg);
    width: 45%;
    height: 65%;
    border-right: 2px solid var(--text-200);
    border-bottom: 2px solid var(--text-200);
    content: '';
}

.modal-body .mgmt_button {
    margin: 6.06% 0 0 0;
}

.buffer {
    height: 300vh;
}

/* ===== albumモーダル ===== */
.error_text {
    color: var(--error-100);
    font-size: 0.71rem;
    margin: 0 0 1.16% 0;
}

.album_modal .modal-content {
    height: initial;
    padding-bottom: 8%;
}

.album_modal .album_preview {
    display: grid;
    width: 100%;
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: 1fr;
    gap: 1%;
    margin: 3% 0 5% 0;
}

.album_modal .preview_wrap {
    position: relative;
    aspect-ratio: 1;
}

.album_modal .album_preview img {
    position: absolute;
    width: 100%;
    height: 100%;
    object-fit: cover;
    top: 0;
    bottom: 0;
}

/* ===== 退会 ===== */
.withdrawal_modal h2 {
    font-size: 1.29rem;
    text-align: center;
    margin: 0 0 5% 0;
}

.withdrawal_modal p {
    text-align: center;
}

.withdrawal_modal .modal_button_wrap {
    display: flex;
    gap: 2%;
    margin: 5%;
}

.withdrawal_modal .modal_button_wrap #withdrawal_confirm {
    display: block;
    background-color: var(--error-100);
    border-color: var(--error-100);
}

.withdrawal_modal .modal_button_wrap #withdrawal_confirm:hover {
    color: var(--error-100);
    background-color: var(--bg-100);
}

/* ===== スポットメモ ===== */
.spotmemo_body {
    height: 70%;
    overflow-y: scroll;
    padding: 5% 0;
}

.spotmemo_title {
    font-size: 1.14rem;
    margin: 0 0 3% 3%;
}

.spotmemo_item {
    width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    border-radius: 4px;
    background-color: var(--bg-100);
    margin: 0 0 2% 0;
    padding: 3% 5%;
}

#open_modal {
    margin: 2% 0 3% 0;
}

/* ===== 費用ヘルプ ===== */
.costhelpModal .modal-content {
    height: initial;
    padding-bottom: 8%;
}

.costhelpModal .headline {
    color: var(--primary-100);
    font-size: 1.14rem;
    font-weight: bold;
    margin: 0 0 0.97% 0;
}

.costhelpModal .explanation_item {
    font-size: 1.14rem;
}

.costhelpModal .example {
    font-size: 0.86rem;
}

.costhelpModal .example:nth-child(3) {
    margin: 0 0 2.42% 1.14rem;
}


/* ===== PC用 ===== */
@media screen and (min-width: 800px) {
    .modal,
    .album_modal,
    .withdrawal_modal,
    .costhelpModal {
        padding: 0 40%;
    }
    
    .modal-content {
        width: 100%;
        height: 28%;
    }

    .album_modal .modal-content {
        height: initial;
    }
}