/**
 * BBQ予約 フロントエンドスタイル
 */
.woocommerce-content {
    border-color:var(--border-color);
    --border-color:#ddd;
    --input-border-color:#ccc;
    --layer-color:#d3f5ffa0;
    --input-border-radius: 4px;
}

.woocommerce-message, .woocommerce-error, .woocommerce-info { font-size:1em; }

.bbq-term-wrapper {
    margin:1em 0 2em;
    font-size:.875em;
    max-height:480px;
    overflow-y:auto;
    border-radius:8px; border-width:1px;
    padding:16px;
}
.bbq-res-confirm-link {
     text-align:right;
}
/* フォームセクション */
.bbq-form-section {
    margin-bottom: 2em;
    padding: 1.5em;
    background: #f9f9f9;
    border-radius: 8px;
}

.bbq-form-section h2 {
    font-size: 1.1em;
    margin: 0 0 1em 0;
    padding-bottom: .5em;
    border-bottom-width: 1px;
}

/* フォーム行 */
* + .bbq-form-row {
    margin-top: 1em;
}

.bbq-form-row > label {
    display: block;
}

.bbq-label {
    display: block;
    font-weight: 500;
    margin-bottom: .5em;
}

.bbq-label .required {
    color: #c00;
}

.bbq-form-row input[type="text"],
.bbq-form-row input[type="email"],
.bbq-form-row input[type="tel"],
.bbq-form-row input[type="date"],
.bbq-form-row input[type="number"],
.bbq-form-row textarea {
    width: 400px;
    max-width: 100%;
    display:block;
}
  .bbq-form-row input[type="date"] {
      height: calc(var(--input-font-size) + 2 * (var(--input-padding) + var(--input-border-width)));
  }

/* datepicker テキスト入力 */
.bbq-date-display {
    cursor: pointer;
    caret-color: transparent;
}

/* datepicker ポップアップ 空き状況カラー */
.ui-datepicker {
    --theme-color:#333
}
.ui-datepicker .bbq-dp-closed a,
.ui-datepicker .bbq-dp-closed span,
.ui-datepicker .bbq-dp-full a,
.ui-datepicker .bbq-dp-full span {
}
.ui-datepicker .bbq-dp-limited a {
    color: #e07800;
}

.bbq-form-row input[type="number"] {
    width: 100px;
}

.bbq-suffix {
    margin-left: .5em;
}

/* タイプ選択（BBQ予約 / テイクアウト） */
.bbq-type-selector {
    display: flex;
    gap: .75em;
}


.bbq-date-form { 
    display:flex;
    flex-wrap:wrap;
    justify-content:space-between;
}
.bbq-date-form label { 
    max-width:100%;
}

/* 時間帯選択 */
.bbq-slot-options {
    display: flex;
    flex-direction: column;
    gap: .5em;
}
.bbq-slot-options.is-loading {
    opacity: .5;
    pointer-events: none;
}
.bbq-slot-options.is-loading .bbq-slot-availability::after {
    content: '…';
    color: #999;
    font-size: .875em;
}

.bbq-slot-option, .bbq-type-option {
    display: flex;
    align-items: center;
    padding: .75em 1em;
    background: #fff;
    border-width: 1px;
    border-radius: 4px;
    cursor: pointer;
    transition: border-color .2s, background-color .2s;
}

.bbq-slot-option:hover, .bbq-type-option:hover {
    border-color: var(--gray-color);
}

.bbq-slot-option input[type="radio"], .bbq-type-option input[type="radio"] {
    margin: 0;
}

.bbq-slot-option input[type="radio"]:checked + .bbq-slot-label, .bbq-type-option input[type="radio"]:checked + .bbq-type-label {
    font-weight: 600;
}

.bbq-slot-label, .bbq-type-selector .bbq-type-option {
    flex: 1;
}

.bbq-type-selector .bbq-type-option .bbq-type-label {
    margin:0;
}

.bbq-slot-availability {
    font-size: .875em;
    color: #090;
}

.bbq-slot-availability.few {
    color:orange;
}

.bbq-slot-availability.full {
    color: #c00;
}

.bbq-slot-option:has(input:disabled) {
    pointer-events: none;
    cursor: not-allowed;
}

.bbq-slot-option:has(input:disabled) .bbq-slot-label {
    opacity: 0.5;
}

.bbq-guest-counts .bbq-guest-count-inputs {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap:1em;

}
.bbq-guest-counts .bbq-guest-count-item {
    display: flex;
    align-items: center;
    gap:0;
    overflow:hidden;
    position: relative;
    background-color:var(--input-field-color);
    border-color:var(--input-border-color);
    border-radius:var(--input-border-radius);
    border-width:1px;
}
.bbq-guest-counts span.bbq-guest-type {
    background-color:#f9f9f9;
    min-width:6em;
    padding:.25em;
    display:flex;
    flex-direction:column;
    align-items:center;
    justify-content:center;
    align-self:stretch;
}
.bbq-guest-counts span.bbq-guest-type small {
    display:block;
    word-break:keep-all;
    font-size:10px;
}

.bbq-guest-counts input.bbq-guest-input {
    width:6em;
    border-width:0;
    text-align:center;
    border-top-left-radius:0;
    border-bottom-left-radius:0;
}

.bbq-guest-type {
    display:block;
    word-break: keep-all;
    line-height:1.4;
}


/* フォームアクション */

.woocommerce-message, .woocommerce-error, .woocommerce-info { 
    border-radius: 4px;
    margin:1.5em 0;
}

.bbq-form-actions {
    display: flex;
    align-items: center;
    gap: 1em;
    margin-top: 1.5em;
    padding-top: 1.5em;
    border-top-width: 1px ;
}

.bbq-form-notice {
    flex: 1;
    font-weight: 500;
    padding: 1em;
    margin-bottom: 1.5em;
    background: #f4f4f4;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.bbq-form-notice.success {
    color: #090;
    background: #f0fef6;
    border: 1px solid #c6f5dd;
}

.bbq-form-notice.error {
    color: #c00;
    background: #fef0f0;
    border: 1px solid #f5c6c6;
}

.bbq-btn:disabled {
    opacity: .5;
    cursor: not-allowed;
}

/* 予約サマリー */
.bbq-summary {
    margin-bottom: 2em;
}

.woocommerce-content h2 {
    font-size: 1.1em;
    margin: 0 0 1em 0;
}

.bbq-summary-list {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: .5em 1em;
    padding:1em 1.5em;
    border-width:1px;
    margin: 1em 0;
    border-radius: 4px;
}

.bbq-summary-list dt {
    font-weight: 500;
    color: var(--gray-color);
}

.bbq-summary-list dd {
    margin: 0;
}

.bbq-description {
    color: var(--gray-color);
    margin-bottom: 1.5em;
}

.bbq-product-cat {
    margin:0;
    border-top-width:1px;
}
.bbq-product-cat-heading {
    margin:0;
    padding:16px 80px;
    min-height:96px;
    display:flex;
    flex-direction:column;
    position: relative;
    justify-content:center;
    cursor: pointer;
}

.bbq-product-cat-heading:hover::after {
    color:var(--hover-color);
}
.bbq-product-cat-heading img.bbq-product-cat-img { width:64px; height:64px; object-fit:cover; position:absolute; left:0; top:0; bottom:0; margin: auto 0; border-radius: 50%;}

.bbq-product-cat-heading h3.bbq-product-cat-h3 {
    font-size: 1.3em;
    margin:0;
    padding: 0;
    background:transparent;
}

.bbq-product-cat-heading p { 
    margin:0;
}
.bbq-product-cat-heading::after { transition:transform .25s; content:'▼'; font-size:16px; line-height:1; padding:16px; width:48px; height:48px; display:block; margin: auto 0; position:absolute; right:0; top:0; bottom:0; }

.bbq-product-cat.open .bbq-product-cat-heading::after { color:var(--gray-color); transform:rotate(-180deg);}

.bbq-category-description {
    font-size: .875em;
    line-height:1.5;
    color: var(--gray-color);
    margin: .5em 0 0;
}


.bbq-product-list {
    display:none;
    position:relative;
    background-color:var(--border-color);
    padding:1em;
}

.bbq-product-item {
    display: flex;
    align-items: flex-start;
    background-color:#fff;
    border-radius:4px;
    margin:1em 0 0;
    gap: 1em;
    padding:1em;
    position: relative;
}

.bbq-product-item:first-child {
    margin-top:0;
}

.bbq-product-item.in-cart {
    background: var(--focus-color);
}

.bbq-product-item.bbq-product-disabled {
    overflow:hidden;
    pointer-events: none;
    cursor: not-allowed;
}

.bbq-product-item.bbq-product-disabled::before {
    content:''; display:block; z-index:2; background-color:rgba(255,255,255,.8); position:absolute;
    left:0; top:0; bottom:0; right:0;
}

.bbq-product-item.bbq-product-disabled::after{
    content:'Not Available'; display:block; z-index:3; position:absolute; left:50%; top:50%; transform:translate(-50%,-50%);
}

.bbq-product-item.bbq-product-disabled .bbq-qty-btn,
.bbq-product-item.bbq-product-disabled .bbq-qty-select {
    background: #eee;
    border-color:var(--input-border-color);
    color: #999;
}

.bbq-product-thumbnail {
    flex-shrink: 0;
    width:160px;
    height:160px;
}

.bbq-product-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 4px;
}

.bbq-product-info {
    flex: 1;
    min-width: 0;
    display:flex;
    flex-wrap:wrap;
    gap:0 1em;
}

p.bbq-product-excerpt {
    display: flex;
    font-size: .875em;
    width:100%;
    color:var(--gray-color);
    margin:0 0 .25em;
    line-height:1.4;
}

h4.bbq-product-name {
    display: block;
    width:100%;
    font-weight: 600!important;
    font-size:1.1em;
    margin:0 0 .25em;
    line-height:1.4;
}

h4.bbq-product-name::before { 
    display:none!important;
}

p.bbq-product-price {
    display: block;
    width:100%;
    font-size: 1.1em;
    font-weight: 600;
    margin:0 0 .25em;
    line-height:1.4;
}

p.bbq-product-content {
    display: block;
    font-size: .875em;
    color: var(--gray-color);
    margin:.25em 0 0;
    line-height:1.6;
    width:100%;
}

.bbq-extra-product-list .bbq-product-thumbnail {
    display:none;
}

.bbq-extra-product-list h4.bbq-product-name, .bbq-extra-product-list p.bbq-product-price  {
    width:auto;
}
p.bbq-product-sku {
    display: inline-block;
    font-size: .75em;
    color: var(--gray-color);
    margin:.25em 0 0;
    line-height:1.4;
}

a.bbq-product-url {
    display: inline-block;
    font-size: .75em;
    color: var(--gray-color);
    margin:.25em 0 0;
    line-height:1.4;
}

a.bbq-product-edit-url {
    font-size: 12px;
    position:absolute;
    left:0; top:0;
    background-color:orange;
    color:#fff;
    line-height:1;
     z-index:999;
    padding:.5em;
}

.bbq-product-qty {
    display: flex;
    align-items: center;
    gap: .5em;
    flex-shrink: 0;
    margin-left: auto;
}

.bbq-qty-select {
    height: 36px;
    padding: 0 4px; 
    width:36px;
    text-align:center;
    border: 1px solid var(--input-border-color);
    border-radius: 4px;
    font-size: 1em;
    background-color: #fff;
    cursor: pointer;
    --focus-color: #fff;
}

.bbq-qty-btn {
    width: 32px;
    height: 32px;
    border: 1px solid var(--input-border-color);
    border-radius: 4px;
    background: #fff;
    cursor: pointer;
    font-size: 1.2em;
    line-height: 1;
    padding:0;
    color:inherit;
}

.bbq-qty-btn:hover {
    background: #f5f5f5;
    color:inherit;
}

/* カートサマリー */
.bbq-cart-summary {
    margin: 2em 0;
    padding: 1.5em;
    background: #f9f9f9;
    border-radius: 8px;
}

.bbq-buttons { margin:var(--wc-padding) 0 0; display:flex; flex-wrap:wrap; gap:8px; }

.bbq-buttons .buttton {
    flex:1
}

.bbq-cart-empty {
    color: var(--gray-color);
    text-align: center;
    padding: 1em;
    background-color:#fff;
}

.bbq-cart-table {
    width: 100%;
    border-collapse: collapse;
    background-color:#fff;
    text-align: left;
}

.bbq-cart-table th {
    color:var(--gray-color);
}

.bbq-cart-table th, .bbq-cart-table td {
    padding: .5em;
}

.bbq-cart-table .bbq-cart-name {
    width:auto;
}

.bbq-cart-table .bbq-cart-qty {
    width:5em;
    text-align:center;
}

.bbq-cart-table .bbq-cart-total {
    width:8em;
    text-align:center;
}

.bbq-cart-menu .bbq-cart-row-menu {
    cursor: pointer;
    transition: background-color .2s;
}

.bbq-cart-grand-total {
     display: flex;
    align-items: flex-end;
    justify-content: flex-end;
    gap: .5em;
}
.bbq-cart-grand-total .price {
    font-size:1.4em;
}
.bbq-cart-grand-total .amount {
    color:var(--strong-color);
}
.bbq-cart-grand-total .woocommerce-price-suffix {
    font-size:.666em;
}

.bbq-cart-row-menu:hover {
    background-color: var(--focus-color);
}

.bbq-cart-table tfoot th,
.bbq-cart-table tfoot td {
    border-bottom: none;
    font-weight: 600;
}

.bbq-cart-table tfoot .bbq-cart-qty,
.bbq-cart-table tfoot .bbq-cart-total {
    font-size: 1.2em;
}

.bbq-order-comments { 
    width:100%;
}


.bbq-remove-item {
    background: none;
    border: none;
    text-decoration: underline;
    color: var(--link-color);
    cursor: pointer;
    font-size: .75em;
}

/* 商品詳細ポップアップ */
.bbq-popup-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(0,0,0,.6);
    overflow-y: auto;
    padding: 2em 1em;
}

.bbq-popup-overlay.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

body.bbq-popup-open {
    overflow: hidden;
}

.bbq-popup {
    position: relative;
    width: 100%;
    max-width: 500px;
    padding: 1.5em;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0,0,0,.3);
}

/* ポップアップ内の商品アイテム */
.bbq-popup .bbq-product-item {
    display: block;
    padding: 0;
    border: none;
    cursor: default;
    background: none;
}

.bbq-popup .bbq-product-item:hover {
    background: none;
}

.bbq-popup .bbq-product-thumbnail {
    width: 100%;
    height: auto;
    aspect-ratio: 1;
    margin-bottom: 1em;
}

.bbq-popup .bbq-product-thumbnail img {
    width: 100%;
    object-fit: contain;
    border-radius: 4px;
}

.bbq-popup .bbq-product-info {
    margin-bottom: 1em;
}

.bbq-popup p.bbq-product-excerpt {
    font-size: .875em;
}

.bbq-popup h4.bbq-product-name {
    font-size: 1.2em;
}

.bbq-popup p.bbq-product-price {
    font-size: 1.2em;
    margin-bottom: .5em;
}

.bbq-popup p.bbq-product-content {
    display: block !important;
    font-size: .875em;
}
.bbq-popup p.bbq-product-sku {
    display: inline-block !important;
    font-size: .875em;
}
.bbq-popup a.bbq-product-url {
    display: inline-block !important;
    font-size: .875em;
}
.bbq-popup a.bbq-product-edit-url{
    display:none;
}

.bbq-popup .bbq-product-qty {
    justify-content: center;
    margin: 0;
}

.bbq-popup .bbq-qty-select {
    height: 44px;
    width: auto;
    min-width: 80px;
    padding: 0 1em;
    font-size: 1.1em;
}

.bbq-popup .bbq-qty-btn {
    display: none;
}

button.bbq-popup-delete,
button.bbq-popup-close {
    display: block;
    height: 44px;
    padding: 0 1em;
    font-size:1em;
    border: none;
    cursor: pointer;
    transition: background .2s;
}

button.bbq-popup-delete {
    color: var(--caution-color);
    background: #fff;
    border: 1px solid currentColor;
    margin-left:auto;
}

@media (max-width: 900px) {
    .bbq-product-thumbnail {
        width:120px;
        height:120px;
    }
}


@media (min-width: 900.1px) {

    .bbq-popup {
        max-width: 740px;
    }

    /* ポップアップ内の商品アイテム */
    .bbq-popup .bbq-product-thumbnail ~ .bbq-product-info, .bbq-popup .bbq-product-thumbnail ~ .bbq-product-qty {
        margin-left:220px;
    }


    .bbq-popup .bbq-product-thumbnail {
        width: 200px;
        position:absolute; 
        left:0; top:0; bottom:0;
        margin:0;
    }
    .bbq-popup .bbq-product-qty {
        justify-content: flex-start;
    }
}
/* レスポンシブ */
@media (max-width: 600px) {
    .bbq-form-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .bbq-summary-list {
        gap:.25em .5em;
        padding:.5em 1em;
    }
    .bbq-form-notice {
        text-align: center;
        margin-bottom: .5em;
    }

    .bbq-btn {
        text-align: center;
    }

    /* モバイル: +/-ボタンを非表示 */
    .bbq-qty-btn {
        display: none;
    }

    /* 商品一覧モバイル対応 */
    .bbq-product-cat {
        width:100vw;
        margin:0 calc(var(--column-gap) * -1);
    }
    .bbq-product-cat-heading {
        padding: 0 calc( 64px + var(--column-gap) );
    }
    .bbq-product-cat-heading img.bbq-product-cat-img {
        width:56px; height:54px; left:var(--column-gap);
    }
    .bbq-product-cat-heading::after {
        right:var(--column-gap);
    }
    .bbq-product-cat h3 {
        position: sticky;
        top: 0;
        z-index: 10;
        margin: 0 -1px;
        padding: .75em 1em;
        background: #333;
        color: #fff;
        font-size: .875em;
    }

    .bbq-product-list {
        border: none;
        border-radius: 0;
        padding:1em var(--column-gap);
    }

    .bbq-product-item {
        align-items:center;
        padding:.75em;
        border-bottom-width: 1px;
        cursor: pointer;
        border-width:0;
    }

    .bbq-qty-select { 
        border-width:2px;
    }

    .bbq-product-item.in-cart .bbq-qty-select {
        border-color:var(--strong-color);
    }

    .bbq-product-thumbnail {
        grid-row: 1 / 3;
        width: 72px;
        height: 72px;
    }

    .bbq-product-info {
        grid-column: 2;
        grid-row: 1;
    }

    p.bbq-product-excerpt {
        font-size: .75em;
        margin: 0 0 .15em;
    }

    h4.bbq-product-name {
        font-size:1em;
        margin: 0 0 .15em;
    }

    p.bbq-product-price {
        font-size:1em;
        margin: 0;
    }

    p.bbq-product-content {
        display: none;
    }

    p.bbq-product-sku {
        display: none;
    }

    a.bbq-product-url, a.bbq-product-url {
        display: none;
    }

    .bbq-product-qty {
        grid-column: 2;
        grid-row: 2;
        margin-left: 0;
        justify-content: flex-start;
    }

    .bbq-qty-select {
        height: 32px;
        min-width: 60px;
        font-size: .875em;
    }

    /* サムネなし時のレイアウト調整 */
    .bbq-product-item:not(:has(.bbq-product-thumbnail)) {
        grid-template-columns: 1fr;
    }

    .bbq-product-item:not(:has(.bbq-product-thumbnail)) .bbq-product-info,
    .bbq-product-item:not(:has(.bbq-product-thumbnail)) .bbq-product-qty {
        grid-column: 1;
    }

    /* カートサマリーモバイル */
    .bbq-cart-summary {
        padding: 1em;
    }
    .bbq-cart-table {
        display:block;
    }
    .bbq-cart-table tbody {
        display:block;
    }
    .bbq-cart-table th,
    .bbq-cart-table td {
        display:inline;
        margin:0 .5em 0 0;
        padding:0;
    }

    .bbq-cart-table thead, .bbq-cart-table tfoot {
        display: none;
    }

    .bbq-cart-table tbody tr {
        display:block;
        padding: .5em;
        line-height:1.5;
        border-bottom-width: 1px;
    }
    .bbq-cart-table tbody tr:last-child {
        border-bottom-width: 0;
    }
    .bbq-cart-table .bbq-cart-qty {
        width:auto; color:var(--strong-color);
    }

    .bbq-cart-table .bbq-cart-qty::before {
        content:"×";
    }
    .bbq-cart-table .bbq-cart-total {
        width:auto; font-size:1.1em;
    }
    .bbq-cart-table tbody td {
        border: none;
        padding: 0;
    }
    .bbq-cart-table tfoot tr {
        justify-content:flex-end;
        border-width:0;
    }
    .bbq-cart-table tfoot .bbq-cart-name {
        display:none
    }


    .bbq-cart-table tfoot th, .bbq-cart-table tfoot td {
        border-width:0;
    }
    /* ポップアップモバイル */
    .bbq-popup-overlay {
        padding: 1em;
        align-items: center;
    }

    .bbq-popup {
        max-width: 100%;
        max-height: 90vh;
        overflow-y: auto;
    }

    .bbq-popup .bbq-product-thumbnail {
        aspect-ratio: 4/3;
    }
}

/* =============================================
   チェックアウト確認画面
   ============================================= */

#customer_details, #order_review_heading {
    display:none;
}

#order_review_heading {
    border-width:0;
}

.bbq-checkout-summary {
    display:block;
    margin-bottom:2em;
}

.bbq-change-link {
    display: inline-block;
    padding: .5em 1em;
    font-size: .875em;
    text-decoration: none;
    border-width: 1px;
    border-radius: 4px;
    border-color: currentColor;
    transition: all .2s;
    color:var(--link-color);
}

.bbq-change-link:hover {
    color:var(--hover-color);
    background: #fff;
}

/* ご要望・備考（order_review後） */
.bbq-checkout-request {
    margin-top: 1.5em;
    padding: 1em;
    background: #f9f9f9;
    border-radius: 4px;
}

.bbq-checkout-request strong {
    display: block;
    font-size: .875em;
    color: var(--gray-color);
    margin-bottom: .5em;
}

.bbq-checkout-request p {
    margin: 0;
    white-space: pre-wrap;
}
.payment_methods .payment_box p, 
.payment_methods .payment_box p label {
    font-size:inherit!important;
}
.payment_cash_agreement { font-weight:600; color:var(--strong-color)}
/* order_review 後の変更リンク */
.bbq-checkout-request + .bbq-change-link,
.woocommerce-checkout-review-order + .bbq-change-link,
#order_review + .bbq-change-link {
    margin-top: 1em;
}
