/* IT導入補助金2025 料金シミュレーター WordPress版 スタイル */

.it-calculator-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    /* font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif; */
    /* background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%); */
    border-radius: 16px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
}

.it-calculator-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #3b82f6, #06b6d4, #10b981);
}

/* ヘッダー */
.calculator-header {
    text-align: center;
    /* margin-bottom: 32px; */
    position: relative;
}

.header-icon {
    font-size: 48px;
    margin-bottom: 16px;
    display: block;
}

.calculator-title {
    font-size: 28px;
    font-weight: 700;
    color: #1f2937;
    margin: 0 0 16px 0;
    line-height: 1.2;
}

.section-description {
    color: #6b7280;
    margin-bottom: 16px;
    font-size: 14px;
    line-height: 1.5;
}

.calculator-subtitle {
    display: inline-block;
    padding: 8px 20px;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 500;
    margin: 0;
}
.calculator-subtitle-normal {
    border: 1px solid #5bc400;
    background: linear-gradient(135deg, #defdcd, #defdcd);
    color: #3d8100;
}.calculator-subtitle-invoice {
    border: 1px solid #e7b75f;
    background: linear-gradient(135deg, #fff9ae, #fff9ae);
    color: #e1a230;
}


/* セクション */
.section {
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    padding: 24px;
    margin-bottom: 24px;
    border: 1px solid #f1f5f9;
    transition: all 0.3s ease;
}

.section:hover {
    box-shadow: 0 8px 25px -5px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.section-header {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
    padding-bottom: 12px;
    border-bottom: 2px solid #f1f5f9;
}
.section-header-wrap1 {
    display: flex;
    align-items: flex-start;
}
.section-icon {
    font-size: 24px;
    margin-right: 12px;
}

.section h3 {
    font-size: 20px;
    font-weight: 600;
    color: #1f2937;
    margin: 0;
}

.invoice-only-badge {
    background: #dbeafe;
    color: #1e40af;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    margin-left: 8px;
}
@media screen and (max-width: 600px) {
    .section-header {
        display: block;
    }
    .invoice-only-badge {
        width: fit-content;
        display: block;
        margin-top: 10px;
    }
}

/* フォームグリッド */
.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
}

@media (max-width: 768px) {
    .form-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }
}

.form-group h3 {
    font-size: 18px;
    font-weight: 500;
    color: #374151;
    margin-bottom: 16px;
    padding-left: 4px;
}

/* オプションリスト */
.options-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.option-label {
    display: flex;
    align-items: center;
    padding: 16px;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    background: #fafafa;
}

.option-label:hover {
    background: #f0f9ff;
    border-color: #3b82f6;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.15);
}

.option-label input[type="radio"] {
    width: 20px;
    height: 20px;
    margin-right: 16px;
    cursor: pointer;
    flex-shrink: 0;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    border: 2px solid #d1d5db;
    border-radius: 50%;
    background: white;
    position: relative;
    transition: all 0.2s ease;
}

.option-label input[type="radio"]:hover {
    border-color: #3b82f6;
}

.option-label input[type="radio"]:checked {
    border-color: #3b82f6;
    background: white;
}

.option-label input[type="radio"]:checked::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #3b82f6;
    transition: all 0.2s ease;
}

.option-label input[type="radio"]:checked + .option-content {
    color: #1e40af;
}

.option-label input[type="radio"]:checked ~ .option-check {
    opacity: 1;
    transform: scale(1);
}

.option-label input[type="radio"]:checked {
    & ~ * {
        color: #1e40af;
    }
}

.option-label:has(input[type="radio"]:checked) {
    background: linear-gradient(135deg, #dbeafe, #bfdbfe);
    border-color: #3b82f6;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.25);
}

.option-content {
    flex: 1;
}

.option-name {
    font-weight: 500;
    color: #1f2937;
    margin-bottom: 4px;
    font-size: 15px;
    line-height: 1.4;
}

.option-price {
    font-size: 14px;
    color: #6b7280;
    font-weight: 400;
}

.option-rate {
    font-size: 14px;
    color: #0891b2;
    font-weight: 500;
}


/* ハードウェアグリッド */
.hardware-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 16px;
}

.hardware-option {
    display: flex;
    align-items: center;
    padding: 8px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    background: #fafafa;
}

.hardware-option:hover {
    background: #f0f9ff;
    border-color: #3b82f6;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.15);
}

.hardware-checkbox {
    width: 20px;
    height: 20px;
    margin-right: 12px;
    accent-color: #3b82f6;
    cursor: pointer;
    flex-shrink: 0;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    border: 2px solid #d1d5db;
    border-radius: 4px;
    background: white;
    position: relative;
    transition: all 0.2s ease;
}

.hardware-checkbox:hover {
    border-color: #3b82f6;
}

.hardware-checkbox:checked {
    border-color: #3b82f6;
    background: #3b82f6;
}

.hardware-checkbox:checked::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 12px;
    font-weight: bold;
    transition: all 0.2s ease;
}

.hardware-option input[type="checkbox"]:not(.hardware-checkbox) {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.hardware-option:has(input[type="checkbox"]:checked) {
    background: linear-gradient(135deg, #dbeafe, #bfdbfe);
    border-color: #3b82f6;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.25);
}

.hardware-content {
    flex: 1;
}

.hardware-name {
    font-weight: 500;
    color: #1f2937;
    font-size: 14px;
    margin-bottom: 4px;
}

.hardware-price {
    font-size: 13px;
    color: #6b7280;
    margin-bottom: 2px;
}

.hardware-rate {
    font-size: 13px;
    color: #0891b2;
    font-weight: 500;
}

/* ハードウェアセクション分割 */
.hardware-individual,
.hardware-pos-set {
    margin-bottom: 15px;
}

.hardware-section-title {
    font-size: 16px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 16px;
    padding-left: 4px;
    border-left: 4px solid #3b82f6;
    padding-left: 12px;
}

/* POS機器セット - 段階式UI */
.pos-enable-section {
    margin-bottom: 24px;
}

.pos-enable-option {
    display: flex;
    align-items: center;
    padding: 20px;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    background: #fafafa;
}

.pos-enable-option:hover {
    background: #f0f9ff;
    border-color: #3b82f6;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.15);
}

.pos-enable-option:has(.pos-enable-checkbox:checked) {
    background: linear-gradient(135deg, #dbeafe, #bfdbfe);
    border-color: #3b82f6;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.25);
}

.pos-enable-checkbox {
    width: 20px;
    height: 20px;
    margin-right: 16px;
    accent-color: #3b82f6;
    cursor: pointer;
    flex-shrink: 0;
}

.pos-enable-content {
    flex: 1;
}

.pos-enable-name {
    font-weight: 600;
    color: #1f2937;
    font-size: 16px;
    margin-bottom: 4px;
}

.pos-enable-description {
    font-size: 14px;
    color: #6b7280;
}

/* POS有効化画像 */
.pos-enable-image {
    width: 23.5%;
    max-width: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: 16px;
    margin-right: 12px;
    flex-shrink: 0;
}

.pos-enable-img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 4px;
}

/* POS構成選択セクション */
.pos-combo-section {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 20px;
    margin-top: 16px;
}

.pos-combo-title {
    font-size: 16px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 16px;
    text-align: center;
}

.pos-combo-options {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}

.pos-combo-option {
    display: flex;
    align-items: center;
    padding: 16px;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    background: white;
}

.pos-combo-option input[type="radio"]:hover {
    border-color: #10b981;
}

.pos-combo-option:hover {
    background: #f0f9ff;
    border-color: #10b981;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.15);
    background: linear-gradient(135deg, #ecfdf5, #d1fae5);
}

.pos-combo-option:has(.pos-combo-radio:checked) {
    background: linear-gradient(135deg, #ecfdf5, #d1fae5);
    border-color: #10b981;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.25);
}

.pos-combo-radio {
    width: 20px;
    height: 20px;
    margin-right: 16px;
    cursor: pointer;
    flex-shrink: 0;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    border: 2px solid #d1d5db;
    border-radius: 50%;
    background: white;
    position: relative;
    transition: all 0.2s ease;
}

.pos-combo-radio:hover {
    /* border-color: #10b981; */
}

.pos-combo-radio:checked {
    border-color: #10b981 !important;
    background: white;
    accent-color: #15a57d;
}

.pos-combo-radio:checked::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #10b981 !important;
    transition: all 0.2s ease;
}

.pos-combo-content {
    flex: 1;
}

.pos-combo-name {
    font-weight: 500;
    color: #1f2937;
    font-size: 15px;
    margin-bottom: 4px;
}

.pos-combo-price {
    font-size: 14px;
    color: #6b7280;
    margin-bottom: 2px;
}

.pos-combo-rate {
    font-size: 13px;
    color: #0891b2;
    font-weight: 500;
}

/* コンボ画像（2つ並べる場合） */
.hardware-image-combo {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.hardware-img-small {
    max-width: 100%;
    max-height: 28px;
}

/* エラーメッセージ */
.pos-combo-error {
    color: #dc2626;
    font-size: 12px;
    margin-top: 8px;
    text-align: center;
    font-weight: 500;
}

.hardware-image {
    width: 23.5%;
    max-width: 100px;
    height: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: 12px;
    flex-shrink: 0;
}

.hardware-img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 4px;
}

/* 計算ボタン */
.calculate-section {
    text-align: center;
    margin: 32px 0;
}

.calculate-button {
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    color: white;
    border: none;
    padding: 16px 48px;
    border-radius: 12px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    min-width: 200px;
    box-shadow: 0 4px 14px 0 rgba(59, 130, 246, 0.4);
}

.calculate-button:hover {
    background: linear-gradient(135deg, #2563eb, #1e40af);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px 0 rgba(59, 130, 246, 0.5);
}
/* タブナビゲーション */
.tab-navigation {
    display: flex;
    border-bottom: 1px solid #e5e7eb;
    margin-bottom: 24px;
    background: transparent;
    padding: 0;
    border-radius: 0;
    box-shadow: none;
}

.tab-button {
    width: 50%;
    padding: 12px 24px;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    color: #6b7280;
    transition: all 0.3s ease;
    /* margin-right: 32px; */
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0;
    position: relative;
}

.tab-button:last-child {
    margin-right: 0;
}

.tab-button:hover {
    color: #374151;
    border-bottom-color: #d1d5db;
}

.tab-button.active {
    color: #3b82f6;
    border-bottom-color: #3b82f6;
}

/* タブコンテンツ */
.tab-content {
    background: transparent;
}

.tab-pane {
    width: 100%;
    padding: 0;
}

/* 警告メッセージ */
.eligibility-warning {
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-left: 4px solid #ef4444;
    color: #dc2626;
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    font-size: 14px;
}

.warning-icon {
    margin-right: 8px;
    font-size: 16px;
}

/* フレーム説明 */
.frame-notes {
    background: #f9fafb;
    padding: 12px 16px;
    border-radius: 8px;
    margin-top: 16px;
    font-size: 12px;
    color: #6b7280;
}

.frame-notes p {
    margin: 4px 0;
}



.calculate-button:active {
    transform: translateY(0);
}

.calculate-button.loading {
    pointer-events: none;
}

.button-icon {
    margin-right: 8px;
}

.button-loading {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #6b7280, #4b5563);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.calculate-button.loading .button-loading {
    opacity: 1;
}

.calculate-button.loading .button-text,
.calculate-button.loading .button-icon {
    opacity: 0;
}

.spinner {
    width: 20px;
    height: 20px;
    border: 2px solid #ffffff40;
    border-top: 2px solid #ffffff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: 8px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 結果セクション */
.results-section {
    animation: slideIn 0.5s ease-out;
}

.section-header h3 {
    font-size: 2rem;
    font-weight: bold;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.results-table-container {
    margin-bottom: 24px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: 12px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    position: relative;
}

/* .results-table-container::after {
    content: '← スクロールできます →';
    position: absolute;
    bottom: -20px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 11px;
    color: #9ca3af;
    display: none;
} */

/* スクロール可能インジケーター */
.scroll-indicator {
    position: absolute;
    bottom: 8px;
    left: 50%;
    transform: translateX(-50%);
    background: #7a7a7a;
    color: white;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 500;
    animation: pulseGlow 2s infinite;
    z-index: 10;
    pointer-events: none;
    display: none;
}

@keyframes pulseGlow {
    0%, 100% {
        opacity: 0.7;
        transform: translateX(-50%) scale(1);
    }
    50% {
        opacity: 1;
        transform: translateX(-50%) scale(1.05);
    }
}

/* スクロールバーのスタイリング */
.results-table-container::-webkit-scrollbar {
    height: 8px;
}

.results-table-container::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 4px;
}

.results-table-container::-webkit-scrollbar-thumb {
    background: linear-gradient(90deg, #3b82f6, #1d4ed8);
    border-radius: 4px;
}

.results-table-container::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(90deg, #2563eb, #1e40af);
}

.results-table {
    width: 100%;
    min-width: 600px;
    border-collapse: collapse;
    background: white;
    border-radius: 12px;
    overflow: hidden;
}

.results-table th {
    background: linear-gradient(135deg, #f8fafc, #f1f5f9);
    padding: 16px;
    text-align: left;
    font-weight: 600;
    color: #374151;
    border-bottom: 2px solid #e5e7eb;
    font-size: 14px;
    white-space: nowrap;
    min-width: 120px;
}

.results-table td {
    padding: 16px;
    border-bottom: 1px solid #f1f5f9;
    color: #1f2937;
    font-size: 14px;
    line-height: 1.5;
    white-space: nowrap;
}

.results-table tr:hover {
    background: #f8fafc;
}

.results-table tr:last-child td {
    border-bottom: none;
}

.results-table .price {
    text-align: right;
    color: #1f2937;
    font-weight: 500;
}

.results-table .subsidy {
    text-align: right;
    color: #059669;
    font-weight: 600;
}

.results-table .self-payment {
    text-align: right;
    color: #cb2f7e;
    font-weight: 600;
}

.results-table .total-row {
    background: linear-gradient(135deg, #f0f9ff, #e0f2fe);
    font-weight: 600;
}

.results-table .total-row td {
    border-top: 2px solid #3b82f6;
    font-size: 16px;
}

/* サマリーカード */
.summary-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-top: 24px;
}

.summary-card {
    padding: 24px;
    border-radius: 12px;
    text-align: center;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.summary-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
}

.summary-card.total-cost {
    background: linear-gradient(135deg, #f9fafb, #f3f4f6);
}

.summary-card.total-cost::before {
    background: linear-gradient(90deg, #6b7280, #4b5563);
}

.summary-card.subsidy-amount {
    background: linear-gradient(135deg, #ecfdf5, #d1fae5);
}

.summary-card.subsidy-amount::before {
    background: linear-gradient(90deg, #10b981, #059669);
}

.summary-card.self-payment {
    background: linear-gradient(135deg, #fff9ed, #ffe4f2);
}

.summary-card.self-payment::before {
    background: linear-gradient(90deg, #f573b5, #cb2f7e);
}

.card-label {
    font-size: 14px;
    color: #6b7280;
    margin-bottom: 8px;
    font-weight: 500;
}

.card-value {
    font-size: 24px;
    font-weight: 700;
    line-height: 1.2;
}

.total-cost .card-value {
    color: #1f2937;
}

.subsidy-amount .card-value {
    color: #059669;
}

.self-payment .card-value {
    color: #cb2f7e;
}

/* フッター */
.calculator-footer {
    text-align: center;
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid #e5e7eb;
    font-size: 14px;
    color: #6b7280;
}

.calculator-footer ul li {
    text-align: left;
    font-size: 1.4rem!important;
}

/* エラーメッセージ */
.error-message {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #dc2626;
    padding: 12px 16px;
    border-radius: 8px;
    margin: 16px 0;
    font-size: 14px;
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
    .it-calculator-container {
        padding: 16px 10px;
        margin: 10px 0;
        border-radius: 12px;
    }
    
    .calculator-title {
        font-size: 24px;
    }
    
    .section {
        padding: 20px 10px;
    }
    
    .hardware-grid {
        grid-template-columns: 1fr;
    }

    .results-table-container {
        margin-left: -10px;
        margin-right: -10px;
        padding: 0 10px;
        border-radius: 0;
    }
    
    .scroll-indicator {
        display: block;
    }
    
    .results-table {
        min-width: 600px;
        font-size: 12px;
    }
    
    .results-table th,
    .results-table td {
        padding: 12px 8px;
    }

    .results-table th:first-child {
        min-width: 160px;
        padding-left: 14px;
    }
    
    .results-table th:not(:first-child) {
        min-width: 130px;
    }

    .results-table th,
    .results-table td {
        padding: 14px 12px;
        font-size: 13px;
    }
    
    .results-table th:first-child {
        min-width: 180px;
        padding-left: 16px;
    }
    
    .results-table th:not(:first-child) {
        min-width: 140px;
        text-align: center;
    }
    
    .results-table td:not(:first-child) {
        text-align: right;
    }
    
    .summary-cards {
        grid-template-columns: 1fr;
    }
    
    .tab-button {
        width: 50%;
        font-size: 1.6rem;
        padding: 10px 0px;
        margin-right: 0px;
        letter-spacing: .05rem;
    }
    
    .tab-navigation {
        margin-bottom: 20px;
    }
    
    .card-value {
        font-size: 20px;
    }
    
    .calculate-button {
        width: 100%;
        padding: 16px 24px;
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .header-icon {
        font-size: 36px;
    }

    .section-header h3 {
        font-size: 1.4rem;
    }

    .section-header-wrap1 {
        align-items: center;
    }

    .calculator-title {
        font-size: 20px;
    }
    
    .calculator-subtitle {
        font-size: 12px;
        padding: 6px 16px;
    }
    
    .option-label,
    .hardware-option {
        padding: 12px;
    }
    
    .option-name,
    .hardware-name {
        font-size: 14px;
    }
    
    .results-table-container {
        margin-left: -10px;
        margin-right: -10px;
        padding: 0 10px;
        border-radius: 0;
    }
    
    .results-table th,
    .results-table td {
        padding: 8px 6px;
        font-size: 14px;
    }
    .tab-button {
        font-size: 1.4rem;
    }
}

/* 追加のCSS（動的に追加）
jQuery(document).ready(function($) {