/* andW Fixed Footer CSS */

/* フォールバック：CSS変数が効かない場合の基本表示（768px固定） */
@media (max-width: 768px) {
    #andw-fixed-footer-wrapper {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        z-index: 9999;
        display: flex;
        flex-direction: column;
        background: #ffffff;
        box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
        transition: transform 0.3s ease;
        transform: translateY(0);
    }

    .andw-footer-buttons {
        display: flex;
        flex-direction: row;
        min-height: 50px;
    }

    .andw-footer-button {
        display: flex;
        align-items: center;
        justify-content: center;
        text-decoration: none;
        color: inherit;
        padding: 8px 4px;
        border: none;
        cursor: pointer;
        transition: opacity 0.2s ease;
        font-size: 14px;
        line-height: 1.2;
        text-align: center;
        gap: 4px;
        flex-direction: column;
    }

    /* フォールバック用Font Awesomeアイコン */
    .andw-button-icon {
        font-family: "Font Awesome 6 Free", "Font Awesome 6 Pro", FontAwesome, sans-serif;
        font-weight: 900;
        font-size: 16px;
        line-height: 1;
    }

    .andw-button-icon::before {
        content: var(--icon-content, '');
    }

    .andw-button-label {
        font-size: 12px;
        line-height: 1.1;
        word-break: break-all;
        overflow-wrap: break-word;
    }

    /* スライド状態の制御 */
    #andw-fixed-footer-wrapper.andw-hide {
        transform: translateY(100%) !important;
    }

    #andw-fixed-footer-wrapper.andw-show {
        transform: translateY(0) !important;
    }

    #andw-fixed-footer-wrapper.andw-closed {
        display: none !important;
    }
}

/* 基本スタイル（PHPのインラインCSSで画面幅制御される） */

/* Font Awesomeアイコン */
.andw-button-icon {
    font-family: "Font Awesome 6 Free", "Font Awesome 6 Pro", FontAwesome, sans-serif;
    font-weight: 900;
    font-size: 16px;
    line-height: 1;
}

.andw-button-icon::before {
    content: var(--icon-content, '');
}

/* 設定値より大きい画面での非表示はPHPのインラインCSSで制御 */

/* アクセシビリティ: 動的効果を無効にしたユーザー向け */
@media (prefers-reduced-motion: reduce) {
    #andw-fixed-footer-wrapper {
        transition: none;
    }

    .andw-footer-button {
        transition: none;
    }

    #andw-fixed-footer-wrapper .andw-close-button {
        transition: none;
    }
}

/* ダークモード対応 */
@media (prefers-color-scheme: dark) {
    #andw-fixed-footer-wrapper {
        background: #1a1a1a;
        box-shadow: 0 -2px 10px rgba(255, 255, 255, 0.1);
    }
}

/* フォーカス時の可視性向上（PHPのインラインCSSで制御） */

/* ボタンが1つだけの場合の調整（PHPのインラインCSSで制御） */

/* ローディング時のスムーズな表示（設定幅内でのみ適用） */
@media (max-width: 768px) {
    #andw-fixed-footer-wrapper {
        transform: translateY(100%);
    }

    #andw-fixed-footer-wrapper.andw-loaded {
        transform: translateY(0);
    }
}

/* 閉じるボタンの最終スタイル（PHPのインラインCSSで制御） */