/**
 * Mobile Fixed Footer - スマホ専用固定フッターCTA
 * モバイルデバイスでのコンバージョン向上のための固定フッター
 */

/* ==========================================================================
   モバイル固定フッター
   ========================================================================== */

.mobile-fixed-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 999;
    padding: var(--spacing-md);
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(12px);
    border-top: 1px solid rgba(0, 115, 170, 0.1);
    box-shadow: 0 -2px 20px rgba(0, 115, 170, 0.08), 0 -1px 4px rgba(0, 0, 0, 0.05);
    display: none; /* デフォルトは非表示 */
}

/* モバイルデバイスでのみ表示 */
@media (max-width: 768px) {
    .mobile-fixed-footer {
        display: block;
    }
}

.mobile-fixed-footer__container {
    display: flex;
    gap: var(--spacing-sm);
    max-width: 100%;
}

/* ==========================================================================
   フッターボタン
   ========================================================================== */

.mobile-fixed-footer__button {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-md) var(--spacing-lg);
    border-radius: var(--border-radius-full);
    text-decoration: none;
    font-weight: var(--font-weight-semibold);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 2px 8px rgba(0, 115, 170, 0.15), 0 1px 3px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
    border: none;
    min-height: 56px;
}

.mobile-fixed-footer__button:hover {
    text-decoration: none;
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

/* 電話ボタン */
.mobile-fixed-footer__button--phone {
    background: linear-gradient(135deg, var(--color-primary), var(--color-primary-light));
    color: var(--color-white);
}

.mobile-fixed-footer__button--phone:hover {
    color: var(--color-white);
    background: linear-gradient(135deg, var(--color-primary-dark), var(--color-primary));
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 115, 170, 0.25), 0 2px 6px rgba(0, 0, 0, 0.1);
}

/* お問い合わせボタン */
.mobile-fixed-footer__button--contact {
    background: linear-gradient(135deg, var(--color-accent), var(--color-accent-light));
    color: var(--color-white);
}

.mobile-fixed-footer__button--contact:hover {
    color: var(--color-white);
    background: linear-gradient(135deg, var(--color-accent-light), var(--color-accent-dark));
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.25), 0 2px 6px rgba(0, 0, 0, 0.1);
}

/* ==========================================================================
   ボタンコンテンツ
   ========================================================================== */

.button-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    flex-shrink: 0;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transition: all 0.3s ease;
}

.mobile-fixed-footer__button:hover .button-icon {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.05);
}

.button-icon svg {
    width: 18px;
    height: 18px;
    stroke: currentColor;
    stroke-width: 2.5;
}

.button-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
}

.button-label {
    font-size: var(--font-size-base);
    font-weight: var(--font-weight-semibold);
    line-height: 1.2;
}

.button-sub {
    font-size: var(--font-size-xs);
    opacity: 0.85;
    line-height: 1;
    font-weight: var(--font-weight-normal);
}

/* ==========================================================================
   レスポンシブ対応
   ========================================================================== */

/* 極小画面での調整 */
@media (max-width: 360px) {
    .mobile-fixed-footer__button {
        padding: var(--spacing-sm);
        gap: 6px;
    }
    
    .button-icon svg {
        width: 18px;
        height: 18px;
    }
    
    .button-label {
        font-size: 12px;
    }
    
    .button-sub {
        font-size: 10px;
    }
}

/* 横向き対応 */
@media (max-width: 768px) and (orientation: landscape) {
    .mobile-fixed-footer {
        padding: 6px var(--spacing-sm);
    }
    
    .mobile-fixed-footer__button {
        padding: var(--spacing-sm);
    }
}

/* ==========================================================================
   既存フローティングバッジとの調整
   ========================================================================== */

/* フローティングバッジがある場合の調整 */
.contact-floating-badge:not(:empty) ~ .mobile-fixed-footer {
    bottom: 90px; /* フローティングバッジ分上に移動 */
}

/* 複数の固定要素の重複回避 */
@media (max-width: 768px) {
    /* フローティングバッジを少し上に移動して重複を避ける */
    .contact-floating-badge {
        bottom: 100px !important;
    }
}

/* お問い合わせページでは非表示 */
.page-template-page-contact .mobile-fixed-footer,
.page-id-contact .mobile-fixed-footer {
    display: none !important;
}

/* ==========================================================================
   アクセシビリティ対応
   ========================================================================== */

/* フォーカス状態 */
.mobile-fixed-footer__button:focus {
    outline: 2px solid var(--color-accent);
    outline-offset: 2px;
}

/* 高コントラストモード対応 */
@media (prefers-contrast: high) {
    .mobile-fixed-footer {
        background: var(--color-white);
        border-top: 2px solid var(--color-text);
    }
    
    .mobile-fixed-footer__button {
        border: 1px solid currentColor;
    }
}

/* アニメーション軽減設定 */
@media (prefers-reduced-motion: reduce) {
    .mobile-fixed-footer__button {
        transition: none;
    }
    
    .mobile-fixed-footer__button:hover {
        transform: none;
    }
}