﻿/* ■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■ Price ■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■ */
/* ■■■■■■■■ 価格計算用フォーム ■■■■■■■■ */

        #commission-form {
            height: 8vw;
            display: flex;
            flex-wrap: nowrap; /* 折り返しを許可 */
        /*    overflow-x: hidden; 横スクロールを許可 */
            align-items: center; /* 要素を中段揃えにする */
            justify-content: center; /* 中央揃えにする */
            font-size: 0.7vw;
        }
        .spinbox-group {
            display: flex;
            flex-direction: column; /* 縦に並べる */
            align-items: center; /* 要素を中段揃えにする */
        }
        .price-layout-top,
        .price-layout-middle,
        .price-layout-bottom {
            --price-control-width: clamp(96px, 5.5vw, 128px);
            --price-character-group-width: var(--price-control-width);
            --price-control-gap: clamp(10px, 0.55vw, 16px);
        }

        #commission-form .spinbox {
            display: flex;
            flex-direction: column;
            align-items: center;
            border: 1px solid #ffffff00;
            padding: 2px; /* パディングを追加 */
            border-radius: 0px;
            background-color: #5db6aa00;
            width: var(--price-control-width); /* 最小幅を設定 */
            
        }
        .spinbox label {
            margin-bottom: 5px;
            font-weight: bold;
            font-size: 0.7vw;    /* 価格計算機の項目の */
        }
        

        #totalPriceContainer {
            display: flex;
            align-items: center;
            font-size: clamp(10px, 1vw, 40px);
        }
        
        #totalPriceInteger {
            /* 整数部分のフォントサイズ */
           /* 16px - 24pxに制約 */  /* `clamp()`関数について    - 第1引数: 最小フォントサイズ    - 第2引数: 推奨フォントサイズ（デフォルトサイズ）    - 第3引数: 最大フォントサイズ*/ 
           margin-left: 0.5vw;
            color: #ff995f !important; /* オレンジ色 */
   
        }
        
        #totalPriceDecimal {
            /* 小数部分のフォントサイズ */
            font-size: clamp(11px, 0.8vw, 36px); /* 16px - 24pxに制約 */
            color: #ffc4444d; /* 薄いオレンジ色 */
            vertical-align: super; /* 少し上にずらす */
        }


        /*円表示*/

        #totalPriceYenContainer {
            display: flex;
            align-items: center;
            font-size: clamp(10px, 1vw, 40px);
        }
        
        #totalPriceYenInteger {
            /* 整数部分のフォントサイズ */
           /* 16px - 24pxに制約 */  /* `clamp()`関数について    - 第1引数: 最小フォントサイズ    - 第2引数: 推奨フォントサイズ（デフォルトサイズ）    - 第3引数: 最大フォントサイズ*/ 
           margin-left: 0.5vw;
            color: #ff995f !important; /* オレンジ色 */
   
        }
        
        #totalPriceYenDecimal {
            /* 小数部分のフォントサイズ */
            font-size: clamp(11px, 0.8vw, 36px); /* 16px - 24pxに制約 */
            color: #ffc4444d; /* 薄いオレンジ色 */
            vertical-align: super; /* 少し上にずらす */
        }





















        /* PRICE LEGACY FORMULA RULES - KEEP COMMENTED OUT.
           Old JP/EN formula row used spinbox/symbol/spacer columns.
           The current layout uses price-formula-* grid markup instead. */
        /*
        #commission-form-price {
            height: 5vw;
            display: flex;
            flex-wrap: nowrap;
            align-items: center;
            justify-content: center;
            font-size: 0.65vw;
        }
        #commission-form-price .spinbox {
            display: flex;
            flex-direction: column;
            align-items: center;
            border: 1px solid #ffffff00;
            padding: 2px;
            border-radius: 0px;
            background-color: #5db6aa00;
            width: var(--price-formula-value-width);
        }
        #commission-form-price .symbol {
            display: flex;
            flex-direction: column;
            align-items: center;
            border: 1px solid #09032500;
            padding: 2px;
            border-radius: 0px;
            background-color: #5db6aa00;
            width: var(--price-formula-symbol-width);
        }
        #commission-form-price .spacer {
            display: flex;
            flex-direction: column;
            align-items: center;
            border: 1px solid #09032500;
            padding: 2px;
            border-radius: 0px;
            background-color: #5db6aa00;
            width: var(--price-formula-spacer-width);
        }
        #commission-form-price .spinbox span,
        #commission-form-price .symbol span,
        #commission-form-price .spacer span {
            display: block;
            width: 100%;
            text-align: center;
        }
        */
        label {
            align-items: center; /* 要素を中段揃えにする */
            font-weight: bold;
        }

        /* ■■■■ Price 中段 ■■■■ */  
        #totalPriceContainer label{
            margin-left: 8vw;
        }

        #uniqueCopyButtonContainer button {
            margin-left: 2vw;
            margin-right: 2vw;
        }



        /* ■■■■ Price 下段 ■■■■ */
        .custom-price-gallery {
            display: flex;
            flex-wrap: nowrap;
            gap: clamp(2px, 0.35vw, 8px);
            justify-content: center;
            align-items: center;
            width: 100%;
            height: 30vh; /* 高さを指定します (必要に応じて調整してください) */
            align-self: center; /* 中段に配置 */
        }

        .custom-price-item {
            flex: 1 1 0;
            display: grid;
            justify-items: center;
            align-content: start;
            gap: clamp(4px, 0.35vw, 8px);
            text-align: center;
            min-width: 0;
            max-width: clamp(70px, 7.6vw, 132px);
            position: relative;
            box-sizing: border-box;
            padding: 0;
            border: none;
            border-radius: 0;
        }
        .custom-price-item::before {
            content: "";
            position: absolute;
            inset: -6px -8px -8px;
            background: linear-gradient(
                to top,
                rgba(142, 28, 46, 0.42) 0%,
                rgba(142, 28, 46, 0.22) 42%,
                rgba(142, 28, 46, 0.08) 72%,
                rgba(142, 28, 46, 0) 100%
            );
            opacity: 0;
            pointer-events: none;
            transition: opacity 0.18s ease;
            z-index: 0;
        }
        .custom-price-item span {
            display: block;
            width: 100%;
            margin: 0;
            font-size: clamp(0.72rem, 0.85vw, 1rem);
            line-height: 1.2;
            text-align: center;
            position: relative;
            z-index: 1;
            transition: color 0.18s ease, text-shadow 0.18s ease;
        }

        .custom-price-thumb {
            display: block;
            width: 100%;
            max-width: clamp(70px, 7vw, 124px);
            height: auto;
            margin-inline: auto;
            position: relative;
            z-index: 1;
            border: 1px solid transparent;
            border-radius: 12px;
            transition: opacity 0.3s ease, transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease, border-radius 0.18s ease;
            cursor: pointer;
        }

        .custom-price-item.is-highlighted::before {
            opacity: 1;
        }

        .custom-price-item.is-highlighted span {
            color: #ffd9bf;
            text-shadow: 0 0 14px rgba(255, 153, 95, 0.28);
        }

        .custom-price-item.is-highlighted .custom-price-thumb {
            border-color: rgba(255, 153, 95, 0.92);
            border-radius: 0;
            box-shadow: 0 0 0 2px rgba(255, 153, 95, 0.28), 0 14px 26px rgba(0, 0, 0, 0.26);
            transform: translateY(-1px) scale(1.02);
        }

        .price-full-size {
            position: fixed; /* 画面に対して固定位置に配置 */
            bottom: 25vh; /* 画面の下から25%の位置に開始 */
            left: 50%; /* 水平方向に中央揃え */
            transform: translateX(-50%); /* 水平方向の中央揃え補正 */
            width: auto; /* 画像の幅をビューポート幅の60%に設定、必要に応じて変更可能 */
            height: 60vh; /* 縦横比を維持 */
            z-index: 100; /* 前面に表示 */
            display: none; /* 初期状態では非表示にする必要あり */
            border-radius: 8px; /* 角を少し丸める */
             cursor: pointer; /* クリックできることを示すためにカーソルをポインターに */
         }

@media (min-width: 2560px) {
    .custom-price-gallery {
        gap: clamp(8px, 0.38vw, 14px);
    }

    .custom-price-item {
        max-width: 210px;
    }

    .custom-price-item span {
        font-size: clamp(0.9rem, 0.7vw, 1.18rem);
    }

    .custom-price-thumb {
        max-width: 200px;
    }
}

/* ---- Price bottom gallery: コンテナ幅に応じた調整（コンパネで中央が狭いケースも含む） ---- */
@supports (container-type: inline-size) {
    .section-b-bottom {
        container-type: inline-size;
    }

    .custom-price-item span {
        font-size: clamp(0.7em, 2cqw, 1em); /* 文字サイズは幅に応じて縮小（下限70%） */
    }

    .custom-price-thumb {
        width: min(10vw, 13cqw); /* 通常は現状維持、中央領域が狭い時だけ少し縮小 */
    }

    @container (max-width: 720px) {
        .custom-price-gallery {
            height: auto;
            flex-wrap: wrap;
            justify-content: center;
            align-items: flex-start;
            column-gap: 8px;
            row-gap: 12px;
            padding: 8px 0;
        }

        .custom-price-item {
            flex: 0 0 calc((100% - 24px) / 4); /* 4 columns (gap 8px * 3 = 24px) */
            max-width: calc((100% - 24px) / 4);
        }

        .custom-price-item span {
            line-height: 1.2;
            margin-bottom: 6px;
        }

        .custom-price-thumb {
            width: 100%;
            max-width: 100%;
        }
    }
}

/* ■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■ Note ■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■ */

/* ---- Price layout adjustments for option row ---- */

#content-price {
    overflow-x: hidden;
}

.price-layout-top {
    --price-formula-row-gap: clamp(2px, 0.15vw, 5px);
    --price-formula-line-height: 1.25;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    gap: 0.25vw;
    height: auto;
    padding-top: 0.35vw;
    padding-bottom: 0.3vw;
    overflow-x: hidden;
    overflow-y: visible;
}

.price-section-title {
    margin: 0.15vw 0 0.3vw;
    line-height: 1.1;
    white-space: nowrap;
    font-size: 0.95vw;
}

#commission-form,
#commission-form-price {
    flex: 0 1 auto;
    min-width: 0;
}

#commission-form {
    display: grid;
    grid-template-columns: var(--price-grid-template);
    grid-template-rows: repeat(3, auto);
    column-gap: var(--price-control-gap);
    row-gap: 0;
    align-items: start;
    justify-content: center;
    height: auto;
}

#commission-form .price-control--grid {
    grid-column: var(--price-grid-column);
    grid-row: var(--price-grid-row);
    align-self: start;
}

#commission-form .price-control-group-characters {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    width: var(--price-character-group-width);
    min-width: 0;
}

#commission-form .price-control {
    width: 100%;
    min-width: 0;
}

#commission-form .price-control select {
    width: 100%;
}

#commission-form-price {
    display: grid;
    grid-template-columns: var(--price-grid-template);
    column-gap: var(--price-control-gap);
    row-gap: 0;
    align-items: start;
    justify-content: center;
    height: auto;
    margin-top: clamp(4px, 0.25vw, 10px);
    font-size: clamp(11px, 0.65vw, 14px);
}

.price-formula-group {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    gap: var(--price-formula-row-gap);
    width: 100%;
    min-width: 0;
    white-space: nowrap;
    line-height: var(--price-formula-line-height);
}

.price-formula-group-line {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.12em;
    width: 100%;
    min-height: calc(1em * var(--price-formula-line-height));
}

.price-formula-prefix {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 0.75em;
    flex: 0 0 0.75em;
    text-align: center;
}

.price-formula-cell {
    position: relative;
    display: flex;
    align-items: baseline;
    justify-content: center;
    width: 100%;
    min-width: 0;
    white-space: nowrap;
    box-sizing: border-box;
    padding-top: calc((1em * var(--price-formula-line-height)) + var(--price-formula-row-gap));
}

.price-formula-operator {
    position: absolute;
    left: calc(var(--price-control-gap) * -0.5);
    top: calc(
        (1em * var(--price-formula-line-height))
        + var(--price-formula-row-gap)
        + ((1em * var(--price-formula-line-height)) / 2)
    );
    transform: translate(-50%, -50%);
    width: var(--price-control-gap);
    text-align: center;
    line-height: var(--price-formula-line-height);
    white-space: nowrap;
    pointer-events: none;
}

.price-formula-value {
    display: block;
    width: auto;
    text-align: center;
    line-height: var(--price-formula-line-height);
}

.price-formula-suffix {
    margin-left: 0.28em;
    white-space: nowrap;
}

.price-formula-cell.is-neutral .price-formula-operator,
.price-formula-cell.is-neutral .price-formula-value,
.price-formula-cell.is-neutral .price-formula-suffix {
    opacity: 0.38;
}

.price-layout-middle {
    width: auto;
    border: 1px solid #ddd;
    display: flex;
    justify-content: center;
    align-items: center;
    box-sizing: border-box;
    min-height: 3.1vw;
    padding: 0.25vw 0.2vw;
    margin-top: 0.5vw;
    margin-bottom: 0.5vw;
}

.commission-price-options {
    --price-option-label-size: clamp(11px, 0.64vw, 14px);
    --price-option-label-line-height: 1.15;
    --price-option-label-height: calc(var(--price-option-label-size) * var(--price-option-label-line-height));
    --price-option-row-gap: clamp(2px, 0.18vw, 5px);
    --price-option-select-height: clamp(28px, 1.85vw, 38px);
    display: flex;
    flex-wrap: nowrap;
    align-items: flex-start;
    justify-content: flex-end;
    gap: 0.55vw;
    width: auto;
    max-width: 100%;
    margin: 0.05vw 1vw 0 auto;
    padding: 0;
    border: none;
    background: transparent;
    box-sizing: border-box;
    align-self: flex-end;
}

.commission-price-options .price-control-title {
    width: auto;
    padding-top: calc(var(--price-option-label-height) + var(--price-option-row-gap));
    justify-content: flex-start;
}

.price-option-title-spacer {
    display: none;
}

.price-option-title {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    color: #d9f3dc;
    font-size: 0.72vw;
    font-weight: bold;
    white-space: nowrap;
    min-height: var(--price-option-select-height);
    padding-right: 0.1vw;
    line-height: 1;
}

.commission-price-options .price-control {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    gap: var(--price-option-row-gap);
    width: var(--price-control-width);
}

.commission-price-options .price-control label {
    display: flex;
    align-items: flex-end;
    min-height: var(--price-option-label-height);
    margin: 0;
    color: #eef9ef;
    font-size: var(--price-option-label-size);
    font-weight: bold;
    line-height: var(--price-option-label-line-height);
    text-align: left;
    white-space: nowrap;
}

.commission-price-options .price-control select {
    width: 100%;
    min-height: var(--price-option-select-height);
    border-color: rgba(118, 197, 154, 0.6);
    background-color: rgba(21, 44, 34, 0.92);
    color: #eef9ef;
    -webkit-text-fill-color: #eef9ef;
}

.commission-price-options .price-control select:hover,
.commission-price-options .price-control select:focus,
.commission-price-options .price-control select:active {
    background-color: rgba(29, 78, 58, 0.96);
    color: #eef9ef;
    -webkit-text-fill-color: #eef9ef;
    border-color: rgba(134, 224, 172, 0.95);
}

.commission-price-options .price-control select option {
    color: #eef9ef;
    background-color: #183325;
}

#totalPriceContainer,
#totalPriceYenContainer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.45vw;
    font-size: clamp(10px, 1vw, 40px);
    line-height: 1;
}

#totalPriceContainer label,
#totalPriceYenContainer label {
    margin-left: 8vw;
    margin-top: 0;
    margin-bottom: 0;
}

#totalPriceInteger,
#totalPriceYenInteger {
    margin-left: 0.5vw;
    color: #ff995f !important;
}

#totalPriceDecimal,
#totalPriceYenDecimal {
    font-size: clamp(11px, 0.8vw, 36px);
    color: #ffc4444d;
    vertical-align: super;
}

#totalPriceYenDecimal {
    display: none;
}

#uniqueCopyButtonContainer {
    display: flex;
    align-items: center;
    align-self: center;
}

#uniqueCopyButtonContainer button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: 2vw;
    margin-right: 2vw;
    line-height: 1.1;
}

.price-layout-bottom {
    border: none;
}

.price-layout-bottom .custom-price-gallery {
    border: none;
}

.price-layout-top #calculatedStyle {
    color: #ff995f;
}

.price-legacy-hidden {
    display: none !important;
}

.mobile-price-factor {
    display: none;
}
