/* モバイル */
html {
    font-size: 14px;
}

/* タブレット以上 */
@media (min-width: 768px) {
    html {
        font-size: 15px;
    }
}

/* PC以上 */
@media (min-width: 1200px) {
    html {
        font-size: 16px;
    }
}

/* ベースフォント */
body {
    font-family: "Inter", "Noto Sans JP", -apple-system, BlinkMacSystemFont, "Helvetica Neue", "Segoe UI", sans-serif;
    line-height: 1.6;
    height: 100svh;
}

/* common */
::-webkit-scrollbar {
    display: none;
}

/* Chrome, Safari, Edge, Opera */
input[type="search"]::-webkit-search-decoration,
input[type="search"]::-webkit-search-cancel-button,
input[type="search"]::-webkit-search-results-button,
input[type="search"]::-webkit-search-results-decoration {
    display: none;
}

/* Internet Explorer */
input[type="text"]::-ms-clear,
input[type="search"]::-ms-clear {
    display: none;
}

input[type="date"] {
    background-color: white;
    color: black;
    /* Safariのアウトラインを削除する場合 */
    -webkit-appearance: none;
    border: 1px solid grey;
    border-radius: 4px;
    padding: 5px;
}

.btn-dark-design {
    border-color: black;
    white-space: nowrap;
    width: auto;
}

.btn-light-design {
    border-color: black;
    white-space: nowrap;
    width: auto;
}

/* スピナー */
.loading-overlay {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    background: transparent;
    z-index: 999;
}

body.loading #loading {
    display: flex;
}

/* 通信中だけ表示 */
.spinner {
    width: 32px;
    height: 32px;
    border: 3px solid #ddd;
    border-top-color: #333;
    border-radius: 50%;
    animation: spin .8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}


/* header */
header {
    position: fixed;
    margin: 0;
    z-index: 200;
    width: 100%;
    height: 48px;
    top: 0;
    left: 0;
    background: #ffffff;
    border-bottom: 1px solid #6c757d;
}

/* PC */
@media (min-width: 768px) {
    header {
        height: 56px;
    }
}

.header-logo {
    display: block;
    position: relative;
    text-decoration-line: none;
    white-space: nowrap;
    font-size: 1.2rem;
    color: rgb(33, 37, 41);
    text-align: left;
}

.header-nav-link {
    text-decoration: none;
    color: #333;
    font-weight: 500;
    margin-left: 1.2rem;
}

.header-nav-link:first-child {
    margin-left: 0;
}

.header-nav-link:hover {
    text-decoration: none;
}

.header-nav-link.is-active {
    color: #222;
    font-weight: 600;
    border-bottom: 2px solid #222;
    padding-bottom: 2px;
}

.header-nav-link.is-active i {
    color: inherit;
}

.mobile-footer-item.is-active {
    color: #222;
    font-weight: 600;
}

.mobile-footer-item.is-active i {
    color: inherit;
}

.mobile-footer-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 48px;
    background: #ffffff;
    border-top: 1px solid #dddddd;
    display: flex;
    justify-content: space-around;
    align-items: center;
    z-index: 200;
    font-size: 11px;
}

.mobile-footer-item {
    flex: 1;
    text-decoration: none;
    color: #555555;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
}

.mobile-footer-label {
    line-height: 1.1;
}

.header-nav-icon-wrap {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    margin-right: 4px;
}

.footer-nav-icon-wrap {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    font-size: 1rem;
}

.nav-chat-status-unread {
    position: absolute;
    top: -3px;
    right: -6px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #1d63d8;
    box-shadow: 0 0 0 2px #ffffff;
}


.header-user {
    display: flex;
    margin: 0 5px;
    padding: 0;
    border-style: none;
}

.header-user-icon {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
}

/* PC */
@media (min-width: 768px) {
    .header-user-icon {
        width: 36px;
        height: 36px;
    }
}


.header-help-icon {
    position: relative;
    padding: 0;
    border-style: none;
}

.dropdown-menu-icon {
    display: flex;
    padding: 0;
    border-style: none;
}

.dropdown-item {
    left: 0;
}

.dropdown-icon {
    width: 24px;
}

.dropdown-copyright {
    font-size: 0.8rem;
}

.window-close {
    margin: 10px;
    height: 30px;
}

.dropdown-menu .dropdown-item:active,
.dropdown-menu .dropdown-item.active,
.dropdown-menu .dropdown-item:focus {
    background-color: transparent !important;
    color: inherit;
    outline: none;
}

.dropdown-menu .dropdown-item:hover {
    background-color: transparent;
}

nav {
    height: 100%;
    width: 100%;
}

main {
    padding-top: 48px;
    padding-bottom: 56px;
    background-color: white;
}

/* PC */
@media (min-width: 768px) {
    main {
        padding-top: 56px;
        padding-bottom: 0;
    }
}

.btn-close:focus,
.btn-close:focus-visible {
    outline: none;
    box-shadow: none;
}

/* エラーメッセージ */

ul.errorlist {
    margin: 0;
    padding: 0;
}

ul.errorlist li {
    color: red;
    display: block;
    text-align: left;
    font-size: 0.8rem;
}

ul.infolist {
    margin-top: 5px;
    margin-bottom: 20px;
    padding: 0;
}

ul.infolist li:before {
    content: "* ";
}

ul.infolist li {
    display: block;
    text-align: left;
    font-size: 0.8rem;
}

.label-required {
    color: orangered;
    font-size: 0.8rem;
}


/* フォーム */

#id_room_name {
    max-width: 100%;
    width: 500px;
}

#id_room_description {
    max-width: 100%;
    width: 500px;
    height: 100%;
    resize: none;
}

#id_user_address {
    max-width: none;
    width: 100%;
}

#id_user_profile {
    width: 100%;
}

#id_nick_name {
    max-width: 100%;
    width: 500px;
}


/* 画面共通 */

.main-common-container {
    max-width: 500px;
    margin: 30px auto;
    padding: 0 20px;
}

.common-container {
    position: relative;
    border-width: 1px;
    border-style: solid;
    border-top-style: none;
    border-bottom-style: none;
    height: 100%;
    width: 100svw;
    max-width: 760px;
    display: flex;
    flex-direction: column;
}


.common-content-container {
    padding: 20px;
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
}

.common-info-content-container {
    padding: 0 20px;
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
}

.common-select-box {
    width: auto;
}

.common-content {
    margin-top: 10px;
    margin-bottom: 10px;
    width: 100%;
    position: relative;
}

.common-edit-content {
    margin-top: 20px;
    margin-bottom: 20px;
    width: 100%;
    position: relative;
}

.common-content2 {
    margin-top: 10px;
    width: 100%;
    position: relative;
}

/* 編集画面共通 */

.common-container-header {
    position: relative;
    padding-top: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #6c757d;
    box-shadow: 0 3px 5px rgba(0, 0, 0, 0.1);

}

.common-container-header-title {
    white-space: nowrap;
    font-size: 1.2rem;
    color: rgb(33, 37, 41);
}

.common-container-header-button {
    display: block;
    position: relative;
    text-decoration-line: none;
    font-size: 1rem;
    text-align: center;
    border-radius: 50px;
    margin-left: 20px;
    margin-right: 20px;
}

.edit-common-main {
    padding: 20px;
}


.edit-common-notice-label {
    width: 100%;
    margin-top: 10px;
    margin-bottom: 10px;
    font-weight: bold;
}

.card-container {
    position: relative;
    padding-bottom: 20px;
}

.card-content {
    border: 1px solid #e6e6e6;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .04);
    overflow: hidden;
}

.card-thumb {
    position: relative;
}

.card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.card-title {
    font-size: 0.95rem;
    font-weight: 600;
    line-height: 1.4;
    margin-bottom: 0.25rem;
}

.card-title-clamp {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1 1 auto;
    min-width: 0;
}

.card-desc {
    font-size: 0.9rem;
    color: #555;
    line-height: 1.4;
    white-space: pre-wrap;
    overflow-wrap: break-word;
    word-break: normal;
    word-wrap: break-word;
}

.card-desc-clamp {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-desc-toggle {
    font-size: 0.8rem;
    white-space: nowrap;
}

.card-desc-toggle::before {
    content: '…';
}

.card-user-avatar {
    width: 25px;
    height: 25px;
    border-radius: 50%;
    object-fit: cover;
}

.card-user-text {
    flex: 1 1 auto;
    min-width: 0;
}

.card-user-label {
    font-size: 0.75rem;
    color: #888;
    line-height: 1.1;
}

.card-user-name {
    font-size: 0.85rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.card-user-badge-empty {
    background: #f7f7f7;
    color: #888;
    border: 1px solid #eee;
    font-weight: 500;
    border-radius: 9999px;
    padding: 2px 8px;
    font-size: 0.75rem;
}

.card-footer {
    border-top: none;
    background: transparent;
}

.card-like-btn {
    background-color: #ffffff;
    width: 100%;
    font-size: 0.8rem;
}

.card-like-btn:hover {
    background-color: #f3f3f3;
}

.card-like-btn:active {
    background-color: #eaeaea;
}

.card-heart-liked {
    color: #e79cae;
}

.card-footer-link {
    margin-top: auto;
}

.card-footer-actions {
    display: inline-flex;
    align-items: center;
}

/* イメージモーダル */
.image-modal {
    display: none;
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    background-color: rgba(0, 0, 0, 0.8);
    z-index: 999;
}

.image-modal-content {
    text-align: center;
    background-color: white;
}

.crop-image {
    max-width: 85svw;
    max-height: 85svh;
}
