@charset "UTF-8";

/**
 * Simulation Form - 見積もりシミュレーションフォーム
 */

/* ========================================
   1. セクション全体
   ======================================== */
.simulation-section {
    background: linear-gradient(180deg, #f8fafc 0%, #ffffff 100%);
    padding: 80px 0;
    position: relative;
    overflow: hidden;
}

.simulation-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #357CBD 0%, #4A90D9 50%, #357CBD 100%);
}

.simulation-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 40px;
}

.simulation-section__title {
    font-size: 36px;
    font-weight: 700;
    text-align: center;
    color: #333;
    margin-bottom: 16px;
    line-height: 1.4;
}

.simulation-section__subtitle {
    font-size: 16px;
    color: #666;
    text-align: center;
    margin-bottom: 50px;
    line-height: 1.6;
}

/* ========================================
   2. プログレスバー
   ======================================== */
.simulation-progress {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 50px;
    padding: 0 20px;
}

.simulation-progress__step {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 1;
}

.simulation-progress__number {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #E0E0E0;
    color: #999;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 600;
    transition: all 0.3s ease;
    position: relative;
}

.simulation-progress__number svg {
    width: 20px;
    height: 20px;
    display: none;
}

.simulation-progress__label {
    font-size: 12px;
    color: #999;
    margin-top: 8px;
    white-space: nowrap;
    transition: color 0.3s ease;
}

.simulation-progress__line {
    width: 60px;
    height: 3px;
    background: #E0E0E0;
    margin: 0 8px;
    margin-bottom: 20px;
    transition: background 0.3s ease;
    position: relative;
}

.simulation-progress__line::after {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 0;
    background: #357CBD;
    transition: width 0.5s ease;
}

/* プログレス - アクティブ状態 */
.simulation-progress__step--active .simulation-progress__number {
    background: #357CBD;
    color: #fff;
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(53, 124, 189, 0.3);
}

.simulation-progress__step--active .simulation-progress__label {
    color: #357CBD;
    font-weight: 600;
}

/* プログレス - 完了状態 */
.simulation-progress__step--completed .simulation-progress__number {
    background: #4CAF50;
    color: #fff;
}

.simulation-progress__step--completed .simulation-progress__number span {
    display: none;
}

.simulation-progress__step--completed .simulation-progress__number svg {
    display: block;
    fill: #fff;
}

.simulation-progress__step--completed .simulation-progress__label {
    color: #4CAF50;
}

.simulation-progress__line--completed::after {
    width: 100%;
}

/* ========================================
   3. ステップコンテンツ共通
   ======================================== */
.simulation-content {
    display: none;
    opacity: 0;
    transform: translateY(20px);
}

.simulation-content.is-active {
    display: block;
    animation: fadeSlideIn 0.4s ease forwards;
}

.simulation-content.is-leaving {
    animation: fadeSlideOut 0.3s ease forwards;
}

@keyframes fadeSlideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeSlideOut {
    from {
        opacity: 1;
        transform: translateY(0);
    }
    to {
        opacity: 0;
        transform: translateY(-20px);
    }
}

.simulation-step__title {
    font-size: 28px;
    font-weight: 700;
    color: #333;
    text-align: center;
    margin-bottom: 12px;
    line-height: 1.4;
}

.simulation-step__subtitle {
    font-size: 15px;
    color: #666;
    text-align: center;
    margin-bottom: 40px;
    line-height: 1.6;
}

/* ========================================
   4. ステップ1: 工事ジャンル選択カード
   ======================================== */
.simulation-cards {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
    margin-bottom: 40px;
}

.simulation-card {
    background: #fff;
    border: 2px solid #E0E0E0;
    border-radius: 16px;
    padding: 40px 30px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.simulation-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: transparent;
    transition: background 0.3s ease;
}

.simulation-card:hover {
    border-color: #357CBD;
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(53, 124, 189, 0.15);
}

.simulation-card.is-selected {
    border-color: #357CBD;
    background: linear-gradient(180deg, #f0f7ff 0%, #fff 100%);
    box-shadow: 0 8px 24px rgba(53, 124, 189, 0.2);
}

.simulation-card.is-selected::before {
    background: linear-gradient(90deg, #357CBD 0%, #4A90D9 100%);
}

.simulation-card__check {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 28px;
    height: 28px;
    background: #357CBD;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transform: scale(0);
    transition: all 0.3s ease;
}

.simulation-card__check svg {
    width: 16px;
    height: 16px;
    fill: #fff;
}

.simulation-card.is-selected .simulation-card__check {
    opacity: 1;
    transform: scale(1);
}

.simulation-card__icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    background: linear-gradient(135deg, #e8f4fc 0%, #d1e9f6 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.simulation-card.is-selected .simulation-card__icon {
    background: linear-gradient(135deg, #357CBD 0%, #4A90D9 100%);
}

.simulation-card__icon svg {
    width: 40px;
    height: 40px;
    fill: #357CBD;
    transition: fill 0.3s ease;
}

.simulation-card.is-selected .simulation-card__icon svg {
    fill: #fff;
}

.simulation-card__title {
    font-size: 18px;
    font-weight: 700;
    color: #333;
    margin-bottom: 12px;
    line-height: 1.4;
}

.simulation-card__description {
    font-size: 14px;
    color: #666;
    line-height: 1.6;
}

/* ========================================
   5. フォームフィールド共通
   ======================================== */
.simulation-field {
    margin-bottom: 24px;
}

.simulation-field__label {
    display: block;
    font-size: 15px;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
}

.simulation-field__required {
    color: #E84B8A;
    font-size: 12px;
    margin-left: 4px;
}

.simulation-field__input,
.simulation-field__select,
.simulation-field__textarea {
    width: 100%;
    padding: 14px 16px;
    font-size: 16px;
    border: 2px solid #E0E0E0;
    border-radius: 8px;
    background: #fff;
    transition: all 0.3s ease;
    font-family: var(--tcd-font-type1);
    -webkit-appearance: none;
    appearance: none;
}

.simulation-field__input:focus,
.simulation-field__select:focus,
.simulation-field__textarea:focus {
    outline: none;
    border-color: #357CBD;
    box-shadow: 0 0 0 3px rgba(53, 124, 189, 0.1);
}

.simulation-field__input::placeholder {
    color: #aaa;
}

/* セレクトボックス */
.simulation-field__select-wrapper {
    position: relative;
}

.simulation-field__select-wrapper::after {
    content: '';
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-top: 8px solid #666;
    pointer-events: none;
}

.simulation-field__select {
    padding-right: 44px;
    cursor: pointer;
}

/* エラー状態 */
.simulation-field__input.has-error,
.simulation-field__select.has-error {
    border-color: #F44336;
    background: #FFF5F5;
}

.simulation-field__error {
    display: none;
    color: #F44336;
    font-size: 13px;
    margin-top: 8px;
    padding-left: 4px;
}

.simulation-field__error.is-visible {
    display: block;
    animation: slideDownError 0.3s ease;
}

@keyframes slideDownError {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.simulation-field__help {
    font-size: 13px;
    color: #888;
    margin-top: 6px;
    padding-left: 4px;
}

/* 入力フィールド + 単位表示 */
.simulation-field__input-group {
    display: flex;
    align-items: center;
    gap: 12px;
}

.simulation-field__input-group .simulation-field__input {
    flex: 1;
    max-width: 200px;
}

.simulation-field__unit {
    font-size: 16px;
    color: #333;
    font-weight: 500;
}

/* その他入力欄 */
.simulation-field__other {
    margin-top: 16px;
    display: none;
}

.simulation-field__other.is-visible {
    display: block;
    animation: fadeSlideIn 0.3s ease;
}

/* ========================================
   6. フォームグリッド（ステップ4用）
   ======================================== */
.simulation-form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px 30px;
}

.simulation-form-grid .simulation-field--full {
    grid-column: 1 / -1;
}

/* 郵便番号 + ボタン */
.simulation-field__postal-group {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.simulation-field__postal-group .simulation-field__input {
    flex: 1;
    max-width: 200px;
}

.simulation-field__postal-btn {
    padding: 14px 20px;
    background: #f5f5f5;
    border: 2px solid #E0E0E0;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    color: #333;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.simulation-field__postal-btn:hover {
    background: #e8e8e8;
    border-color: #ccc;
}

/* チェックボックス */
.simulation-field__checkbox {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 12px;
}

.simulation-field__checkbox input[type="checkbox"] {
    width: 20px;
    height: 20px;
    accent-color: #357CBD;
    cursor: pointer;
}

.simulation-field__checkbox label {
    font-size: 14px;
    color: #555;
    cursor: pointer;
}

/* ========================================
   7. ボタン
   ======================================== */
.simulation-buttons {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-top: 40px;
}

.simulation-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 16px 48px;
    font-size: 17px;
    font-weight: 600;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    font-family: var(--tcd-font-type1);
}

.simulation-button--primary {
    background: linear-gradient(135deg, #357CBD 0%, #2563A8 100%);
    color: #fff;
    box-shadow: 0 4px 16px rgba(53, 124, 189, 0.3);
}

.simulation-button--primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(53, 124, 189, 0.4);
}

.simulation-button--primary:disabled {
    background: #ccc;
    box-shadow: none;
    cursor: not-allowed;
    transform: none;
}

.simulation-button--secondary {
    background: #fff;
    color: #666;
    border: 2px solid #ddd;
}

.simulation-button--secondary:hover {
    background: #f5f5f5;
    border-color: #ccc;
}

.simulation-button svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
}

/* ========================================
   8. 確認画面（ステップ5）
   ======================================== */
.simulation-confirm {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

.simulation-confirm__header {
    background: linear-gradient(135deg, #357CBD 0%, #4A90D9 100%);
    color: #fff;
    padding: 20px 30px;
    font-size: 18px;
    font-weight: 600;
}

.simulation-confirm__body {
    padding: 0;
}

.simulation-confirm__row {
    display: flex;
    align-items: center;
    padding: 20px 30px;
    border-bottom: 1px solid #f0f0f0;
}

.simulation-confirm__row:last-child {
    border-bottom: none;
}

.simulation-confirm__label {
    width: 160px;
    font-size: 14px;
    font-weight: 600;
    color: #666;
    flex-shrink: 0;
}

.simulation-confirm__value {
    flex: 1;
    font-size: 15px;
    color: #333;
    line-height: 1.5;
}

.simulation-confirm__edit {
    font-size: 13px;
    color: #357CBD;
    cursor: pointer;
    padding: 6px 12px;
    border-radius: 4px;
    transition: background 0.3s ease;
}

.simulation-confirm__edit:hover {
    background: #f0f7ff;
}

/* ========================================
   9. 完了画面（ステップ6）
   ======================================== */
.simulation-complete {
    text-align: center;
    padding: 40px 20px;
}

.simulation-complete__icon {
    width: 120px;
    height: 120px;
    margin: 0 auto 30px;
    animation: bounceIn 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

@keyframes bounceIn {
    0% {
        transform: scale(0);
        opacity: 0;
    }
    50% {
        transform: scale(1.1);
    }
    70% {
        transform: scale(0.95);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.simulation-complete__icon svg {
    width: 100%;
    height: 100%;
}

.simulation-complete__icon .circle {
    fill: #4CAF50;
}

.simulation-complete__icon .check {
    fill: none;
    stroke: #fff;
    stroke-width: 4;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-dasharray: 100;
    stroke-dashoffset: 100;
    animation: drawCheck 0.5s 0.4s ease forwards;
}

@keyframes drawCheck {
    to {
        stroke-dashoffset: 0;
    }
}

.simulation-complete__title {
    font-size: 28px;
    font-weight: 700;
    color: #333;
    margin-bottom: 20px;
}

.simulation-complete__message {
    font-size: 16px;
    color: #555;
    line-height: 1.8;
    margin-bottom: 30px;
}

.simulation-complete__note {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 24px;
    font-size: 14px;
    color: #666;
    line-height: 1.7;
    margin-bottom: 40px;
}

/* ========================================
   10. ローディングオーバーレイ
   ======================================== */
.simulation-loading {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
}

.simulation-loading.is-active {
    opacity: 1;
    visibility: visible;
}

.simulation-loading__spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.simulation-loading__text {
    color: #fff;
    font-size: 16px;
    margin-top: 20px;
}

/* ========================================
   11. レスポンシブ: タブレット（480px〜767px）
   ======================================== */
@media (max-width: 767px) {
    .simulation-section {
        padding: 60px 0;
    }

    .simulation-container {
        padding: 0 24px;
    }

    .simulation-section__title {
        font-size: 28px;
        margin-bottom: 12px;
    }

    .simulation-section__subtitle {
        font-size: 14px;
        margin-bottom: 40px;
    }

    /* プログレスバー */
    .simulation-progress {
        margin-bottom: 40px;
        padding: 0 10px;
    }

    .simulation-progress__number {
        width: 36px;
        height: 36px;
        font-size: 14px;
    }

    .simulation-progress__label {
        display: none;
    }

    .simulation-progress__line {
        width: 30px;
        margin-bottom: 0;
    }

    /* ステップタイトル */
    .simulation-step__title {
        font-size: 22px;
        margin-bottom: 10px;
    }

    .simulation-step__subtitle {
        font-size: 14px;
        margin-bottom: 30px;
    }

    /* カード */
    .simulation-cards {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .simulation-card {
        padding: 30px 24px;
    }

    .simulation-card__icon {
        width: 64px;
        height: 64px;
        margin-bottom: 16px;
    }

    .simulation-card__icon svg {
        width: 32px;
        height: 32px;
    }

    .simulation-card__title {
        font-size: 16px;
    }

    .simulation-card__description {
        font-size: 13px;
    }

    /* フォーム */
    .simulation-form-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .simulation-field__input,
    .simulation-field__select {
        padding: 12px 14px;
        font-size: 16px;
    }

    .simulation-field__postal-group {
        flex-direction: column;
    }

    .simulation-field__postal-group .simulation-field__input {
        max-width: 100%;
    }

    .simulation-field__postal-btn {
        width: 100%;
    }

    /* ボタン */
    .simulation-buttons {
        flex-direction: column;
        gap: 12px;
    }

    .simulation-button {
        width: 100%;
        padding: 14px 24px;
        font-size: 16px;
    }

    /* 確認画面 */
    .simulation-confirm__row {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
        padding: 16px 20px;
    }

    .simulation-confirm__label {
        width: 100%;
        font-size: 13px;
    }

    .simulation-confirm__value {
        font-size: 15px;
    }

    .simulation-confirm__edit {
        align-self: flex-end;
        margin-top: 8px;
    }

    /* 完了画面 */
    .simulation-complete__icon {
        width: 100px;
        height: 100px;
    }

    .simulation-complete__title {
        font-size: 24px;
    }

    .simulation-complete__message {
        font-size: 15px;
    }
}

/* ========================================
   12. レスポンシブ: スマホ（〜479px）
   ======================================== */
@media (max-width: 479px) {
    .simulation-section {
        padding: 50px 0;
    }

    .simulation-container {
        padding: 0 16px;
    }

    .simulation-section__title {
        font-size: 24px;
    }

    .simulation-section__subtitle {
        font-size: 13px;
    }

    /* プログレスバー */
    .simulation-progress__number {
        width: 32px;
        height: 32px;
        font-size: 12px;
    }

    .simulation-progress__line {
        width: 20px;
    }

    /* ステップタイトル */
    .simulation-step__title {
        font-size: 20px;
    }

    .simulation-step__subtitle {
        font-size: 13px;
        margin-bottom: 24px;
    }

    /* カード */
    .simulation-card {
        padding: 24px 20px;
    }

    .simulation-card__check {
        width: 24px;
        height: 24px;
        top: 12px;
        right: 12px;
    }

    .simulation-card__check svg {
        width: 14px;
        height: 14px;
    }

    .simulation-card__icon {
        width: 56px;
        height: 56px;
    }

    .simulation-card__icon svg {
        width: 28px;
        height: 28px;
    }

    .simulation-card__title {
        font-size: 15px;
    }

    .simulation-card__description {
        font-size: 12px;
    }

    /* フォーム */
    .simulation-field__label {
        font-size: 14px;
    }

    .simulation-field__input-group .simulation-field__input {
        max-width: 150px;
    }

    /* 確認画面 */
    .simulation-confirm__header {
        padding: 16px 20px;
        font-size: 16px;
    }

    .simulation-confirm__row {
        padding: 14px 16px;
    }

    .simulation-confirm__label {
        font-size: 12px;
    }

    .simulation-confirm__value {
        font-size: 14px;
    }

    /* 完了画面 */
    .simulation-complete {
        padding: 30px 16px;
    }

    .simulation-complete__icon {
        width: 80px;
        height: 80px;
        margin-bottom: 24px;
    }

    .simulation-complete__title {
        font-size: 22px;
    }

    .simulation-complete__message {
        font-size: 14px;
    }

    .simulation-complete__note {
        padding: 20px;
        font-size: 13px;
    }
}









