/* 追従フッターブロック - フロントエンド用スタイル */
.sticky-footer-block {
    position: fixed;
    left: 0;
    right: 0;
    width: 100%;
    background-color: var(--background-color, #ffffff);
    color: var(--text-color, #000000);
    z-index: var(--z-index, 9999);
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

/* 下部固定（デフォルト） */
.sticky-footer-block.sticky-footer-bottom {
    bottom: 0;
}

/* 上部固定 */
.sticky-footer-block.sticky-footer-top {
    top: 0;
}

/* フッターのコンテンツエリア */
.sticky-footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: var(--height, 60px);
    padding: var(--padding-vertical, 15px) var(--padding-horizontal, 20px);
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
    box-sizing: border-box;
}

/* サブテキストスタイル */
.sticky-footer-sub-text {
    font-size: var(--sub-text-size, 12px);
    color: var(--sub-text-color, #000000);
    text-align: center;
    margin: 0 0 8px 0;
    opacity: 0.9;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

/* ボタンスタイルの調整 */
.sticky-footer-block .wp-block-buttons {
    margin: 0;
    gap: 10px;
}

.sticky-footer-block .wp-block-button {
    margin: 0;
}

.sticky-footer-block .wp-block-button__link {
    padding: 12px 24px;
    border-radius: 25px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    box-sizing: border-box;
}

.sticky-footer-block .wp-block-button__link:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* テキストブロック */
.sticky-footer-block .wp-block-paragraph {
    margin: 0;
    line-height: 1.4;
    text-align: center;
}

/* 画像ブロック */
.sticky-footer-block .wp-block-image {
    margin: 0;
    max-height: 40px;
}

.sticky-footer-block .wp-block-image img {
    max-height: 40px;
    width: auto;
    vertical-align: middle;
}

/* リストブロック */
.sticky-footer-block .wp-block-list {
    margin: 0;
    padding: 0;
    list-style: none;
    display: flex;
    gap: 15px;
    justify-content: center;
    align-items: center;
}

.sticky-footer-block .wp-block-list li {
    margin: 0;
}

/* リンクブロック */
.sticky-footer-block a {
    color: inherit;
    text-decoration: none;
    transition: opacity 0.3s ease;
}

.sticky-footer-block a:hover {
    opacity: 0.8;
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
    .sticky-footer-content {
        padding: var(--padding-vertical, 12px) var(--padding-horizontal, 15px);
        min-height: var(--height, 50px);
    }
    
    .sticky-footer-sub-text {
        font-size: calc(var(--sub-text-size, 12px) - 1px);
        margin: 0 0 6px 0;
        white-space: normal;
        overflow: visible;
        text-overflow: initial;
    }
    
    .sticky-footer-block .wp-block-button__link {
        padding: 10px 20px;
        font-size: 14px;
        min-height: 40px;
    }
    
    .sticky-footer-block .wp-block-buttons {
        flex-wrap: wrap;
        gap: 8px;
    }
    
    .sticky-footer-block .wp-block-list {
        flex-direction: column;
        gap: 8px;
    }
}

@media (max-width: 480px) {
    .sticky-footer-content {
        padding: var(--padding-vertical, 10px) var(--padding-horizontal, 12px);
        min-height: var(--height, 45px);
    }
    
    .sticky-footer-sub-text {
        font-size: calc(var(--sub-text-size, 12px) - 2px);
        margin: 0 0 11px 0;
    }
    
    .sticky-footer-block .wp-block-button__link {
        padding: 8px 16px;
        font-size: 13px;
        min-height: 36px;
    }
    
    .sticky-footer-block .wp-block-paragraph {
        font-size: 14px;
    }
}

/* モバイルで非表示設定の場合 */
@media (max-width: 768px) {
    .sticky-footer-block[data-hide-on-mobile="true"] {
        display: none !important;
    }
}

/* アニメーション効果 */
@keyframes slideInUp {
    from {
        transform: translateY(100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes slideInDown {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.sticky-footer-block.sticky-footer-bottom {
    animation: slideInUp 0.5s ease-out;
}

.sticky-footer-block.sticky-footer-top {
    animation: slideInDown 0.5s ease-out;
}

/* フォーカスアクセシビリティ */
.sticky-footer-block .wp-block-button__link:focus,
.sticky-footer-block a:focus {
    outline: 2px solid #ffffff;
    outline-offset: 2px;
}

/* 高コントラストモード対応 */
@media (prefers-contrast: high) {
    .sticky-footer-block {
        border-top: 1px solid;
    }
    
    .sticky-footer-block.sticky-footer-top {
        border-top: none;
        border-bottom: 1px solid;
    }
}

/* モーション設定を無効にするユーザー向け */
@media (prefers-reduced-motion: reduce) {
    .sticky-footer-block {
        animation: none;
        transition: none;
    }
    
    .sticky-footer-block .wp-block-button__link {
        transition: none;
    }
    
    .sticky-footer-block .wp-block-button__link:hover {
        transform: none;
    }
}

.post_content .wp-block-custom-sticky-footer{
    margin-bottom: 0;
}