/* * UVDTF Quote Stylesheet
 * Version: 2.3.1 (料金表示版)
 */

/* Noto Sans JPフォントの読み込み */
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+JP:wght@400;500;700&display=swap');

/* * フォームラッパー (#uvdtf-form-wrapper)
 * このID内部のスタイルをリセットし、WordPressテーマとの干渉を最大限防ぎます。
 */
#uvdtf-form-wrapper, 
#uvdtf-form-wrapper *, 
#uvdtf-form-wrapper ::before, 
#uvdtf-form-wrapper ::after {
    box-sizing: border-box;
    border-width: 0;
    border-style: solid;
    border-color: #e5e7eb;
}

#uvdtf-form-wrapper {
    font-family: 'Noto Sans JP', sans-serif !important;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    color: #1f2937;
    width: 100%; 
    overflow-x: hidden;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    min-height: 100vh; 
    padding: 3rem 0;
}

/* 基本的な要素のリセット */
#uvdtf-form-wrapper h1, 
#uvdtf-form-wrapper h2, 
#uvdtf-form-wrapper h3, 
#uvdtf-form-wrapper p, 
#uvdtf-form-wrapper label, 
#uvdtf-form-wrapper button, 
#uvdtf-form-wrapper input, 
#uvdtf-form-wrapper select, 
#uvdtf-form-wrapper div, 
#uvdtf-form-wrapper span {
    margin: 0;
    padding: 0;
    font-size: 100%;
    font: inherit;
    font-family: inherit;
    vertical-align: baseline;
    color: inherit;
    background: transparent;
    box-shadow: none;
    border-radius: 0;
    text-shadow: none;
    line-height: inherit;
    font-weight: 400;
}

/* フォーム要素のOSデフォルトスタイルを無効化 */
#uvdtf-form-wrapper input, 
#uvdtf-form-wrapper select, 
#uvdtf-form-wrapper button {
  -webkit-appearance: none; 
  -moz-appearance: none; 
  appearance: none;
}

/* ラジオボタンとチェックボックスはデフォルトスタイルを使用 */
#uvdtf-form-wrapper input[type="radio"], 
#uvdtf-form-wrapper input[type="checkbox"] {
  -webkit-appearance: auto; 
  -moz-appearance: auto; 
  appearance: auto;
}

#uvdtf-form-wrapper button, 
#uvdtf-form-wrapper [type='button'] {
    -webkit-appearance: button;
    background-color: transparent;
    background-image: none;
    cursor: pointer;
}

#uvdtf-form-wrapper hr { 
    border-top-width: 1px; 
    border-color: #e5e7eb; 
    margin: 1.5rem 0; 
}

#uvdtf-form-wrapper img, 
#uvdtf-form-wrapper svg { 
    display: block; 
    max-width: 100%; 
}

/* ユーティリティ */
#uvdtf-form-wrapper .focus-ring:focus { 
    box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.5); 
    outline: none; 
}

#uvdtf-form-wrapper .drop-area.highlight { 
    border-color: #3b82f6 !important; 
    background-color: #eff6ff !important; 
}

#uvdtf-form-wrapper .modal-overlay { 
    transition: opacity 0.3s ease; 
}

#uvdtf-form-wrapper .error-message { 
    color: #ef4444; 
    font-size: 0.875rem; 
    margin-top: 0.25rem; 
}

/* バリデーションエラー時のスタイル */
#uvdtf-form-wrapper .invalid-field,
#uvdtf-form-wrapper .input-with-unit.invalid-field {
    border-color: #ef4444 !important;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.5) !important;
    transition: box-shadow 0.3s ease-in-out;
}

/* プレビュー背景 */
.chequered-bg {
    background-image:
        linear-gradient(45deg, #e0e0e0 25%, transparent 25%),
        linear-gradient(-45deg, #e0e0e0 25%, transparent 25%),
        linear-gradient(45deg, transparent 75%, #e0e0e0 75%),
        linear-gradient(-45deg, transparent 75%, #e0e0e0 75%);
    background-size: 20px 20px;
    background-position: 0 0, 0 10px, 10px -10px, -10px 0px;
    background-color: white;
}

.black-bg {
    background-color: #000;
    background-image: none;
}

#uvdtf-form-wrapper .bg-toggle-btn {
    font-size: 0.875rem;
    padding: 0.5rem 1rem;
    border: 2px solid transparent;
    border-radius: 0.375rem;
    cursor: pointer;
    margin: 0 0.25rem;
    font-weight: 600;
    transition: all 0.2s ease-in-out;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

#uvdtf-form-wrapper .bg-toggle-btn.chequered-btn {
    background-image: linear-gradient(45deg, #ccc 25%, transparent 25%), linear-gradient(-45deg, #ccc 25%, transparent 25%), linear-gradient(45deg, transparent 75%, #ccc 75%), linear-gradient(-45deg, transparent 75%, #ccc 75%);
    background-size: 12px 12px;
    background-position: 0 0, 0 6px, 6px -6px, -6px 0;
    background-color: white;
    color: #374151;
    border: 1px solid #d1d5db;
}

#uvdtf-form-wrapper .bg-toggle-btn.black-btn {
    background-color: #1f2937;
    color: white;
}

#uvdtf-form-wrapper .bg-toggle-btn.custom-color-btn {
    background-image: linear-gradient(to right, #ef4444, #f97316, #eab308, #22c55e, #3b82f6, #8b5cf6);
    color: white;
    border: 1px solid transparent;
}

#uvdtf-form-wrapper .bg-toggle-btn.active {
    border-color: #4f46e5;
    box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.5);
}

#uvdtf-form-wrapper .section-heading {
    display: block;
    font-size: 1.125rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 0.5rem;
}

/* 単位付き入力欄 */
#uvdtf-form-wrapper .input-with-unit {
    display: flex;
    align-items: center;
    border: 1px solid #d1d5db;
    border-radius: 0.375rem;
    overflow: hidden; 
    transition: box-shadow 0.2s ease-in-out, border-color 0.2s ease-in-out;
}

#uvdtf-form-wrapper .input-with-unit:focus-within {
    border-color: #4f46e5;
    box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.5);
}

#uvdtf-form-wrapper .input-with-unit input {
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    flex-grow: 1;
    min-width: 0;
    width: 100%;
    padding: 0.5rem 1rem;
    background-color: transparent;
}

/* 数値入力のスピンボタン非表示 */
#uvdtf-form-wrapper .input-with-unit input[type=number]::-webkit-inner-spin-button, 
#uvdtf-form-wrapper .input-with-unit input[type=number]::-webkit-outer-spin-button { 
    -webkit-appearance: none; 
    margin: 0; 
}
#uvdtf-form-wrapper .input-with-unit input[type=number] {
    -moz-appearance: textfield;
}

#uvdtf-form-wrapper .input-with-unit .unit-label {
    background-color: #f3f4f6;
    padding: 0.5rem 1rem;
    color: #4b5563;
    font-size: 0.875rem;
    line-height: 1.25rem;
    white-space: nowrap;
    border-left: 1px solid #d1d5db;
}

/* 入力欄の右寄せ */
#uvdtf-form-wrapper .quantity-input,
#uvdtf-form-wrapper .dimension-input {
    text-align: right;
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
    #uvdtf-form-wrapper {
         min-height: auto;
         align-items: flex-start;
         padding: 0.5rem 0;
    }
    #uvdtf-form-wrapper > div:first-child {
        margin: 0.5rem auto !important;
        max-width: 95% !important;
        border-radius: 0.5rem !important;
    }
    #uvdtf-form-wrapper > div:first-child > div:first-child {
        padding: 1.5rem !important; /* ヘッダー */
    }
    #uvdtf-form-wrapper > div:first-child > div:nth-child(3) {
        padding: 1.5rem !important; /* フォーム本体 */
    }
    #uvdtf-form-wrapper h1 {
        font-size: 1.5rem !important;
        line-height: 1.2 !important;
    }
    #uvdtf-form-wrapper p {
        font-size: 0.875rem;
    }
    
    .size-input-grid {
         grid-template-columns: 1fr auto 1fr !important;
    }
    
    #uvdtf-form-wrapper .preview-bg-controls > div {
         display: flex;
         flex-direction: column;
         gap: 0.5rem;
         margin-top: 0.5rem;
    }
    #uvdtf-form-wrapper .bg-toggle-btn {
        margin: 0;
        width: 100%;
    }
    
    /* モーダル */
    #contactModal > div {
        top: 2rem !important;
        max-width: 90% !important;
    }

    /* モバイル時のプログレスバー調整 (v2.3.0) */
    @media (max-width: 768px) {
        #uvdtf-form-wrapper #wizard-progress-bar {
            padding: 1rem 0.5rem;
            position: relative; /* 疑似要素の基準 */
        }
        /* 線の位置調整 */
        #uvdtf-form-wrapper #wizard-progress-bar::before {
            top: 2.25rem; 
            left: 8%; /* モバイル用に線のマージン調整 */
            right: 8%;
        }
        #uvdtf-form-wrapper .wizard-progress-dot {
            width: 2rem; /* 32px */
            height: 2rem; /* 32px */
            font-size: 0.875rem;
            border-width: 3px;
        }
        #uvdtf-form-wrapper .wizard-progress-label {
            font-size: 0.65rem; /* 10px or 11px */
            line-height: 1.3;
        }
    }
}


/* ★★★ ここからウィザード用CSS (v2.3.0) ★★★ */

/* ステップの表示/非表示 */
#uvdtf-form-wrapper .wizard-step {
    display: none; /* デフォルトですべて非表示 */
    animation: fadeIn 0.5s ease-in-out;
}
#uvdtf-form-wrapper .wizard-step.active {
    display: block; /* アクティブなステップのみ表示 */
}

/* ステップ内のコンテンツ切り替え (データタイプ別) */
#uvdtf-form-wrapper .wizard-step-content {
    display: none; /* デフォルトで非表示 */
}
#uvdtf-form-wrapper .wizard-step-content.active {
    display: block; /* アクティブなコンテンツのみ表示 */
    animation: fadeIn 0.3s ease-in-out;
}

/* 新しいウィザードプログレスバー (v2.3.0) */
#uvdtf-form-wrapper #wizard-progress-bar {
    display: flex;
    justify-content: space-between;
    align-items: flex-start; /* ラベルが複数行になっても上揃え */
    padding: 1.5rem 1rem; /* バー全体の余白 */
    border-bottom: 1px solid #e5e7eb;
    background-color: #f9fafb;
    position: relative;
    overflow: hidden; /* 線の描画のため */
}

/* 灰色の線 (背景) */
#uvdtf-form-wrapper #wizard-progress-bar::before {
    content: '';
    position: absolute;
    top: 2.75rem; /* ドットの中心 (40px / 2 + padding 1.5rem - 2px) */
    left: 8%; /* 最初のドットと最後のドットのマージンに合わせる */
    right: 8%;
    height: 4px;
    background-color: #e5e7eb; /* 未完了の線の色 */
    z-index: 1;
}

#uvdtf-form-wrapper .wizard-progress-step {
    position: relative;
    z-index: 2; /* 線の上に表示 */
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 16.66%; /* 6ステップ */
    text-align: center;
    font-size: 0.75rem; /* 12px */
    color: #6b7280; /* 未完了のテキスト色 */
    font-weight: 500;
}

#uvdtf-form-wrapper .wizard-progress-dot {
    width: 2.5rem; /* 40px */
    height: 2.5rem; /* 40px */
    border-radius: 50%;
    background-color: #fff; /* 未完了の円の背景 */
    border: 4px solid #e5e7eb; /* 未完了の円の枠線 */
    color: #6b7280; /* 未完了の数字の色 */
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.5rem;
    transition: all 0.4s ease;
    font-size: 1rem;
    font-weight: 600;
}

#uvdtf-form-wrapper .wizard-progress-label {
    line-height: 1.4;
    word-break: keep-all; 
    overflow-wrap: break-word;
}

/* 完了 (Completed) スタイル */
#uvdtf-form-wrapper .wizard-progress-step.completed .wizard-progress-dot {
    background-color: #16a34a; /* 完了の円の背景 (緑) */
    border-color: #16a34a; /* 完了の円の枠線 (緑) */
    color: #fff; /* 完了の数字 (白) */
}
#uvdtf-form-wrapper .wizard-progress-step.completed .wizard-progress-label {
    color: #1f2937; /* 完了のテキスト色 (濃いグレー) */
}

/* 現在 (Active) スタイル */
#uvdtf-form-wrapper .wizard-progress-step.active .wizard-progress-dot {
    background-color: #fff;
    border-color: #4f46e5; /* 現在の円の枠線 (紫) */
    color: #4f46e5; /* 現在の数字 (紫) */
    transform: scale(1.1);
}
#uvdtf-form-wrapper .wizard-progress-step.active .wizard-progress-label {
    color: #4f46e5; /* 現在のテキスト色 (紫) */
    font-weight: 700;
}
/* ★ END: 新しいウィザードプログレスバー (v2.3.0) */


/* ナビゲーションボタン */
#uvdtf-form-wrapper #wizard-navigation button {
    transition: background-color 0.2s ease, visibility 0.2s ease;
}
#uvdtf-form-wrapper #wizard-navigation button:hover {
    opacity: 0.9;
}

/* ステップ5 (追加・確認画面) のサマリー表示 */
#uvdtf-form-wrapper #wizard-summary-items .summary-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
    border-bottom: 1px solid #f3f4f6;
}
#uvdtf-form-wrapper #wizard-summary-items .summary-item:last-child {
    border-bottom: none;
}
#uvdtf-form-wrapper .summary-item-details {
    color: #1f2937;
    font-weight: 500;
}
#uvdtf-form-wrapper .summary-item-details span {
    font-size: 0.75rem;
    color: #6b7280;
    font-weight: 400;
    margin-left: 0.5rem;
}
#uvdtf-form-wrapper .summary-item-remove-btn {
    font-size: 0.75rem;
    color: #ef4444;
    font-weight: 600;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
}
#uvdtf-form-wrapper .summary-item-remove-btn:hover {
    background-color: #fef2f2;
}


/* フェードインアニメーション */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ★★★ 追加: ステップごと料金表示 (v2.3.1) ★★★ */
#uvdtf-form-wrapper .wizard-current-total {
    margin-top: 2rem; /* 上のコンテンツとの間隔 */
    padding-top: 1.5rem; /* 上の線からの間隔 */
    border-top: 1px dashed #d1d5db; /* 区切り線 */
    text-align: right; /* 右寄せ */
    display: none; /* JSで計算完了後に .active をトグル */
    animation: fadeIn 0.3s ease;
}

#uvdtf-form-wrapper .wizard-current-total.active {
    display: block;
}

#uvdtf-form-wrapper .wizard-current-total span {
    font-size: 1rem; /* 16px */
    color: #374151; /* 濃いグレー */
    font-weight: 600;
    vertical-align: middle;
}

#uvdtf-form-wrapper .wizard-current-total strong {
    font-size: 1.875rem; /* 30px */
    font-weight: 700;
    color: #4f46e5; /* 紫 */
    margin-left: 0.75rem;
    vertical-align: middle;
}