/* スマホ版・PC版表示制御 */
.sp_collectionList {
    display: none;
}

/* テーブルの基本設定 */
.price-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
}

/* 列幅の指定 */
.custom-table td,
.custom-table th {
    border: 1px solid #ccc;
    padding: 8px;
    text-align: center;
    word-wrap: break-word;
}

/* 各列の幅を調整 */
.price-table .item-spec {
    width: 42%;
}

.price-table .unit {
    width: 13%;
}

.price-table .price {
    width: 18%;
}

.price-table .quantity {
    width: 12%;
}

.price-table .total {
    width: 15%;
}

/* 数量入力欄の調整 */
.price-table input.quantity {
    width: 50px;
    text-align: center;
    font-size: 14px;
    border: 1px solid #ccc;
    border-radius: 4px;
    padding: 3px;
}

/* ページ下部の固定表示と重ならないように余白を確保 */
body {
    padding-bottom: 60px;
    overflow-x: hidden;
}

/* 回収費セクションの要素 */
.collection-cost-section {
    display: flex;
}

.pc_quantity {
    width: 100% !important;
}

/* 回収費の値の要素 */
#p-collection-cost-value {
    font-size: 1.1em;
    color: #a50000;
    padding: 8px;
}

/* 運搬費フォームセクション */
.form-transcost-section {
    margin: 20px 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* 運搬費フォームセクションのlabel要素、回収費、運搬費、合計金額のヘッダー */
.form-transcost-section label,
#p-collection-cost-header,
#p-shipping-cost-header,
#p-total-cost-header {
    display: block;
    float: left;
    width: 30%;
    padding: 8px;
    font-size: 1.1em;
    text-align: right;
}

/* 運搬費フォームセクションのselect要素 */
.form-transcost-section select {
    padding: 8px;
    font-size: 16px;
    border-radius: 4px;
    border: 1px solid #ccc;
    box-sizing: border-box;
}

/* 運搬費セクションの要素 */
.shipping-cost-section {
    width: 100%;
    display: flex;
}

/* 運搬費の値の要素 */
#p-shipping-cost-value {
    font-size: 1.1em;
    color: #a50000;
    padding: 8px;
}

/* 合計金額セクションの要素 */
.total-cost-section {
    display: flex;
}

/* 合計金額の値の要素 */
#p-total-cost-value {
    font-size: 1.1em;
    color: #a50000;
    padding: 8px;
}

/* 固定表示エリアのスタイル */
#price-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 13%;
    background-color: #f8f9fa;
    border-top: 4px solid #ccc;
    padding: 10px;
    font-size: 1.4em;
    font-weight: bold;
    color: #a50000;
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
}

#price-footer div {
    margin: 5px 5px;
    display: flex;
    flex-direction: column;
    width: 25%;
}

#collection-total-value-footer,
#shipping-total-value-footer,
#grand-total-value-footer {
    display: inline-block;
    background-color: #ffffff;
    border: 2px solid #ccc;
    border-radius: 5px;
    text-align: center;
    box-sizing: border-box;
    margin-left: 5px;
}

/* 「＋」と「＝」の設定 */
span#\# {
    display: block;
    margin: 0 30px;
    color: #a50000;
}

@media not all and (min-width: 1024px) {
    .sp_collectionList {
        display: block;
        font-family: Arial, sans-serif;
        margin: 20px;
    }

    .pc_collectionList {
        display: none;
    }

    .category {
        margin-bottom: 10px;
        border-radius: 5px;
        overflow: hidden;
        margin-top: 0;
    }

    .price_category-header_txt {
        font-size: 16px;
    }

    .price_category-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        text-align: left;
        padding: 10px;
        border: none;
        width: 100%;
        cursor: pointer;
        background-color: #edf2f9;
        position: relative;
        color: black;
    }

    .category-header_txtBox{
        display: flex;
        flex-direction: column;
    }

    .category-subtotal{
        margin-top: 15px;
        font-size: 16px;
        color: #3a3acd;
    }


    .toggle-icon {
        position: absolute;
        right: 10px;
        /* 右端に配置 */
        width: 8%;
        /* ボタン幅の8% */
        height: 8%;
        /* ボタン高さの8% */
        min-width: 12px;
        /* 最小サイズ */
        min-height: 12px;
        /* 最小サイズ */
        display: flex;
        align-items: center;
        justify-content: center;
    }

    /* `+` アイコンの横線と縦線 */
    .toggle-icon::before,
    .toggle-icon::after {
        content: "";
        position: absolute;
        background-color: #007bff;
        /* 線の色 */
        transition: transform 0.3s ease;
    }

    /* 横線 */
    .toggle-icon::before {
        width: 12px;
        height: 2px;
    }

    /* 縦線 */
    .toggle-icon::after {
        height: 12px;
        width: 2px;
    }

    /* `open` クラスが付いたら「×」に変更 */
    .price_category-header.open .toggle-icon::after {
        transform: rotate(90deg);
    }

    .category-content {
        display: none;
        padding: 10px;
        background: #edf2f9;
    }

    .item_box {
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        margin-bottom: 10px;
        align-items: baseline;
        position: relative;
    }

    .item_box::after,
    .price_category-header::after {
        content: "";
        display: block;
        width: 140px;
        height: 0;
        border-bottom: 1.5px solid white;
        position: absolute;
        left: 50%;
        transform: translateX(-50%);
        bottom: 0;
    }

    .item_detail_box,
    .subtotalBox {
        width: 100%;
        padding: 3%;
    }

    .box_for_charge_calculation {
        width: 100%;
        justify-content: space-between;
        padding: 3%;
        display: flex;
        flex-direction: column;
    }

    p.item_unit_price,
    .collection_item_subtotal {
        color: #3a3acd;
        font-weight: bold;
    }

    .unit_price_span{
        color: black;
        font-weight: normal;
    }

    .item_quantity_box {
        width: 100%;
        text-align: right;
        position: relative;
        display: flex;
        flex-direction: row;
        height: 3rem;
        margin-top: 10px;
    }
    
    .suuryou{
        order: 0;
    }

    input[type="number"] {
        width: 30% !important;
        text-align: right;
        order: 2;
    }

    /** スピンボタン要素 **/
    .item_quantity_box .spinner {
        width: 10%;
        height: 100%;
        background: lightgray;
        cursor: pointer;
        user-select: none;
        display: block;
        text-align: center;
        font-size: 25px;
        line-height: 3rem;
    }

    /** 減算のスピンボタン要素 **/
    .item_quantity_box .spinner-down {
        order: 1;
    }

    /** 加算のスピンボタン要素 **/
    .item_quantity_box .spinner-up {
        order: 3;
    }

    .hr-dots {
        background-color: #f9f9f9;
        border: 0;
        height: 2px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .hr-dots::before {
        content: '•••';
        font-size: 1.25em;
        letter-spacing: .75em;
        opacity: .75;
    }

    /* 回収場所 */
    .form-transcost-item {
        display: flex;
        flex-direction: column;
    }

    .form-transcost-section select {
        width: 80%;
    }

    .form-transcost-section label,
    #p-collection-cost-header {
        text-align: left;
        width: 100%;
    }

    #p-shipping-cost-header,
    #p-total-cost-header {
        text-align: left;
        width: 50%;
    }

    /* 総合計金額を表示するヘッダー部分 */
    #price-footer{
        padding: 5px;
    }

    /* 回収費と合計（概算）の幅 */
   #price-footer .collection-cost-section-footer,
   #price-footer .total-cost-section-footer{
        width: 32%;
    }

    #price-footer .shipping-cost-section-footer{
        width: 25%;
    }

    #collection-total-header-footer,
    #shipping-total-header-footer,
    #grand-total-header-footer {
        font-size: 1.5rem;
    }

    .basic_math_symbols {
        /* width: 5%; */
        font-size: 1.4rem;
    }

    #collection-total-value-footer,
    #shipping-total-value-footer,
    #grand-total-value-footer {
        width: 90%;
        height: auto;
        font-size: 1.4rem;
    }

    span#\# {
        margin: 0 0 0 0;
        color: #a50000;
        font-weight: bold;
    }
}
#price-footer{
    visibility:hidden
}
/* ポップアップのスタイル */
  .popup {
    display: none; /* 最初は非表示 */
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    border: 2px solid #333;
    padding: 20px;
    z-index: 100;
    box-shadow: 0px 0px 10px rgba(0,0,0,0.3);
    flex-direction: column;
    min-width: 50%;
  }
  .popup_title{
    font-weight: bold;
    font-size: 2rem;
    border-bottom: solid 3px;
    margin-bottom: 15px;
  }
  .popup-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.3);
    z-index: 99;
  }
  .close-btn {
    margin-top: 10px;
    width: 30%;
    display: block;
    margin-left: auto;
  }

  /* 料金表　ツールチップ風 */
  .custom-tooltip_priceTable{
    position: absolute;
    background: rgba(0, 0, 0, 0.75);
    color: #fff;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    pointer-events: none;
    z-index: 1000;
    display: block;
    white-space: nowrap;
  }

  /* 料金表品目セルをホバーで下線を引くアニメーション */
.underline-hover {
  display: inline-block;
  position: relative;
  cursor: pointer;
}

/* 初期状態（線なし） */
.underline-hover::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 2px;
  background-color: #0078d4;
  transition: width 0.3s ease;
}

/*tdにhover_cellクラスが付いたら下線を伸ばす */
td.hover_cell .underline-hover::after {
  width: 100%;
}