/**
 * ACS Conversion Button - フロントエンドCSS
 * フローティングボタンのスタイル（約2KB）
 */

/* ==================================================
   ラッパー基本スタイル
================================================== */
.acs-cb-wrapper {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 12px 16px 16px;
    box-sizing: border-box;
    transition: transform 0.4s ease, opacity 0.4s ease;
    will-change: transform;
}

/* 位置バリエーション */
.acs-cb-pos-bottom-center {
    left: 0;
    right: 0;
    align-items: center;
}

.acs-cb-pos-bottom-left {
    left: 16px;
    right: auto;
    width: auto;
    max-width: 360px;
    align-items: flex-start;
    border-radius: 12px 12px 0 0;
}

.acs-cb-pos-bottom-right {
    right: 16px;
    left: auto;
    width: auto;
    max-width: 360px;
    align-items: flex-end;
    border-radius: 12px 12px 0 0;
}

/* ==================================================
   アニメーション
================================================== */
.acs-cb-anim-slide-up {
    transform: translateY(100%);
    opacity: 0;
}

.acs-cb-anim-slide-up.acs-cb-visible {
    transform: translateY(0);
    opacity: 1;
}

.acs-cb-anim-fade {
    opacity: 0;
}

.acs-cb-anim-fade.acs-cb-visible {
    opacity: 1;
}

.acs-cb-anim-none {
    opacity: 0;
}

.acs-cb-anim-none.acs-cb-visible {
    opacity: 1;
    transition: none;
}

/* ==================================================
   非表示状態
================================================== */
.acs-cb-wrapper.acs-cb-hidden {
    transform: translateY(110%);
    opacity: 0;
    pointer-events: none;
}

/* ==================================================
   閉じるボタン
================================================== */
.acs-cb-close {
    position: absolute;
    top: 6px;
    right: 10px;
    background: rgba(0, 0, 0, 0.3);
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 22px;
    height: 22px;
    font-size: 14px;
    line-height: 1;
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
    z-index: 1;
}

.acs-cb-close:hover {
    background: rgba(0, 0, 0, 0.55);
}

/* ==================================================
   訴求テキスト（ヘッドライン）
================================================== */
.acs-cb-headline {
    font-size: 13px;
    font-weight: 600;
    color: #fff;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
    margin-bottom: 8px;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

/* 背景なし時は文字色を変更 */
.acs-cb-wrapper:not([style*="background"]) .acs-cb-headline,
.acs-cb-wrapper[style*="background-color: rgba(0, 0, 0, 0.00)"] .acs-cb-headline {
    color: #333;
    text-shadow: none;
}

/* ==================================================
   ボタンコンテナ
================================================== */
.acs-cb-buttons {
    display: flex;
    gap: 10px;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    width: 100%;
    max-width: 600px;
}

/* ==================================================
   テキストボタン
================================================== */
.acs-cb-btn--text {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 28px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 700;
    text-decoration: none;
    text-align: center;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
    transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
    min-width: 200px;
    white-space: nowrap;
    -webkit-tap-highlight-color: transparent;
}

.acs-cb-btn--text:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
    filter: brightness(1.08);
    text-decoration: none;
}

.acs-cb-btn--text:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

/* 2ボタン時の幅調整 */
.acs-cb-wrapper--two-buttons .acs-cb-btn--text {
    min-width: 160px;
    padding: 14px 20px;
}

/* ==================================================
   画像ボタン（Pro版）
================================================== */
.acs-cb-btn--image {
    display: inline-block;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    -webkit-tap-highlight-color: transparent;
    text-decoration: none;
}

.acs-cb-btn--image img {
    display: block;
    max-width: 280px;
    max-height: 80px;
    width: auto;
    height: auto;
    vertical-align: middle;
}

.acs-cb-btn--image:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.28);
}

.acs-cb-btn--image:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.16);
}

/* 2ボタン時の画像サイズ調整 */
.acs-cb-wrapper--two-buttons .acs-cb-btn--image img {
    max-width: 220px;
}

/* ==================================================
   レスポンシブ
================================================== */
@media (max-width: 480px) {
    .acs-cb-wrapper {
        padding: 10px 12px 14px;
    }

    .acs-cb-buttons {
        flex-direction: column;
        gap: 8px;
    }

    .acs-cb-btn--text,
    .acs-cb-wrapper--two-buttons .acs-cb-btn--text {
        min-width: 0;
        width: 100%;
        max-width: 340px;
        padding: 14px 20px;
        font-size: 15px;
    }

    .acs-cb-btn--image img,
    .acs-cb-wrapper--two-buttons .acs-cb-btn--image img {
        max-width: 240px;
    }

    .acs-cb-headline {
        font-size: 12px;
    }

    .acs-cb-sub-headline {
        font-size: 11px;
    }
}

/* ==================================================
   ボタン下テキスト（Pro版）
================================================== */
.acs-cb-sub-headline {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.85);
    text-align: center;
    margin-top: 6px;
    line-height: 1.4;
    max-width: 100%;
    padding: 0 8px;
}

/* 背景なし時は文字色を変更 */
.acs-cb-wrapper:not([style*="background"]) .acs-cb-sub-headline,
.acs-cb-wrapper[style*="background-color: rgba(0, 0, 0, 0.00)"] .acs-cb-sub-headline {
    color: #555;
}
