/**
 * 採用ページ - スティッキーフッターボタン + アクションシート
 * Recruit Sticky Footer with Action Sheet
 *
 * スマートフォン表示時に画面最下部に常時固定表示される
 * 高機能な追従コンバージョンボタン + ボトムシートメニュー
 */

/* ========================================
   1. 追従エリアのラッパー
   ======================================== */

.recruit-sticky-wrapper {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    z-index: 9990;
    padding: 10px 15px;
    padding-bottom: calc(10px + env(safe-area-inset-bottom)); /* iPhone下部対応 */
    box-sizing: border-box;
    pointer-events: none; /* 枠自体はクリックを通す */
    display: flex;
    justify-content: center;
}

/* ========================================
   スティッキーフッターボタン本体
   ======================================== */

.recruit-sticky-footer-btn {
    pointer-events: auto; /* ボタンは押せるように戻す */
    position: relative;
    width: 100%;
    max-width: 500px;
    background: linear-gradient(135deg, #ff5f6d 0%, #ff3d47 100%);
    border: none;
    border-radius: 50px;
    padding: 15px 0;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(255, 61, 71, 0.4);
    transition: transform 0.2s, box-shadow 0.2s;
    color: white;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    animation: stickyButtonSlideUp 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes stickyButtonSlideUp {
    from {
        opacity: 0;
        transform: translateY(24px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.recruit-sticky-footer-btn:hover {
    box-shadow: 0 6px 20px rgba(255, 61, 71, 0.5);
    transform: translateY(-2px);
}

.recruit-sticky-footer-btn:active {
    transform: scale(0.98);
    box-shadow: 0 2px 8px rgba(255, 61, 71, 0.3);
}

.recruit-sticky-footer-btn:focus-visible {
    outline: 2px solid #ff5f6d;
    outline-offset: 3px;
}

/* ボタンの中身（アイコンとテキスト） */
.recruit-sticky-footer-btn-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 0.5px;
}

/* アイコン */
.recruit-sticky-footer-btn-icon {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.recruit-sticky-footer-btn-icon svg {
    width: 100%;
    height: 100%;
    stroke: white;
    fill: none;
}

/* ========================================
   吹き出し（アイキャッチ）
   ======================================== */

.recruit-sticky-footer-bubble {
    position: absolute;
    top: -12px;
    left: 20px;
    background: #ffffff;
    color: #06C755;
    font-size: 12px;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    white-space: nowrap;
    animation: bubblePulse 2s ease-in-out infinite;
    letter-spacing: 0.3px;
}

/* 吹き出しのしっぽ */
.bubble-tail {
    position: absolute;
    bottom: -5px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-top: 6px solid #ffffff;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
}

/* 吹き出しアニメーション */
@keyframes bubblePulse {
    0%, 100% {
        transform: translateY(0);
        opacity: 1;
    }
    50% {
        transform: translateY(-5px);
        opacity: 0.9;
    }
}

/* ========================================
   2. アクションシート（メニュー）のスタイル
   ======================================== */

.sheet-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
    display: flex;
    align-items: flex-end;
    justify-content: center;
}

.sheet-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* シート本体 */
.sheet-content {
    width: 100%;
    max-width: 500px;
    background: #f5f5f5;
    border-top-left-radius: 20px;
    border-top-right-radius: 20px;
    padding: 20px;
    padding-bottom: calc(20px + env(safe-area-inset-bottom));
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.1);
    transform: translateY(100%);
    transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.sheet-overlay.active .sheet-content {
    transform: translateY(0);
}

/* ========================================
   シートのボタン群
   ======================================== */

.sheet-btn {
    display: flex;
    align-items: center;
    width: 100%;
    min-height: 56px;
    padding: 0 20px;
    margin-bottom: 12px;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 600;
    font-size: 15px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    box-sizing: border-box;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
    gap: 12px;
}

.sheet-btn:active {
    transform: scale(0.98);
}

/* 電話番号（ミニ） */
.tel-number-mini {
    font-size: 13px;
    font-weight: normal;
    margin-left: 8px;
    opacity: 0.9;
}

/* バッジ（ミニ） */
.badge-mini {
    display: inline-block;
    background: #ff3d47;
    color: white;
    font-size: 11px;
    padding: 2px 6px;
    border-radius: 4px;
    margin-left: 10px;
    vertical-align: middle;
    transform: translateY(-1px);
    font-weight: 700;
}

/* LINE ボタン */
.btn-line {
    background: #06C755;
    color: white;
    border: 1px solid #06C755;
}

.btn-line:hover {
    background: #05B04A;
}

/* 電話ボタン */
.btn-tel {
    background: #ffffff;
    color: #007aff;
    border: 1px solid #007aff;
}

.btn-tel:hover {
    background: #f0f8ff;
}

/* Webフォームボタン */
.btn-web {
    background: #ffffff;
    color: #333;
    border: 1px solid #ddd;
}

.btn-web:hover {
    background: #f9f9f9;
    border-color: #ccc;
}

/* ボタンテキスト */
.btn-title {
    display: block;
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 2px;
}

.btn-sub {
    display: block;
    font-size: 12px;
    opacity: 0.8;
    font-weight: 500;
}

/* 閉じるボタン */
.sheet-close-btn {
    width: 100%;
    padding: 15px;
    background: transparent;
    border: none;
    color: #999;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: color 0.2s;
    margin-top: 10px;
}

.sheet-close-btn:hover {
    color: #666;
}

.sheet-close-btn:active {
    transform: scale(0.98);
}

/* ========================================
   body パディング調整
   ========================================
   ボタンが本文を隠さないようにする
 */

@media (max-width: 768px) {
    .recruit-sticky-wrapper {
        display: flex;
    }

    body {
        padding-bottom: 80px;
    }
}

/* ========================================
   超小型デバイス対応（max-width: 480px）
   ======================================== */

@media (max-width: 480px) {
    .recruit-sticky-wrapper {
        padding: 8px 12px;
        padding-bottom: calc(8px + env(safe-area-inset-bottom));
    }

    .recruit-sticky-footer-btn {
        padding: 13px 0;
        font-size: 14px;
    }

    .recruit-sticky-footer-btn-content {
        font-size: 14px;
        gap: 6px;
    }

    .recruit-sticky-footer-btn-icon {
        width: 20px;
        height: 20px;
    }

    .recruit-sticky-footer-bubble {
        font-size: 11px;
        padding: 3px 10px;
        top: -10px;
    }

    body {
        padding-bottom: 70px;
    }
}

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

/* 動作を縮減している場合 */
@media (prefers-reduced-motion: reduce) {
    .recruit-sticky-wrapper {
        animation: none;
    }

    .recruit-sticky-footer-btn {
        transition: none;
    }

    .recruit-sticky-footer-bubble {
        animation: none;
    }

    .sheet-overlay,
    .sheet-content {
        transition: none;
    }
}

/* ダークモード対応 */
@media (prefers-color-scheme: dark) {
    .sheet-content {
        background: #2a2a2a;
    }

    .sheet-btn {
        background: #3a3a3a;
        color: #e0e0e0;
    }

    .btn-line {
        background: #06C755;
        color: white;
    }

    .btn-tel {
        background: #3a3a3a;
        color: #0a84ff;
        border-color: #0a84ff;
    }

    .btn-web {
        background: #3a3a3a;
        color: #e0e0e0;
        border-color: #555;
    }

    .sheet-close-btn {
        color: #666;
    }

    .sheet-close-btn:hover {
        color: #999;
    }
}
