/* =========================================
   v4.1 — 和モダン完全統一版
   （右上ハンバーガーと z-index 調整済み）
========================================= */

/* 初期状態 */
.modal {
    display: none;
    position: static;
    z-index: auto;
}

/* 表示時 */
.modal.show {
    display: flex;
    position: fixed;
    inset: 0;
    z-index: 980; /* ハンバーガーより上、メニューより上 */
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.55);
    overflow-y: auto;
}

/* 基本（スマホ） */
.modal-content {
    background-color: #fff;
    margin: 40px auto;
    padding: 22px;
    border-radius: 14px;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;

    /* 和モダン柔らか系の影 */
    box-shadow: 0 6px 20px rgba(0,0,0,0.18);
}

.modal-close {
    position: absolute;
    top: 12px;
    right: 16px;
    font-size: 30px;
    cursor: pointer;
    color: #555;
}

#modal_name {
    text-align: center;
    margin: 5px 0 18px;
    font-size: 1.7rem;
    font-weight: bold;
    color: #2a3f5f;
    border-bottom: 2px solid #d8cfe3;
    padding-bottom: 6px;
}

.modal-image {
    width: 100%;
    height: auto;
    max-height: 50vh;
    object-fit: contain;
    margin-bottom: 15px;
    border-radius: 8px;
}

.modal-table {
    width: 100%;
    border-collapse: collapse;
}

.modal-table th,
.modal-table td {
    padding: 10px;
    border-bottom: 1px solid #e6e6e6;
    text-align: left;
    font-size: 14px;
}

.modal-table th {
    width: 35%;
    background-color: #f4f0f7;
    color: #2a3f5f;
}

/* タブレット縦 */
@media (min-width: 600px) and (max-width: 899px) {
    .modal-content {
        width: 80%;
        max-width: 700px;
    }
    .modal-image { max-height: 45vh; }
}

/* PC・タブレット横 */
@media (min-width: 900px) {
    .modal-content {
        width: 85%;
        max-width: 1100px;
        max-height: 95vh;
    }

    .modal-body {
        display: flex;
        gap: 24px;
        max-height: 90vh;
        overflow-y: auto;
    }

    .modal-image {
        width: 45%;
        max-height: 65vh;
	object-fit: contain;
    }

    .modal-table {
        width: 50%;
        max-height: 85vh;
        overflow-y: auto;
    }
}

/* =========================================
   和風テーマ①：和紙ミニマル
========================================= */
.theme-washi .modal-content {
    background: #fdfcf7;
    border: 1px solid #e5e2d8;
    background-image: url('/static/sakeList/images/washi_texture.png');
    background-size: cover;
}

.theme-washi #modal_name {
    color: #333;
    letter-spacing: 1px;
}

.theme-washi .modal-table th {
    background-color: #f3f1eb;
    border-bottom: 1px solid #dcd7c9;
}

.theme-washi .modal-table td {
    border-bottom: 1px solid #e5e2d8;
}

/* =========================================
   和風テーマ②：黒 × 金（高級系）
========================================= */
.theme-kurokin .modal-content {
    background: #111;
    color: #f5f5f5;
    border: 1px solid #c9a86a;
    box-shadow: 0 0 20px rgba(0,0,0,0.6);
}

.theme-kurokin #modal_name {
    color: #e8d8a8;
    border-bottom: 1px solid #c9a86a;
}

.theme-kurokin .modal-table th {
    background-color: #1a1a1a;
    color: #e8d8a8;
    border-bottom: 1px solid #c9a86a;
}

.theme-kurokin .modal-table td {
    border-bottom: 1px solid #333;
}

.theme-kurokin .modal-close {
    color: #e8d8a8;
}

/* =========================================
   和風テーマ③：和モダン柔らか系（統一）
========================================= */
.theme-wamodern .modal-content {
    background: #ffffff;
    border-radius: 14px;
    border: 2px solid #e6e6e6;
}

.theme-wamodern #modal_name {
    color: #2a3f5f;
    border-bottom: 2px solid #d8cfe3;
}

.theme-wamodern .modal-table th {
    background-color: #f4f0f7;
}

.theme-wamodern .modal-table td {
    border-bottom: 1px solid #e6e6e6;
}

.theme-wamodern .modal-close {
    color: #555;
}
