@charset "utf-8";
/*==========================================================
  responsive.css - WEBMC スマートフォン対応 v2
  既存 base.css には一切手を加えない
  作成: 2026-09-07
==========================================================*/

/* ----------------------------------------------------------
  全体：min-width・固定幅を解除
---------------------------------------------------------- */
@media (max-width: 1060px) {
    body {
        min-width: 0 !important;
    }
    .wrapper {
        min-width: 0 !important;
        padding: 10px !important;
    }
    .container {
        width: 100% !important;
        max-width: 100% !important;
        padding: 0 !important;
    }
}

/* ----------------------------------------------------------
  ログイン画面
---------------------------------------------------------- */
@media (max-width: 480px) {
    .loginWrapper {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }
    .loginContainer {
        position: static !important;
        margin: 0 auto !important;
        width: 90% !important;
        max-width: 400px !important;
        padding: 40px 0 !important;
    }
}

/* ----------------------------------------------------------
  ヘッダー
---------------------------------------------------------- */
@media (max-width: 1060px) {
    header.g > .inner {
        min-width: 0 !important;
        height: auto !important;
        padding: 8px 12px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
    }
    header.g div.logo img {
        height: 28px !important;
    }
    header.g div.profile {
        line-height: 1.4 !important;
        font-size: 11px !important;
    }
    header.g div.profile .image img {
        height: 28px !important;
    }
}

/* ----------------------------------------------------------
  ハンバーガーメニュー
---------------------------------------------------------- */
@media (max-width: 768px) {
    /* ハンバーガーボタン */
    #wmc-hamburger {
        display: block;
        background: none;
        border: none;
        cursor: pointer;
        padding: 6px;
        color: #C2CEE1;
        font-size: 22px;
        line-height: 1;
    }

    nav.g {
        min-width: 0 !important;
        position: relative;
    }
    nav.g ul {
        display: none !important;
        flex-direction: column !important;
        min-width: 0 !important;
        padding: 0 !important;
        position: absolute;
        top: 40px;
        left: 0;
        right: 0;
        background: #1D3563;
        z-index: 999;
        box-shadow: 0 4px 8px rgba(0,0,0,0.3);
    }
    nav.g ul.open {
        display: flex !important;
    }
    nav.g ul > li {
        line-height: 44px !important;
        font-size: 14px !important;
        width: 100% !important;
        margin: 0 !important;
        border-bottom: 1px solid rgba(255,255,255,0.1);
    }
    nav.g ul > li > a {
        padding: 0 1.2em !important;
        display: block !important;
        width: 100% !important;
    }
    nav.g ul > li.right {
        margin-left: 0 !important;
    }
    nav.g ul > li.divider {
        display: none !important;
    }
    /* ハンバーガーボタンを含むナビバー */
    .nav-hamburger-bar {
        display: flex;
        align-items: center;
        justify-content: flex-end;
        padding: 0 12px;
        background: linear-gradient(to bottom, #2C559A, #1D3563);
        min-height: 40px;
    }
}

/* PC・タブレットではハンバーガーボタン非表示 */
@media (min-width: 769px) {
    #wmc-hamburger { display: none !important; }
    .nav-hamburger-bar { display: none !important; }
    nav.g ul { display: flex !important; }
}

/* ----------------------------------------------------------
  ご案内アコーディオン：スマホでは閉じた状態
  （JSで制御するため、CSSではtrigger+*を非表示に）
  ※ base.cssの.ac .trigger+*のslideToggleに依存
---------------------------------------------------------- */

/* ----------------------------------------------------------
  メール設定テーブル：スマホでカード型
  ④の原因：tbody td display:blockがformを壊す問題を修正
  → テーブル自体はそのままで、CSSグリッドで見た目を調整
---------------------------------------------------------- */
@media (max-width: 768px) {
    /* テーブルヘッダー行は「メールアドレス」th + 「新規追加」tdのみ残す */
    table.style thead tr th:not(:first-child) {
        display: none !important;
    }

    /* テーブル全体を幅いっぱいに */
    table.style {
        width: 100% !important;
        display: table !important;
        white-space: normal !important;
    }

    /* 各行をカード風に（メール一覧のstripeテーブルのみ） */
    table.style.stripe tbody tr {
        display: block !important;
        border: 1px solid #ddd !important;
        border-radius: 6px !important;
        margin-bottom: 8px !important;
        background: #fff !important;
        overflow: hidden !important;
    }

    /* メールアドレス列 */
    table.style.stripe tbody td:first-child {
        display: block !important;
        width: 100% !important;
        font-weight: bold !important;
        font-size: 13px !important;
        background: #f5f5f5 !important;
        padding: 8px 10px !important;
        border-bottom: 1px solid #eee !important;
        box-sizing: border-box !important;
        border-right: none !important;
    }

    /* パスワード列：非表示（admin-viewクラスがある場合は表示） */
    table.style.stripe:not(.admin-view) tbody td:nth-child(2):not(.btstyle) {
        display: none !important;
    }

    /* ボタン列：横並び */
    table.style.stripe tbody td.btstyle {
        display: flex !important;
        gap: 6px !important;
        padding: 8px !important;
        border: none !important;
        box-sizing: border-box !important;
        width: 100% !important;
    }
    table.style.stripe tbody td.btstyle input.button {
        flex: 1 !important;
        display: block !important;
        width: auto !important;
        min-width: 0 !important;
        margin: 0 !important;
        padding: 8px 4px !important;
        font-size: 14px !important;
        box-sizing: border-box !important;
    }

    /* ボックス類 */
    .box {
        padding: 12px !important;
    }

    /* フォーム入力欄を全幅に */
    input[type="text"],
    input[type="email"],
    input[type="password"],
    input[type="search"],
    textarea,
    select {
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }

    /* フロート解除 */
    .fl, .fr, .flm, .frm {
        float: none !important;
        margin: 0 0 1em 0 !important;
    }
}

/* ----------------------------------------------------------
  スマホ専用：さらに細かい調整
---------------------------------------------------------- */
@media (max-width: 480px) {
    .wrapper {
        padding: 8px !important;
    }
}

/* ----------------------------------------------------------
  grid2を1列に・colの固定幅解除
---------------------------------------------------------- */
@media (max-width: 768px) {
    /* パスワード送信・ご注意の2列→1列 */
    .grid2 > *,
    .grid3 > *,
    .grid4 > * {
        width: 100% !important;
        margin-right: 0 !important;
        float: none !important;
        display: block !important;
    }

    /* テーブルのcol固定幅を解除 */
    col {
        width: auto !important;
    }

    /* ボタン列の固定幅解除（index_class.phpの160px指定） */
    table.style tbody td.btstyle {
        width: auto !important;
        min-width: 0 !important;
    }

    /* テーブル行を横幅いっぱいに */
    table.style tbody tr {
        width: 100% !important;
        box-sizing: border-box !important;
    }

    /* 設定変更画面のテーブルはカード型にしない */
    table.style.form-table tbody tr,
    table.style.form-table tbody td {
        display: table-row !important;
        display: revert !important;
        width: auto !important;
        border: revert !important;
    }
}

/* ----------------------------------------------------------
  ハンバーガーメニュー：テキスト左揃え統一
---------------------------------------------------------- */
@media (max-width: 768px) {
    nav.g ul > li > a {
        text-align: left !important;
        padding-left: 1.2em !important;
    }
    nav.g ul > li:first-child > a {
        text-align: left !important;
        padding-left: 1.2em !important;
    }
}
