/**
 * サイドバーモバイル版スタイル
 * スマホ版：フロートボタンとモーダル表示
 * PC版：非表示（通常のサイドバーを表示）
 */

/* スマホ版：フロートボタン */
#mobile-sidebar-button {
    position: fixed;
    bottom: 20px;
    right: 20px;
    padding: 12px 20px;
    background: #f97316;
    color: white;
    border: none;
    border-radius: 28px;
    box-shadow: 0 4px 12px rgba(249, 115, 22, 0.4);
    cursor: pointer;
    z-index: 999;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 700;
    transition: all 0.3s ease;
    min-height: 44px;
}

#mobile-sidebar-button:hover {
    background: #ea580c;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(249, 115, 22, 0.5);
}

#mobile-sidebar-button:active {
    transform: translateY(0);
}

#mobile-sidebar-button svg {
    width: 20px;
    height: 20px;
    stroke: currentColor;
    stroke-width: 2;
    flex-shrink: 0;
}

#mobile-sidebar-button .button-text {
    white-space: nowrap;
}

/* スマホ版：モーダル */
#mobile-sidebar-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1001;
    display: none; /* 初期状態は非表示（JavaScriptで制御） */
    align-items: flex-end;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

/* モーダルが開いている状態 */
#mobile-sidebar-modal.sidebar-modal-open {
    display: flex;
    opacity: 1;
    visibility: visible;
}


.sidebar-modal-content {
    background: white;
    width: 100%;
    max-width: 100%;
    max-height: 80vh;
    border-radius: 20px 20px 0 0;
    padding: 24px;
    transform: translateY(100%);
    transition: transform 0.3s ease;
    overflow-y: auto;
}

#mobile-sidebar-modal.sidebar-modal-open .sidebar-modal-content {
    transform: translateY(0);
}

.sidebar-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 2px solid #e2e8f0;
}

.sidebar-modal-title {
    font-size: 18px;
    font-weight: 800;
    color: #1a202c;
    margin: 0;
}

.sidebar-close-button {
    background: none;
    border: none;
    font-size: 24px;
    color: #718096;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.sidebar-close-button:hover {
    background: #f7fafc;
    color: #2d3748;
}

/* モーダル内のサイドバーコンテンツ */
#mobile-sidebar-modal .sidebar-content-wrapper {
    padding: 0;
}

#mobile-sidebar-modal .sidebar-content-wrapper > * {
    margin-bottom: 24px;
}

#mobile-sidebar-modal .sidebar-content-wrapper > *:last-child {
    margin-bottom: 0;
}

/* スクロールバーのスタイル（モーダル用） */
.sidebar-modal-content::-webkit-scrollbar {
    width: 6px;
}

.sidebar-modal-content::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.sidebar-modal-content::-webkit-scrollbar-thumb {
    background: #cbd5e0;
    border-radius: 3px;
}

.sidebar-modal-content::-webkit-scrollbar-thumb:hover {
    background: #a0aec0;
}

/* レスポンシブ：PC版（768px以上）を非表示 */
@media (min-width: 768px) {
    #mobile-sidebar-button,
    #mobile-sidebar-modal {
        display: none !important;
    }
}

/* レスポンシブ：スマホ版を非表示 */
@media (max-width: 1023px) {
    /* モバイルでは通常のサイドバーを非表示 */
    .lg\\:w-\\[300px\\] .lg\\:hidden {
        display: none;
    }
}

