/* =========================================
   Floating Banner - Front Styles
   ========================================= */

/* Reset */
.fb-banner,
.fb-banner * {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* ── Overlay (modal only) ── */
.fb-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 99998;
}

/* ── Banner Container ── */
.fb-banner {
    font-family: "游ゴシック体", YuGothic, "游ゴシック", "Yu Gothic", "Hiragino Kaku Gothic ProN", "ヒラギノ角ゴ ProN W3", sans-serif;
    z-index: 99999;
}

/* ── Close Button ── */
.fb-close {
    position: absolute;
    z-index: 3;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid #ccc;
    background: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.2s;
    color: #666;
    padding: 0;
    line-height: 1;
}

.fb-close:hover {
    opacity: 0.7;
}

/* ── Link reset ── */
.fb-banner-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.fb-banner-link:hover {
    opacity: 0.95;
}

/* ── Label ── */
.fb-banner-label {
    display: block;
    color: #b8960c;
    font-size: 14px;
    font-style: italic;
    font-family: "Times New Roman", "游明朝", YuMincho, serif;
    margin-bottom: 4px;
}

/* ── Title ── */
.fb-banner-title {
    font-size: 20px;
    font-weight: bold;
    letter-spacing: 0.08em;
    line-height: 1.4;
    margin-bottom: 8px;
    color: #333;
    font-family: "Times New Roman", "游明朝", YuMincho, "Hiragino Mincho ProN", "ヒラギノ明朝 ProN", serif;
}

/* ── Description ── */
.fb-banner-desc {
    font-size: 14px;
    color: #666;
    line-height: 1.7;
}

/* ── VIEW MORE Button (三角形) ── */
.fb-banner-btn-wrap {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 90px;
    height: 90px;
    pointer-events: none;
    z-index: 1;
}

.fb-banner-btn {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #c9a84c, #a07c2e);
    clip-path: polygon(100% 0, 100% 100%, 0 100%);
    pointer-events: auto;
}

.fb-banner-btn-text {
    position: absolute;
    color: #fff;
    font-size: 10px;
    font-family: "Times New Roman", serif;
    letter-spacing: 0.15em;
    white-space: nowrap;
    line-height: 1;
    /* 三角形の斜辺の中心あたりに配置し、-45度回転 */
    top: 62%;
    left: 62%;
    transform: translate(-50%, -50%) rotate(-45deg);
    pointer-events: none;
}

/* ── Image ── */
.fb-banner-image img {
    width: 100%;
    height: auto;
    display: block;
}


/* =========================================
   Modal Type (画面中央)
   ========================================= */
.fb-type-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.fb-type-modal .fb-banner-inner {
    position: relative;
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    max-width: 480px;
    width: 90%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    z-index: 99999;
    animation: fbFadeInUp 0.4s ease;
}

.fb-type-modal .fb-close {
    top: 12px;
    right: 12px;
}

.fb-type-modal .fb-banner-content {
    padding: 20px 24px 24px;
}


/* =========================================
   Popup Type (フローティング)
   ========================================= */
.fb-type-popup {
    position: fixed;
    z-index: 99999;
}

.fb-type-popup .fb-banner-inner {
    position: relative;
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: stretch;
    animation: fbSlideIn 0.4s ease;
}

.fb-type-popup .fb-banner-link {
    display: flex;
    align-items: stretch;
}

.fb-type-popup .fb-banner-image {
    width: 140px;
    min-height: 100%;
    flex-shrink: 0;
}

.fb-type-popup .fb-banner-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.fb-type-popup .fb-banner-content {
    padding: 14px 50px 14px 16px;
    flex: 1;
    min-width: 0;
}

.fb-type-popup .fb-close {
    top: 8px;
    right: 8px;
    width: 28px;
    height: 28px;
}

.fb-type-popup .fb-close svg {
    width: 16px;
    height: 16px;
}

.fb-type-popup .fb-banner-title {
    font-size: 16px;
    letter-spacing: 0.06em;
}

.fb-type-popup .fb-banner-desc {
    font-size: 13px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.fb-type-popup .fb-banner-btn-wrap {
    width: 72px;
    height: 72px;
}

.fb-type-popup .fb-banner-btn-text {
    font-size: 9px;
}


/* ── PC Positions (popup) ── */
.fb-type-popup.fb-pos-bottom-right {
    bottom: 24px;
    right: 24px;
    max-width: 440px;
}

.fb-type-popup.fb-pos-bottom-left {
    bottom: 24px;
    left: 24px;
    max-width: 440px;
}

.fb-type-popup.fb-pos-bottom-center {
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    max-width: 480px;
    width: calc(100% - 48px);
}


/* =========================================
   Animations
   ========================================= */
@keyframes fbFadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fbSlideIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fbSlideInMobile {
    from {
        transform: translateY(100%);
    }
    to {
        transform: translateY(0);
    }
}


/* =========================================
   Mobile (SP) Styles
   ========================================= */
@media screen and (max-width: 768px) {

    /* Modal - SP */
    .fb-type-modal .fb-banner-inner {
        max-width: 92%;
        border-radius: 10px;
    }

    .fb-type-modal .fb-banner-title {
        font-size: 17px;
    }

    .fb-type-modal .fb-banner-content {
        padding: 16px 20px 20px;
    }

    /* Popup - SP: フッター固定 */
    .fb-type-popup {
        bottom: 0 !important;
        left: 0 !important;
        right: 0 !important;
        top: auto !important;
        transform: none !important;
        max-width: 100% !important;
        width: 100% !important;
    }

    .fb-type-popup .fb-banner-inner {
        border-radius: 12px 12px 0 0;
        animation: fbSlideInMobile 0.4s ease;
    }

    .fb-type-popup .fb-banner-image {
        width: 100px;
    }

    .fb-type-popup .fb-banner-title {
        font-size: 14px;
    }

    .fb-type-popup .fb-banner-label {
        font-size: 12px;
    }

    .fb-type-popup .fb-banner-desc {
        font-size: 12px;
        -webkit-line-clamp: 2;
    }
}
