/* お気に入り機能のスタイル */

/* 個人情報保護方針の同意チェックボックス */
.favorites .check {
    text-align: center;;
    margin: 3rem auto 2rem;
    padding: 1.8rem 2rem;
    border-radius: 10px;
    max-width: 600px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.favorites .check input[type="checkbox"] {
    width: 20px;
    height: 20px;
    margin: 0;
    cursor: pointer;
}

.favorites .check label {
    margin: auto;
    font-size: 2rem;
    font-weight: 500;
    color: #333;
    cursor: pointer;
    user-select: none;
    align-items: center;
    display: flex;
}

.favorites .check a {
    color: #39A79C;
    text-decoration: none;
    font-size: 1.4rem;
    font-weight: 500;
    border-bottom: 1px solid #39A79C;
    transition: all 0.3s ease;
    white-space: nowrap;
    margin-top: 1rem;
}

.favorites .check a:hover {
    color: #2e8a7f;
    border-bottom-color: #2e8a7f;
}

.favorites .check a::after {
    /* external tab */
    content: "\f35d";
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    display: inline-block;
    color: #39A79C;
    transition: width 0.3s ease;
    margin-left: 1rem;
}

/* モバイル対応 */
@media (max-width: 768px) {
    .favorites .check {
        flex-direction: column;
        gap: 1.2rem;
        padding: 1.5rem;
        text-align: center;
    }

    .favorites .check label {
        font-size: 1.4rem;
    }

    .favorites .check a {
        font-size: 1.3rem;
    }
}

/* 送信ボタンのスタイル */
.favorites .btn_run {
    text-align: center;
    margin: 2rem 0 3rem;
}

.favorites .btn-bulk-inquiry {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
    background: #39A79C;
    color: white;
    font-size: 1.6rem;
    font-weight: 600;
    padding: 1.5rem 3rem;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(57, 167, 156, 0.2);
    min-width: 300px;
}

.favorites .btn-bulk-inquiry:hover:not(:disabled) {
    background: #2e8a7f;
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(57, 167, 156, 0.3);
}

.favorites .btn-bulk-inquiry:disabled {
    background: #ccc;
    color: #888;
    cursor: not-allowed;
    box-shadow: none;
}

.favorites .btn-bulk-inquiry i {
    font-size: 1.4rem;
}

/* モバイル対応 */
@media (max-width: 768px) {
    .favorites .btn-bulk-inquiry {
        font-size: 1.4rem;
        padding: 1.3rem 2rem;
        min-width: 260px;
        width: 100%;
        max-width: 400px;
    }
}

/* ヘッダーのお気に入りボタン */
header#main > a.favorites-btn {
    display: flex;
    justify-content: center;
    align-items: center;
    min-width: 10em;
    height: 50px;
    background: #ffdc4e;
    text-decoration: none;
    color: #333;
    font-weight: 600;
    transition: all 0.3s ease;
    flex-direction: row;
    gap: 6px;
    font-size: 14px;
    margin-right: 10px;
    position: relative;
    padding: 0 12px;
    border-radius: 8px;
}

header#main > a.favorites-btn:hover {
    background: #f5cc42;
    text-decoration: none;
    color: #333;
    box-shadow: 0 4px 8px rgba(255, 220, 78, 0.4);
}

header#main > a.favorites-btn i, header#main > a.contact i {
    font-size: 20px;
    margin: 0;
}

header#main > a.favorites-btn .favorite-count-badge {
    background: white;
    color: #333;
    border-radius: 10px;
    padding: 2px 6px;
    font-size: 11px;
    font-weight: 600;
    min-width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: static;
    margin-left: auto;
    line-height: 1;
}

/* 固定ヘッダー時の調整 */
header#main.fixed > a.favorites-btn {
    height: 42px;
    font-size: 13px;
    margin-right: 10px;
    min-width: 9em;
    padding: 0 10px;
    border-radius: 8px;
}

header#main.fixed > a.favorites-btn .favorite-count-badge {
    font-size: 10px;
    padding: 1px 5px;
    height: 18px;
    min-width: 18px;
}

header#main.fixed > a.favorites-btn i {
    font-size: 16px;
}

/* レスポンシブ調整 */
@media only screen and (max-width: 1459px) {
    header#main > a.favorites-btn {
        min-width: 9em;
        height: 46px;
        font-size: 13px;
        margin-right: 8px;
        padding: 0 10px;
        border-radius: 8px;
    }

    header#main > a.contact {
        min-width: 9em;
        height: 46px;
        font-size: 13px;
        padding: 0 10px;
        border-radius: 8px;
    }

    header#main.fixed > a.favorites-btn {
        height: 38px;
        padding: 0 8px;
        border-radius: 8px;
    }

    header#main.fixed > a.contact {
        height: 38px;
        padding: 0 8px;
        border-radius: 8px;
    }
}

@media only screen and (max-width: 1200px) {
    header#main > a.favorites-btn {
        min-width: 8em;
        height: 42px;
        font-size: 12px;
        margin-right: 6px;
        padding: 0 8px;
        gap: 4px;
        border-radius: 6px;
    }

    header#main > a.contact {
        min-width: 8em;
        height: 42px;
        font-size: 12px;
        padding: 0 8px;
        gap: 4px;
        border-radius: 6px;
    }

    header#main.fixed > a.favorites-btn {
        height: 34px;
        padding: 0 6px;
        border-radius: 6px;
    }

    header#main.fixed > a.contact {
        height: 34px;
        padding: 0 6px;
        border-radius: 6px;
    }

    header#main > a.favorites-btn .favorite-count-badge {
        font-size: 10px;
        padding: 1px 4px;
        height: 18px;
        min-width: 18px;
    }
}

@media only screen and (max-width: 1024px) {
    header#main > a.favorites-btn {
        min-width: 5em;
        height: 38px;
        font-size: 11px;
        margin-right: 5px;
        padding: 0 6px;
        gap: 3px;
        border-radius: 6px;
    }

    header#main > a.contact {
        min-width: 5em;
        height: 38px;
        font-size: 11px;
        padding: 0 6px;
        gap: 3px;
        border-radius: 6px;
    }

    header#main.fixed > a.favorites-btn {
        height: 30px;
        padding: 0 5px;
        border-radius: 6px;
    }

    header#main.fixed > a.contact {
        height: 30px;
        padding: 0 5px;
        border-radius: 6px;
    }

    header#main > a.favorites-btn .favorite-count-badge {
        font-size: 9px;
        padding: 1px 3px;
        height: 16px;
        min-width: 16px;
    }
}

/* デスクトップ版お気に入りボタンは899px以下で非表示（モバイル版で別途表示） */
@media only screen and (max-width: 899px) {
    header#main > a.favorites-btn {
        display: none;
    }
}

/* モバイルヘッダーのお気に入りボタン */
header#mobile > a.favorites-btn {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 60px;
    height: 60px;
    background: #ffdc4e;
    text-decoration: none;
    color: #333;
    font-weight: 600;
    transition: all 0.3s ease;
    flex-direction: row;
    gap: 6px;
    font-size: 14px;
    margin: 5px 10px 5px auto;
    border-radius: 8px;
    position: absolute;
    right: 75px;
    flex-shrink: 0;
}

header#mobile > a.favorites-btn:hover {
    background: #f5cc42;
    text-decoration: none;
    color: #333;
    box-shadow: 0 2px 4px rgba(255, 220, 78, 0.4);
}

header#mobile > a.favorites-btn i {
    font-size: 20px;
    margin: 0;
}

header#mobile > a.favorites-btn .favorite-count-badge {
    background: white;
    color: #333;
    border-radius: 12px;
    padding: 2px 6px;
    font-size: 11px;
    font-weight: 600;
    min-width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    line-height: 1;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
    position: absolute;
    top: -4px;
    right: -4px;
}

/* モバイルレスポンシブ対応 */
@media only screen and (max-width: 480px) {
    header#mobile > a.favorites-btn {
        width: 50px;
        height: 50px;
        gap: 0;
        padding: 0;
        margin: 5px 8px;
        right: 55px;
    }

    header#mobile > a.favorites-btn .favorites-text {
        display: none;
    }

    header#mobile > a.favorites-btn i {
        font-size: 18px;
    }

    header#mobile > a.favorites-btn .favorite-count-badge {
        position: absolute;
        top: -4px;
        right: -4px;
        font-size: 9px;
        min-width: 16px;
        height: 16px;
        padding: 1px 4px;
    }
}

@media only screen and (max-width: 410px) {
    header#mobile > a.favorites-btn {
        width: 44px;
        height: 44px;
        margin: 5px 6px;
    }

    header#mobile > a.favorites-btn i {
        font-size: 16px;
    }

    header#mobile > a.favorites-btn .favorite-count-badge {
        font-size: 8px;
        min-width: 14px;
        height: 14px;
        top: -3px;
        right: -3px;
    }
}

/* お気に入りボタン共通スタイル */
.favorite-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 8px 15px;
    border: 1px solid #ddd;
    background: white;
    color: #666;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
    text-decoration: none;
}

.favorite-btn:hover {
    border-color: #007bff;
    color: #007bff;
    background: #f8f9fa;
}

.favorite-btn.favorited {
    border-color: #ffc107;
    color: #ffc107;
    background: #fff3cd;
}

.favorite-btn.favorited:hover {
    border-color: #e0a800;
    color: #e0a800;
    background: #fff3cd;
}

.favorite-btn i {
    font-size: 16px;
}

/* 検索結果ページのお気に入りボタン */
.search-favorite-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    border: 1px solid #ddd;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    z-index: 10;
}

.search-favorite-btn span {
    display: none;
}

.search-favorite-btn i {
    font-size: 18px;
    margin: 0;
}

.search-favorite-btn:hover {
    background: #f8f9fa;
    border-color: #007bff;
    color: #007bff;
}

.search-favorite-btn.favorited {
    background: #fff3cd;
    border-color: #ffc107;
    color: #ffc107;
}

.search-favorite-btn.favorited:hover {
    background: #fff3cd;
    border-color: #e0a800;
    color: #e0a800;
}

/* 物件詳細ページのお気に入りボタン */
.property-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
}

.property-favorite {
    flex-shrink: 0;
    margin-top: 10px;
}

.property-favorite-btn {
    font-size: 15px;
    padding: 10px 20px;
}

/* ナビゲーションのお気に入り件数表示 */
.favorite-count-badge {
    font-size: 13px;
    color: #666;
}

/* お気に入りメッセージ */
.favorite-message {
    position: fixed !important;
    top: 80px !important;
    right: 20px !important;
    background: #333 !important;
    color: white !important;
    padding: 12px 20px !important;
    border-radius: 5px !important;
    z-index: 9999 !important;
    font-size: 14px !important;
    box-shadow: 0 2px 10px rgba(0,0,0,0.3) !important;
    animation: fadeInOut 3s ease-in-out !important;
}

@keyframes fadeInOut {
    0% {
        opacity: 0;
        transform: translateX(100%);
    }
    10%, 90% {
        opacity: 1;
        transform: translateX(0);
    }
    100% {
        opacity: 0;
        transform: translateX(100%);
    }
}

/* レスポンシブ対応 */
@media (max-width: 1048px) {
    .favorites-btn .label, header .contact .label {
        display: none;
        width: 100px;
    }
}
@media (max-width: 768px) {
    .property-header {
        flex-direction: column;
        align-items: stretch;
    }

    .property-favorite {
        margin-top: 15px;
    }

    .property-favorite-btn {
        width: 100%;
        justify-content: center;
    }

    .favorite-message {
        top: 60px !important;
        right: 10px !important;
        left: 10px !important;
        font-size: 13px !important;
    }

    .search-favorite-btn {
        width: 32px;
        height: 32px;
        top: 8px;
        right: 8px;
    }

    .search-favorite-btn i {
        font-size: 16px;
    }
}

/* プロパティアクション */
.property-actions {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #eee;
}

/* 小さい画面でのお気に入りボタン調整 */
@media (max-width: 480px) {
    .favorite-btn {
        font-size: 13px;
        padding: 6px 10px;
    }

    .favorite-btn span {
        display: none;
    }

    .favorite-btn i {
        font-size: 18px;
    }

    .property-favorite-btn span {
        display: inline;
    }
}

/* 物件アクションボタン */
.property-actions {
    display: flex;
    gap: 10px;
    margin-top: auto;
    border-top: 1px solid #eee;
}

.property-actions .btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px 0px;
    border-radius: 6px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    text-align: center;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    box-sizing: border-box;
}

.property-actions .btn i {
    margin-right: 6px;
    font-size: 14px;
}

/* 詳細を見るボタン */
.property-actions .btn-detail {
    background: transparent;
    color: #333;
    border: 1px solid #666;
}

.property-actions .btn-detail:hover {
    background: #f8f9fa;
    color: #333;
    border-color: #bbb;
}

/* お問い合わせボタン */
.property-actions .btn-contact {
    background: #39A79C;
    color: white;
    border: 1px solid #39A79C;
}

.property-actions .btn-contact:hover {
    background: #2d8a81;
    border-color: #236f68;
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
    .property-actions {
        flex-direction: column;
        gap: 8px;
    }

    .property-actions .btn {
        font-size: 13px;
        padding: 10px 12px;
    }
}

@media (max-width: 480px) {
    .property-actions {
        padding-top: 12px;
    }

    .property-actions .btn {
        font-size: 12px;
        padding: 8px 10px;
    }
}

/* 画像エラー時のスタイル */
.image-error {
    opacity: 0.8;
    background-color: #f8f9fa;
}