/* カタログ請求フォーム - マテリアルデザイン */

* {
    box-sizing: border-box;
}

body {
    font-family: 'Noto Sans JP', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
    background: #f5f5f5;
    margin: 0;
    padding: 0;
}

.catalog-request-wrapper {
    min-height: 100vh;
    padding: 40px 20px;
}

/* プログレスバー */
.progress-container {
    max-width: 1000px;
    margin: 0 auto 60px;
    background: white;
    border-radius: 8px;
    padding: 24px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.progress-bar {
    height: 4px;
    background: #e0e0e0;
    border-radius: 2px;
    position: relative;
    margin-bottom: 24px;
    overflow: hidden;
}

.progress-bar::after {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    background: #FF6B35;
    width: 0%;
    transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.progress-steps {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.progress-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
    position: relative;
}

.step-circle {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #e0e0e0;
    color: #9e9e9e;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s ease;
    z-index: 2;
}

.progress-step.active .step-circle {
    background: #FF6B35;
    color: white;
    box-shadow: 0 2px 8px rgba(255, 107, 53, 0.4);
}

.progress-step.completed .step-circle {
    background: #4CAF50;
    color: white;
}

.step-label {
    margin-top: 8px;
    font-size: 11px;
    color: #757575;
    text-align: center;
    font-weight: 500;
}

.progress-step.active .step-label {
    color: #FF6B35;
    font-weight: 600;
}

/* フォームコンテナ */
.form-container {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
}

.question-slide {
    display: none;
    opacity: 0;
    transform: translateX(50px);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.question-slide.active {
    display: block;
    opacity: 1;
    transform: translateX(0);
    animation: slideIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.question-content {
    background: white;
    border-radius: 8px;
    padding: 48px 40px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    margin-bottom: 24px;
}

.question-title {
    font-size: 24px;
    font-weight: 600;
    color: #212121;
    margin: 0 0 8px 0;
    line-height: 1.4;
}

.question-subtitle {
    font-size: 14px;
    color: #757575;
    margin: 0 0 32px 0;
}

/* オプションカード */
.question-options {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
    margin-top: 32px;
}

.option-card {
    position: relative;
    cursor: pointer;
    display: block;
}

.option-card input[type="radio"],
.option-card input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

.option-content {
    background: #fafafa;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    padding: 24px 16px;
    text-align: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.option-card:hover .option-content {
    border-color: #FF6B35;
    background: #fff;
    transform: translateY(-4px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.option-card input:checked ~ .option-content {
    border-color: #FF6B35;
    background: #fff3f0;
    box-shadow: 0 4px 12px rgba(255, 107, 53, 0.2);
}

.option-icon {
    font-size: 32px;
    margin-bottom: 12px;
}

.option-text {
    font-size: 15px;
    font-weight: 500;
    color: #424242;
    line-height: 1.4;
}

.option-card input:checked ~ .option-content .option-text {
    color: #FF6B35;
    font-weight: 600;
}

/* ナビゲーションボタン */
.question-navigation {
    display: flex;
    gap: 16px;
}

/* 戻るボタンがある場合は両端揃え、ない場合は右寄せ */
.question-navigation:has(.btn-prev) {
    justify-content: space-between;
}

.question-navigation:not(:has(.btn-prev)) {
    justify-content: flex-end;
}

.btn-prev,
.btn-next,
.btn-submit {
    padding: 14px 32px;
    font-size: 16px;
    font-weight: 600;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}


.btn-prev {
    background: white;
    color: #616161;
    border: 2px solid #e0e0e0;
}

.btn-prev:hover {
    background: #fafafa;
    border-color: #bdbdbd;
}

.btn-next,
.btn-submit {
    background: #FF6B35;
    color: white;
}

.btn-next:hover,
.btn-submit:hover {
    background: #ff5722;
    box-shadow: 0 4px 12px rgba(255, 107, 53, 0.4);
    transform: translateY(-2px);
}

.btn-submit {
    background: #4CAF50;
}

.btn-submit:hover {
    background: #45a049;
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.4);
}

/* フォーム入力フィールド */
.form-fields {
    display: grid;
    gap: 24px;
}

.form-field {
    display: flex;
    flex-direction: column;
}

.field-label {
    font-size: 14px;
    font-weight: 600;
    color: #424242;
    margin-bottom: 8px;
}

.required {
    color: #f44336;
}

.field-input,
.field-textarea {
    padding: 12px 16px;
    font-size: 16px;
    border: 2px solid #e0e0e0;
    border-radius: 4px;
    font-family: inherit;
    transition: all 0.3s ease;
}

.field-input:focus,
.field-textarea:focus {
    outline: none;
    border-color: #FF6B35;
    box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.1);
}

.field-textarea {
    resize: vertical;
    min-height: 100px;
}

/* スマホ用固定ボタンエリア */
.fixed-button-area {
    display: none;
}

@media (max-width: 768px) {
    .fixed-button-area {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        width: 100%;
        display: flex;
        gap: 12px;
        padding: 12px 16px;
        background: white;
        box-shadow: 0 -4px 12px rgba(0,0,0,0.15);
        z-index: 1000;
    }

    .fixed-prev-btn,
    .fixed-next-btn {
        flex: 1;
        padding: 14px 24px;
        font-size: 16px;
        font-weight: 600;
        border: none;
        border-radius: 6px;
        cursor: pointer;
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    }

    .fixed-prev-btn {
        background: white;
        color: #616161;
        border: 2px solid #e0e0e0;
    }

    .fixed-prev-btn:hover {
        background: #fafafa;
        border-color: #bdbdbd;
    }

    .fixed-next-btn {
        background: #FF6B35;
        color: white;
    }

    .fixed-next-btn:hover {
        background: #ff5722;
        box-shadow: 0 4px 12px rgba(255, 107, 53, 0.4);
    }

    .fixed-next-btn.is-submit {
        background: #4CAF50;
    }

    .fixed-next-btn.is-submit:hover {
        background: #45a049;
        box-shadow: 0 4px 12px rgba(76, 175, 80, 0.4);
    }
}

/* レスポンシブ */
@media (max-width: 768px) {
    .catalog-request-wrapper {
        padding: 20px 16px;
    }

    .progress-container {
        padding: 16px;
        margin-bottom: 40px;
    }

    .progress-steps {
        overflow-x: auto;
        padding-bottom: 8px;
    }

    .progress-step {
        min-width: 60px;
    }

    .step-label {
        font-size: 10px;
        max-width: 60px;
    }

    .question-content {
        padding: 32px 24px;
        margin-bottom: 100px; /* 固定ボタンエリアに隠れないように */
    }

    .question-title {
        font-size: 20px;
    }

    .question-options {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .option-content {
        padding: 20px 16px;
    }

    .question-navigation {
        flex-direction: column-reverse;
        padding-bottom: 0;
    }

    /* 元のボタンは非表示（固定ボタンを使用） */
    .btn-next,
    .btn-submit,
    .btn-prev {
        display: none;
    }
}

/* アニメーション効果 */
.option-card {
    animation: fadeInUp 0.4s cubic-bezier(0.4, 0, 0.2, 1) backwards;
}

.option-card:nth-child(1) { animation-delay: 0.05s; }
.option-card:nth-child(2) { animation-delay: 0.1s; }
.option-card:nth-child(3) { animation-delay: 0.15s; }
.option-card:nth-child(4) { animation-delay: 0.2s; }
.option-card:nth-child(5) { animation-delay: 0.25s; }
.option-card:nth-child(6) { animation-delay: 0.3s; }
.option-card:nth-child(7) { animation-delay: 0.35s; }

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