/* resources/css/properties/show.css */

.main-content {
    align-items: center;
    align-self: stretch;
    display: flex;
    flex-direction: column;
    justify-content: center;
    margin: 0 auto;
    width: min(1082px, 100%);
    max-width: 100%;
    box-sizing: border-box;
}

/* ⭐幅を1082pxに設定するよ！ */
.property-width-lg {
    width: min(1082px, 100%);
    box-sizing: border-box;
}
/* ⭐800pxの幅を再現するためのクラスを追加するよ！ */
.property-width-sm {
    width: min(800px, 100%);
    margin: 0 auto;
    box-sizing: border-box;
}

.property-detail-container {
    color: var(--text-label);
    max-width: 100%;
    /* width: 800px; */
    text-align: left;
}

.property-name {
    font-size: 32px;
    margin: 0;
    padding-bottom: 2.75rem;
}

.main-content-wrapper {
    display: flex;
    justify-content: space-between;
    gap: 2rem;
    margin-bottom: 2rem;
}

.image-section {
    flex-shrink: 0;
    width: 450px;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.property-main-image-wrapper {
    width: 100%;
    height: 300px;
    background-color: #e9e9e9;
    border-radius: 0.5rem;
    overflow: hidden;
}

.main-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.thumbnail-wrapper {
    display: flex;
    gap: 0.5rem;
}

.thumbnail-wrapper .thumbnail-image {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 0.25rem;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.2s ease;
    border: 2px solid transparent;
}

.thumbnail-wrapper .thumbnail-image:hover,
.thumbnail-wrapper .thumbnail-image.active {
    opacity: 1;
    border-color: var(--main, #F0A500);
}

.image-placeholder {
    width: 100%;
    height: 300px;
    background-color: #e9e9e9;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #999;
    font-size: 1.25rem;
    border-radius: 0.5rem;
}

.info-section {
    display: flex;
    flex-direction: column;
    /* align-items: center; */
    gap: 1.5rem;
    width: 20rem;
}

.property-tags-wrapper {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.property-tag {
    border-radius: 1.25rem;
    background: var(--Gray-10, #EEE);
    display: flex;
    padding: 0.375rem 0.75rem;
    align-items: flex-start;
    gap: 0.5rem;
}

.property-tag-text {
    color: var(--Text-Main, #333);
    font-family: "Noto Sans JP";
    font-size: 0.875rem;
    font-style: normal;
    font-weight: 400;
    line-height: 100%; /* 0.875rem */
}

.property-price-wrapper {
    display: flex;
    align-items: flex-end;
    gap: 0.5rem;
}

.property-price-yen {
    color: var(--Text-Main, #333);
    text-align: center;
    font-family: "Noto Sans JP";
    font-size: 2rem;
    font-style: normal;
    font-weight: 700;
    line-height: 100%; /* 2rem */
}


.property-price-tax {
    color: var(--Text-Sub, #666);
    font-family: "Noto Sans JP";
    font-size: 1rem;
    font-style: normal;
    font-weight: 400;
    line-height: 100%; /* 1rem */
}

.contact-button-wrapper {
    display: flex;
    width: 100%;
    position: relative;
    z-index: 1;
}

.button-want-to-buy {
    display: flex;
    width: 22.5rem;
    max-width: 100%;
    padding: 1.5rem;
    justify-content: center;
    align-items: center;
    gap: 0.625rem;
    box-sizing: border-box;
    position: relative;
    z-index: 1;
}

.seller-card {
    display: flex;
    padding: 1.25rem 1rem;
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
    align-self: stretch;
    border-radius: 0.5rem;
    border: 1px solid var(--Gray-10, #EEE);
    background: var(--Gray-5, #FAFAFA);
}

.seller-card-title {
    align-self: stretch;
    color: var(--Text-Sub, #666);
    font-family: "Noto Sans JP";
    font-size: 0.875rem;
    font-style: normal;
    font-weight: 500;
    line-height: 100%; /* 0.875rem */
}

.seller-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.seller-icon-placeholder {
    width: 4.5rem;
    height: 4.5rem;
    background-color: #e9e9e9;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
}

.seller-icon-placeholder .seller-avatar {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.seller-name-and-count {
    display: flex;
    flex-direction: column;
}

.seller-name {
    color: var(--Text-Label, #222);
    font-family: "Noto Sans JP";
    font-size: 1.25rem;
    font-style: normal;
    font-weight: 700;
    line-height: 120%; /* 1.5rem */
}

.seller-count-title {
    color: var(--Text-Sub, #666);
    font-family: "Noto Sans JP";
    font-size: 0.75rem;
    font-style: normal;
    font-weight: 400;
    line-height: 100%; /* 0.75rem */
}

.seller-count-value {
    color: var(--Text-Label, #222);
    font-family: "Noto Sans JP";
    font-size: 0.875rem;
    font-style: normal;
    font-weight: 700;
    line-height: 100%; /* 0.875rem */
}

.message-button-wrapper {
    display: flex;
    position: relative;
    z-index: 1;
}

.button-send-message {
    width: 18rem;
    max-width: 100%;
    padding: 0 0 0 0;
    box-sizing: border-box;
    position: relative;
    z-index: 1;
}

.button-danger {
    align-items: center;
    background-color: #FFFFFF;
    border: 0px;
    box-sizing: border-box;
    cursor: pointer;
    display: flex;
    flex-direction: row;
    height: 63px;
    justify-content: center;
    max-width: 100%;
    padding: var(--padding-5xl) var(--padding-101xl);
    width: 600px;
}

.button-danger-text {
    color: #FF1F1F;
    display: inline-block;
    font-family: var(--font-noto-sans-jp);
    font-size: var(--font-size-xl);
    height: 15px;
    line-height: 100%;
    position: relative;
    text-align: center;
    top: -3px;
}

.property-attributes-wrapper {
    margin-top: 2rem;
    padding-top: 1.5rem;
}

.property-attributes-group {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.attribute-item {
    display: flex;
    width: 100%;
    padding: 0.25rem 0;
    align-items: flex-start;
    gap: 1.75rem;
}

.attribute-label {
    width: 15rem;
    flex-shrink: 0;
    color: var(--Text-Main, #333);
    font-family: "Noto Sans JP";
    font-size: 1.25rem;
    font-style: normal;
    font-weight: 400;
    line-height: 150%; /* 1.875rem */
}

.attribute-value {
    flex: 1 0 0;
    color: var(--Text-Main, #333);
    font-family: "Noto Sans JP";
    font-size: 1.25rem;
    font-style: normal;
    font-weight: 700;
    line-height: 150%; /* 1.875rem */
    word-break: break-all;
}

.attribute-detail-value {
    font-weight: 400;
    text-decoration-style: solid;
    text-decoration-skip-ink: none;
    text-decoration-thickness: auto;
    text-underline-offset: auto;
    text-underline-position: from-font;
    width: 100%;
    white-space: pre-wrap;
    word-break: break-word;
    margin-top: 0px;
    margin-bottom: 0px;
}

.section-content {
    margin-bottom: 2rem;
}

.section-content p {
    font-size: 1rem;
    line-height: 1.5;
    color: var(--Text-Main, #333);
}

.recommend-properties-wrapper,
.owner-actions-wrapper {
    margin-top: 2rem;
    padding-top: 1.5rem;
}

.recommend-properties-container {
    width: min(1082px, 100%);
    max-width: 100%;
    box-sizing: border-box;
}

.recommend-properties-wrapper {
    width: 100%;
    box-sizing: border-box;
}

.owner-actions-wrapper {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: center;
}

hr {
    background-color: #EEEEEE;
    width: 100%;
    border-top: none;
    margin: 2.5rem 0 2.5rem 0;
}

/* ⭐ここから追加！ヘッダーとカードのスタイルをトップページに合わせて修正！ */
.property-header-wrapper {
    align-self: stretch;
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.property-title-wrapper {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    padding: 5px 0 0;
}

.section-title {
    margin: 0;
    position: relative;
    font-size: 1.5rem; /* トップページに合わせて調整 */
    line-height: 100%;
    font-weight: 500;
    font-family: "Noto Sans JP";
    color: var(--text-label);
}

.more-button-wrapper {
    cursor: pointer;
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 0.5rem;
    font-size: 1rem;
    color: var(--text-main);
    text-decoration: none;
}

.more-button {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    padding: 5px 0 0;
}

.more-button-text {
    position: relative;
    line-height: 100%;
    font-weight: 500;
    color: var(--text-main);
}

.more-button-arrow {
    height: 1.5rem;
    width: 1.5rem;
    position: relative;
}

.property-horizontal-scroll-wrapper {
    width: 100%;
    max-width: 100%;
}

.property-wrapper {
    display: flex;
    flex-wrap: wrap;
    gap: 16px 13px;
    padding-bottom: 0;
    width: 100%;
    justify-content: flex-start;
}

.card {
    display: flex;
    width: 350px;
    flex: 0 0 350px;
    flex-direction: column;
    align-items: flex-start;
    border-radius: var(--br-5xs);
    border: 1px solid var(--gray-10);
    background: var(--gray-0);
    box-sizing: border-box;
    overflow: hidden;
    color: inherit;
    text-decoration: none;
}

/* 影などのホバー効果は不要（トップカードに合わせる） */
.card:hover {
    box-shadow: none;
    border-color: var(--gray-10);
    background: var(--gray-0);
}
.card .thumbnail {
    height: 181px;
    width: 100%;
    overflow: hidden;
    border-radius: var(--br-5xs) var(--br-5xs) 0 0;
    background-color: var(--gray-10);
    display: flex;
    align-items: center;
    justify-content: center;
}
.card .thumbnail-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    opacity: 1;
}
.card .property-info {
    padding: var(--padding-xl) var(--padding-base);
    display: flex;
    flex-direction: column;
    gap: var(--gap-base);
    width: 100%;
    align-self: stretch;
    box-sizing: border-box;
}
.card .property-title {
    font-size: 1.25rem;
    line-height: 1.4;
    font-weight: 700;
    margin: 0;
    color: var(--text-label);
    display: block;
    width: 100%;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.card .property-size {
    font-size: 0.875rem;
    color: var(--text-main);
}
.card .floor-space {
    font-size: 0.75rem;
    color: var(--text-sub);
}
.card .property-address {
    font-size: 0.875rem;
    color: var(--text-main);
    display: block;
    width: 100%;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.card .property-tags {
    display: flex;
    flex-wrap: wrap;
    gap: var(--gap-5xs);
}
.card .property-tag {
    border-radius: var(--br-xs);
    background-color: var(--gray-10);
    padding: var(--padding-7xs) var(--padding-xs);
    font-size: 0.75rem;
}
.card .property-price {
    align-self: stretch;
    display: flex;
    flex-direction: row;
    align-items: baseline;
    justify-content: flex-end;
    text-align: right;
    gap: 0.25rem;
}
.card .property-price-yen,
.card .property-price-tax {
    position: relative;
    line-height: 100%;
}
.card .property-price-yen {
    height: 15px;
    display: inline-block;
    font-size: 1.25rem;
    font-weight: 700;
}
.card .property-price-tax {
    font-size: 0.75rem;
    color: var(--text-sub);
    white-space: nowrap;
    display: inline-block;
}
.card .property-seller {
    display: flex;
    align-items: center;
    gap: var(--gap-9xs);
    margin-top: 8px;
    color: var(--text-sub);
    font-size: 0.75rem;
}
.card .seller-icon {
    width: 20px;
    height: 20px;
    border-radius: var(--br-11xs);
    background-color: var(--color-gainsboro-100);
    overflow: hidden;
    flex-shrink: 0;
}
.card .seller-name {
    font-size: 0.875rem;
    color: var(--text-sub);
}

.no-properties {
    color: var(--Text-Sub, #666);
    text-align: center;
    width: 100%;
}

.thumbnail {
    border-radius: var(--br-5xs) var(--br-5xs) 0 0;
    background-color: var(--gray-10);
    height: 181px;
    overflow: hidden;
    flex-shrink: 0;
}

/* スマホ対応 */
@media (max-width: 768px) {
    .main-content {
        padding: 0 1rem;
    }

    .main-content-wrapper {
        flex-direction: column;
        gap: 1.5rem;
    }

    .image-section,
    .info-section {
        width: 100%;
    }

    .button-want-to-buy,
    .button-send-message {
        width: 100%;
    }

    .recommend-properties-container {
        width: 100%;
    }

    .property-header-wrapper {
        flex-wrap: wrap;
        align-items: center;
    }

    .property-horizontal-scroll-wrapper {
        overflow-x: auto;
    }

    .property-attributes-group {
        grid-template-columns: 1fr;
    }

    .attribute-item {
        grid-template-columns: 1fr;
    }

    /* ⭐スマホでは横スクロールを優先するよ！ */
    .property-wrapper {
        flex-wrap: nowrap;
        width: max-content;
        min-width: 100%;
    }
    .property-wrapper .card {
        width: 250px;
        flex-shrink: 0;
    }
}


/* ここからポップアップのスタイルだよ！ */
.modal {
    display: none; /* 初期状態では非表示 */
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.4);
    align-items: center;
    justify-content: center;
}

.modal.is-open {
    display: flex;
}

.modal-content {
    display: flex;
    width: 42rem;
    padding: 3.75rem;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.625rem;
    border-radius: 0.5rem;
    background: var(--Gray-0, #FFF);
    text-align: center;
    position: relative;
    max-width: 90%;
    box-sizing: border-box;
}

.modal-body {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3.25rem;
    align-self: stretch;
}

.close-button {
    width: 1rem;
    height: 1rem;
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    z-index: 2;
    background: transparent;
    border: 0;
    color: #666666;
    cursor: pointer;
    font-weight: 700;
    font-size: 2rem;
    line-height: 1;
}

.modal-title {
    align-self: stretch;
    color: var(--Text-Label, #222);
    text-align: center;
    font-family: "Noto Sans JP";
    font-size: 1.75rem;
    font-style: normal;
    font-weight: 700;
    line-height: 170%; /* 2.975rem */
    margin: 0;
}

.modal-text {
    align-self: stretch;
    color: var(--Text-Main, #333);
    text-align: center;
    font-family: "Noto Sans JP";
    font-size: 1.25rem;
    font-style: normal;
    font-weight: 400;
    line-height: 170%; /* 2.125rem */
    margin: 0;
}

.modal-close-button {
    padding: 1rem;
    width: 37.5rem;
    max-width: 100%;
    box-sizing: border-box;
    position: relative;
    z-index: 1;
}

.modal-actions {
    display: flex;
    width: 100%;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
}

.modal-actions .modal-action-button {
    width: 100%;
    max-width: 18rem;
    padding: 1rem 2rem;
    position: relative;
    z-index: 1;
}

.modal-close-button .button-secondary-text,
.modal-actions .button-primary-text,
.modal-actions .button-secondary-text {
    height: auto;
    line-height: 1;
    top: 0;
    white-space: nowrap;
}

.affiliate-detail-modal-content {
    width: min(36rem, 92vw);
    padding: 0;
    gap: 0;
    overflow: hidden;
}

.affiliate-detail-modal-close {
    background: transparent;
    border: 0;
    padding: 0;
}

.affiliate-detail-modal-body {
    display: grid;
    gap: 1.25rem;
    padding: 2rem;
}

.affiliate-detail-modal-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: fit-content;
    padding: 0.35rem 0.7rem;
    border-radius: 999px;
    background: #fff3e2;
    color: #d36e0a;
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.04em;
}

.affiliate-detail-modal-media {
    width: 100%;
    border-radius: 1rem;
    overflow: hidden;
    background: #f3f3f3;
}

.affiliate-detail-modal-media img {
    display: block;
    width: 100%;
    height: 14rem;
    object-fit: cover;
}

.affiliate-detail-modal-copy {
    display: grid;
    gap: 0.75rem;
}

.affiliate-detail-modal-title {
    margin: 0;
    color: var(--Text-Label, #222);
    font-size: 1.6rem;
    font-weight: 700;
    line-height: 1.5;
}

.affiliate-detail-modal-text {
    margin: 0;
    color: var(--Text-Main, #333);
    font-size: 1rem;
    line-height: 1.8;
}

.affiliate-detail-modal-actions {
    display: flex;
    gap: 0.75rem;
}

.affiliate-detail-modal-link,
.affiliate-detail-modal-dismiss {
    flex: 1 1 0;
    min-height: 3.5rem;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.affiliate-detail-modal-link {
    background: var(--main, #F0A500);
    border: 2px solid var(--main, #F0A500);
    color: #fff;
}

.affiliate-detail-modal-link:hover {
    background: #fff;
    color: var(--main, #F0A500);
}

.affiliate-detail-modal-dismiss {
    background: #fff;
    border: 2px solid var(--main, #F0A500);
    color: var(--main, #F0A500);
}

.affiliate-detail-modal-dismiss:hover {
    background: var(--main, #F0A500);
    color: #fff;
}

.list-style-none {
    list-style-type: none;
    padding-left: 0;
    margin-top: 0px;
    margin-bottom: 0px;
    font-weight: 400;
    line-height: 180%;
}

@media (max-width: 767px) {
    .modal-content {
        padding: 2.25rem 1.5rem;
    }

    .modal-title {
        font-size: 1.45rem;
        line-height: 1.6;
    }

    .modal-text {
        font-size: 1rem;
        line-height: 1.8;
    }

    .modal-actions .modal-action-button {
        max-width: 100%;
    }

    .affiliate-detail-modal-body {
        padding: 1.25rem;
        gap: 1rem;
    }

    .affiliate-detail-modal-media img {
        height: 10rem;
    }

    .affiliate-detail-modal-title {
        font-size: 1.25rem;
    }

    .affiliate-detail-modal-actions {
        flex-direction: column;
    }
}
