/**
 * 追従CTAバナー
 *
 * 初期状態は非表示。js/sticky-cta.js が .is-visible を付けて表示する。
 * PC（841px以上）は画面右下のカード、SP（840px以下）は画面下部の全幅バー。
 */

.p-sticky_cta {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 90; /* .l-header の 100 より下 */
    width: 240px;
    padding: 14px 16px 16px;
    background: #fff;
    border: 1px solid #e96290;
    border-radius: 8px;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.16);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s;
}

.p-sticky_cta.is-visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.p-sticky_cta__micro {
    margin: 0 0 8px;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.5;
    color: #e96290;
    text-align: center;
}

.p-sticky_cta__btn {
    display: block;
    padding: 12px 8px;
    background: #e96290;
    border-radius: 4px;
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.4;
    text-align: center;
}

/* テーマのグローバル指定 a:hover { opacity: 0.5 } を打ち消す。
   主要CTAが薄くなるのを避けるため、既存の .p-more_link a:hover と同じ扱いにする。 */
.p-sticky_cta__btn:hover {
    background: #d4547f;
    color: #fff;
    opacity: 1;
}

.p-sticky_cta__close {
    position: absolute;
    top: -10px;
    right: -10px;
    width: 24px;
    height: 24px;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: #777;
    color: #fff;
    font-size: 14px;
    line-height: 1;
    cursor: pointer;
}

.p-sticky_cta__close:hover {
    background: #555;
}

@media screen and (max-width: 840px) {
    .p-sticky_cta {
        right: 0;
        left: 0;
        bottom: 0;
        width: auto;
        padding: 8px 12px 10px;
        border: none;
        border-top: 1px solid #f0c6d5;
        border-radius: 0;
        box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.1);
    }

    .p-sticky_cta__close {
        top: -12px;
        right: 8px;
    }

    .p-sticky_cta__micro {
        margin-bottom: 4px;
        font-size: 11px;
    }

    .p-sticky_cta__btn {
        padding: 10px 8px;
    }
}

/* SPではバナーが最下部の要素に重なるため、その高さぶんの余白を確保する */
@media screen and (max-width: 840px) {
    body.has-sticky-cta {
        padding-bottom: 84px;
    }
}
