/*--------------------------------
 # グローバルスタイル (共通部分)
---------------------------------*/
body, html {
    overflow-x: hidden;
}

body {
    font-family: "Inter", sans-serif;
}

.modal {
    z-index: 2000;
}

.text-center {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}


/*--------------------------------
 # ログイン
---------------------------------*/
.ishistagram-login-input {
    border-radius: 2px;
    border: solid 1px #b2b2b2;
    background-color: #ffffff;
}

.ishistagram-check-label {
    font-family: YuGo;
    font-size: 12px;
    font-weight: 500;
    font-stretch: normal;
    font-style: normal;
    line-height: normal;
    letter-spacing: normal;
    color: #000000;
}

.ishistagram-require-input-label {
    border-radius: 1px;
    background-color: #e2001b;
}

.ishistagram-require-input-label-text {
    font-family: YuGo;
    font-size: 14px;
    font-weight: 500;
    font-stretch: normal;
    font-style: normal;
    line-height: normal;
    letter-spacing: normal;
    color: #ffffff;
}

.ishistagram-submit-button {
    font-family: YuGo;
    font-size: 14px;
    font-weight: bold;
    font-stretch: normal;
    font-style: normal;
    line-height: normal;
    letter-spacing: normal;
    color: #ffffff;
    background-color: #77a7ff;
}

.ishistagram-login-span {
    font-size: 14px;
    font-stretch: normal;
    font-style: normal;
    line-height: normal;
    letter-spacing: normal;
}

.ishistagram-login-text {
    font-family: YuGo;
    font-size: 14px;
    font-weight: bold;
    font-stretch: normal;
    font-style: normal;
    line-height: normal;
    letter-spacing: normal;
    color: #2851a3;
    text-decoration: none;
}

/* パスワードを忘れた場合 */
.ishistagram-login-back {
    font-family: YuGo;
    font-size: 14px;
    font-weight: bold;
    font-stretch: normal;
    font-style: normal;
    line-height: normal;
    letter-spacing: normal;
    color: #000000;
    text-decoration: none;
    border-radius: 2px;
    border: solid 1px #cdcdcd;
}

.ishistagram-register-span {
    font-size: 14px;
    font-stretch: normal;
    font-style: normal;
    line-height: normal;
    letter-spacing: normal;
}


/*--------------------------------
 # ヘッダー
---------------------------------*/
.header-icon {
    font-size: 30px;
    vertical-align: middle;
}

.icon-wrapper {
    display: inline-block;
    width: 24px;
    text-align: center;
}

.icon-space {
    margin-right: 1rem;
}

.header-profile-image {
    flex-shrink: 0;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #333;
    display: inline-block;
    text-align: center;
    margin-right: 0.5rem;
}

.header-profile-icon {
    flex-shrink: 0;
    width: 30px;
    height: 30px;
    border: 1px solid #ddd;
    border-radius: 50%;
    padding: 3px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    background-color: #aaaaaa;
    font-size: 15px;
    margin-right: 0.5rem;
}

.navbar.fixed-top {
    width: 100%;
}

.nav-item .d-flex {
    min-width: 100px;
}


/*--------------------------------
 # メイン
---------------------------------*/
main {
    overflow-y: auto;
    overflow-x: hidden;
}


/*--------------------------------
 # プロフィール画面
---------------------------------*/
.btn-following {
    background-color: #808080;
    border-color: #808080;
    color: black;
}

.btn-follow {
    background-color: #48D1CC;
    border-color: #48D1CC;
    color: black;
}

.user-name {
    margin-top: 10px;
}

.profile-link:hover {
    opacity: 0.7;
}

.larger-text {
    font-size: 1.2em;
}

/* デスクトップ用のプロフィール */
.multiple-image-icon.d-none.d-md-block {
    position: absolute;
    z-index: 1;
    top: 10px;
    right: 10px;
    font-size: 24px;
    color: #ffffff;
}

.profile-image {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
}

.profile-icon {
    vertical-align: middle;
    margin-right: 1.5rem;
    width: 150px;
    height: 150px;
    border: 3px solid #ddd;
    border-radius: 50%;
    padding: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    background-color: #aaaaaa;
    font-size: 100px;
    margin-right: 0;
}

.profile-icon i.fas {
    margin: 0;
    padding: 0;
    font-size: 100px;
    line-height: 150px;
}

/* モバイル用のプロフィール */
.multiple-image-icon.d-block.d-md-none {
    position: absolute;
    z-index: 1;
    top: 5px;
    right: 5px;
    font-size: 18px;
    color: #ffffff;
}

.mobile-profile-image {
    width: 90px;
    height: 90px;
    object-fit: cover;
    border-radius: 50%;
}

.mobile-profile-icon {
    width: 90px;
    height: 90px;
    border: 2px solid #ddd;
    border-radius: 50%;
    padding: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    background-color: #aaaaaa;
    font-size: 50px;
}

.stats-links {
    display: flex;
    justify-content: space-between;
}


/*--------------------------------
 # 検索モーダル
---------------------------------*/
#search-form {
    position: relative;
}

#searchModal .modal-content {
    max-height: 60%;
}

#searchModal .modal-body {
    overflow-y: auto;
}

/* 検索の自動補完機能 */
.autocomplete-results {
    border: 2px solid #ddd;
    background-color: #f9f9f9;
    width: 100%;
    border-radius: 5px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.result-item {
    display: flex;
    align-items: center;
    padding: 10px 15px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.profile-image-container {
    width: 30px;
    height: 30px;
    border: 1px solid #ddd;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 10px;
    color: #ffffff;
    background-color: #aaaaaa;
}

.autocomplete-profile-image {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.autocomplete-profile-icon {
    font-size: 15px;
}

#autocomplete-results div:hover {
    background-color: #eaeaea;
}

.user-info-container {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.user-name,
.user-fullname {
    margin: 0;
}

.small-profile-image {
    width: 45px;
    height: 45px;
    border-radius: 50%;
}

.small-profile-icon {
    width: 45px;
    height: 45px;
    border: 1px solid #ddd;
    border-radius: 50%;
    padding: 3px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    background-color: #aaaaaa;
}

.d-flex div p {
    margin: 0;
    font-size: 14px;
}


/*--------------------------------
 # 新規投稿画面
---------------------------------*/
.image-div {
    position: relative;
    padding-top: 33.333%;
}

.image-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.image-container:hover {
    opacity: 0.7;
    cursor: pointer;
}

.close-button {
    display: none;
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 20px;
    color: #000000;
    cursor: pointer;
}

.image-container:hover .close-button {
    display: block;
}

.preview-image {
    position: absolute;
    object-fit: cover;
    width: 100%;
    height: 100%;
}

.select-image-btn,
.add-label-btn {
    background-color: #e0e0e0;
    color: black;
}

.select-image-btn:hover,
.add-label-btn:hover {
    background-color: #d0d0d0;
}

.select-image-btn .fa-image,
.add-label-btn .fa-folder {
    margin-right: 8px;
}

.selected-label-item {
    display: inline-block;
    padding: 2px 8px;
    border: 1px solid #aaa;
    border-radius: 12px;
    margin: 2px;
    background-color: #f1f1f1;
}

.selected-label-item:hover {
    opacity: 0.7;
}

.selected-label-item button {
    color: white;
    margin-left: 5px;
    background: none;
    border: none;
    cursor: pointer;
}

.selected-label-item button i.fa-solid.fa-xmark {
    font-size: 10px;
    color: #888;
}

.share-btn {
    background-color: #808080;
    color: white;
}

.share-btn:hover {
    background-color: #707070;
}

.share-btn .fa-paper-plane {
    margin-right: 8px;
}

/* ラベルの表示エリア */
#labelsList {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    align-items: center;
}

/* 各ラベルコンテナ */
.form-check {
    display: flex;
    align-items: center;
    gap: 5px;
}

/* 投稿文のテキストエリア */
#content {
    resize: none;
}


/*--------------------------------
 # 投稿編集画面
---------------------------------*/
.edit-post-image-container {
    width: 100%;
    padding-top: 100%;
    position: relative;
    overflow: hidden;
}

.edit-post-image-container img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.edit-profile-icon {
    flex-shrink: 0;
    width: 30px;
    height: 30px;
    border: 1px solid #ddd;
    border-radius: 50%;
    padding: 3px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    background-color: #aaaaaa;
    font-size: 15px;
}


/*--------------------------------
 # 投稿一覧画面
---------------------------------*/
.card-header {
    display: flex;
    align-items: center;
    justify-content: start;
    height: 70px;
}

.card-header a {
    display: flex; 
    align-items: center;
}

.card-header-profile, .card-header-profile-icon {
    margin-right: 20px;
}


.card-header-profile {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    object-fit: cover;
    margin-left: 10px;
    margin-right: 20px;
}

.card-header-profile-icon {
    width: 45px;
    height: 45px;
    border: 1px solid #ddd;
    border-radius: 50%;
    padding: 3px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    background-color: #aaaaaa;
    font-size: 25px;
    margin-left: 10px;
}

.ishistagram-post-container {
    padding: 5px;
}

.ishistagram-image-container {
    overflow: hidden;
    position: relative;
    padding-bottom: 100%;
}

.ishistagram-post-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
}

.ishistagram-post-image:hover {
    opacity: 0.7;
    cursor: pointer;
}


/*--------------------------------
 # 投稿詳細モーダル
---------------------------------*/
.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-user {
    margin: 0;
    align-self: center;
    font-weight: 700;
}

.modal-user-info {
    display: flex;
    align-items: center;
}

.modal-profile-image {
    width: 45px;
    height: 45px;
    border-radius: 50%;
}

.modal-profile-icon {
    width: 45px;
    height: 45px;
    border: 1px solid #ddd;
    border-radius: 50%;
    padding: 3px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    background-color: #aaaaaa;
    font-size: 30px;
}

/* ︙ボタン */
.dropdown-toggle::after {
    display: none; /* 逆三角形マークを非表示 */
}

.dropdown {
    position: relative;
}

.dropdown-menu {
    top: auto !important;
    left: auto !important;
    right: 0 !important;
    bottom: auto !important;
    transform: translate3d(0, 0, 0) !important;
}

.modal .dropdown-menu {
    z-index: 2000;
    display: none;
}

/* 投稿画像 */
.modal-image-container {
    width: 100%;
    padding-bottom: 100%;
    position: relative;
}

.modal-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    margin-bottom: 20px;
}

.carousel-control-prev,
.carousel-control-next {
    display: none;
    top: 50%;
    transform: translateY(
        -50%
    );
    align-items: center;
    bottom: unset;
}

.carousel-control-prev .fa-circle-chevron-left,
.carousel-control-next .fa-circle-chevron-right {
    font-size: 32px;
}

.carousel-indicators li {
    margin-right: 8px;
    list-style-type: none;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background-color: #555;
}

.carousel-indicators li::before {
    content: "";
}


.carousel-indicators .active {
    background-color: #fff;
}

/* いいねとコメント機能 */
.like-and-comment-container {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    width: 100%;
    box-sizing: border-box;
}

.action-buttons {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 15px;
}

.button-like {
    border: none;
    background: transparent;
    cursor: pointer;
}

.fa-heart,
.fa-regular.fa-comment {
    font-size: 2em;
}

.fa-regular.fa-comment {
    color: black;
}

.like-comment-buttons {
    display: flex;
    align-items: center;
}

.comment-input-section {
    display: none;
    width: 100%;
    box-sizing: border-box;
}

.comment-input-section textarea {
    width: 100%;
    box-sizing: border-box;
    resize: none;
}

.btn.comment-button:focus {
    outline: none !important;
    box-shadow: none !important;
}


/*--------------------------------
 # プロフィール編集画面
---------------------------------*/
.edit-profile-image {
    flex-shrink: 0;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #333;
    display: inline-block;
    text-align: center;
}