/* 査定フォーム用スタイル */
.satei-form-wrapper * {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.satei-form-wrapper {
    font-family: 'Noto Sans JP', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
    font-size: 16px;
}

.satei-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

/* ヘッダー */
.satei-header {
    background: linear-gradient(135deg, var(--satei-main-color) 0%, color-mix(in srgb, var(--satei-main-color) 80%, black) 100%);
    color: white;
    padding: 30px 0;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.satei-header h1 {
    font-size: 1.8rem;
    margin-bottom: 10px;
    font-weight: 700;
}

.satei-header p {
    opacity: 0.9;
    font-size: 1.1rem;
}

/* 進捗インジケーター */
.satei-progress-container {
    background: white;
    padding: 30px 20px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    margin-bottom: 20px;
}

.satei-progress-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    max-width: 600px;
    margin: 0 auto;
}

.satei-progress-bar::before {
    content: '';
    position: absolute;
    top: 20px;
    left: 25px;
    right: 25px;
    height: 2px;
    background: #e0e0e0;
    z-index: 0;
}

.satei-progress-line {
    position: absolute;
    top: 20px;
    left: 25px;
    height: 2px;
    background: var(--satei-sub-color);
    transition: width 0.3s ease;
    z-index: 1;
}

.satei-progress-step {
    position: relative;
    z-index: 2;
    text-align: center;
    flex: 1;
}

.satei-step-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #e0e0e0;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    font-weight: bold;
    transition: all 0.3s ease;
}

.satei-step-circle.active {
    background: var(--satei-sub-color);
    transform: scale(1.1);
}

.satei-step-circle.completed {
    background: color-mix(in srgb, var(--satei-sub-color) 80%, black);
}

/* フォームコンテナ */
.satei-form-container {
    background: white;
    border-radius: 10px;
    padding: 40px 30px;
    box-shadow: 0 3px 15px rgba(0,0,0,0.1);
    min-height: 400px;
    position: relative;
    overflow: hidden;
}

.satei-form-step {
    display: none;
    animation: satei-fadeIn 0.3s ease;
}

.satei-form-step.active {
    display: block;
}

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

.satei-step-title {
    font-size: 1.5rem;
    color: #333;
    margin-bottom: 10px;
    text-align: center;
    font-weight: 700;
}

.satei-step-subtitle {
    color: #666;
    text-align: center;
    margin-bottom: 30px;
}

/* フォーム要素 */
.satei-form-group {
    margin-bottom: 25px;
}

.satei-form-label {
    display: block;
    margin-bottom: 10px;
    color: #333;
    font-weight: 500;
}

.satei-required {
    color: #e74c3c;
    margin-left: 5px;
}

.satei-auto-fill-badge {
    background-color: #e9ecef;
    color: #495057;
    font-size: 0.7rem;
    padding: 2px 6px;
    border-radius: 10px;
    margin-left: 8px;
    font-weight: normal;
}

.satei-manual-input-badge {
    background-color: #fff3cd;
    color: #856404;
    border: 1px solid #ffc107;
}

/* ボタン選択式 */
.satei-button-group {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    margin-bottom: 25px;
}

.satei-button-group.satei-property-grid {
    grid-template-columns: repeat(4, 1fr);
}

.satei-button-group.satei-five-grid {
    grid-template-columns: repeat(5, 1fr);
}

.satei-button-option {
    padding: 20px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    background: white;
    cursor: pointer;
    text-align: center;
    transition: all 0.3s ease;
    min-height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
    line-height: 1.2;
}

.satei-button-option:hover {
    border-color: var(--satei-main-color);
    background: color-mix(in srgb, var(--satei-main-color) 10%, white);
}

.satei-button-option.selected {
    border-color: var(--satei-sub-color);
    background: color-mix(in srgb, var(--satei-sub-color) 10%, white);
    color: color-mix(in srgb, var(--satei-sub-color) 80%, black);
    font-weight: bold;
}

/* 複数選択用のカード */
.satei-button-option.satei-multi-select.selected {
    border-color: var(--satei-sub-color);
    background: color-mix(in srgb, var(--satei-sub-color) 10%, white);
    color: color-mix(in srgb, var(--satei-sub-color) 80%, black);
    font-weight: bold;
    position: relative;
}

.satei-button-option.satei-multi-select.selected::after {
    content: '✓';
    position: absolute;
    top: 8px;
    right: 8px;
    width: 20px;
    height: 20px;
    background: color-mix(in srgb, var(--satei-sub-color) 80%, black);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
}

/* テキスト入力 */
.satei-form-input {
    width: 100%;
    padding: 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s ease;
}

/* 読み取り専用フィールドのスタイル */
.satei-form-input[readonly] {
    background-color: #f8f9fa;
    border: 2px solid #dee2e6;
    color: #495057;
    cursor: not-allowed;
    position: relative;
}

.satei-form-input[readonly]:focus {
    border-color: #dee2e6;
    outline: none;
}

.satei-form-input:focus {
    outline: none;
    border-color: var(--satei-main-color);
}

/* セレクトボックス */
.satei-form-select {
    width: 100% !important;
    padding: 15px !important;
    border: 2px solid #e0e0e0 !important;
    border-radius: 8px !important;
    font-size: 16px !important;
    background: white !important;
    background-color: white !important;
    color: #333 !important;
    cursor: pointer !important;
    transition: border-color 0.3s ease !important;
    line-height: 1.5 !important;
    height: auto !important;
    min-height: 50px !important;
    appearance: auto !important;
    -webkit-appearance: menulist !important;
    -moz-appearance: menulist !important;
    font-family: inherit !important;
    font-weight: normal !important;
    display: block !important;
    box-sizing: border-box !important;
}

.satei-form-select:focus {
    outline: none !important;
    border-color: var(--satei-main-color) !important;
}

.satei-form-select option {
    color: #333 !important;
    background-color: white !important;
    padding: 10px !important;
    font-size: 16px !important;
}

/* 年月選択 */
.satei-date-select-group {
    display: flex;
    gap: 15px;
    align-items: center;
}

.satei-date-select {
    flex: 1;
}

/* ナビゲーションボタン */
.satei-navigation {
    display: flex;
    justify-content: space-between;
    margin-top: 40px;
    gap: 20px;
}

.satei-nav-button {
    flex: 1;
    padding: 18px 30px;
    border: none;
    border-radius: 30px;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    min-height: 56px;
}

.satei-nav-button:disabled {
    background: #e0e0e0;
    color: #999;
    cursor: not-allowed;
}

.satei-btn-prev {
    background: white;
    color: var(--satei-main-color);
    border: 2px solid var(--satei-main-color);
}

.satei-btn-prev:hover:not(:disabled) {
    background: color-mix(in srgb, var(--satei-main-color) 10%, white);
}

.satei-btn-next {
    background: linear-gradient(135deg, var(--satei-sub-color) 0%, color-mix(in srgb, var(--satei-sub-color) 80%, black) 100%);
    color: white;
    box-shadow: 0 5px 20px color-mix(in srgb, var(--satei-sub-color) 30%, transparent);
}

.satei-btn-next:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px color-mix(in srgb, var(--satei-sub-color) 40%, transparent);
}

.satei-btn-submit {
    background: linear-gradient(135deg, var(--satei-main-color) 0%, color-mix(in srgb, var(--satei-main-color) 80%, black) 100%);
    color: white;
    box-shadow: 0 5px 20px color-mix(in srgb, var(--satei-main-color) 30%, transparent);
}

.satei-btn-submit:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px color-mix(in srgb, var(--satei-main-color) 40%, transparent);
}

/* エラーメッセージ */
.satei-error-message {
    color: #e74c3c;
    font-size: 0.9rem;
    margin-top: 5px;
    display: none;
}

/* バリデーションエラー（ボタン上部） */
.satei-validation-error {
    background-color: #fee;
    border: 2px solid #e74c3c;
    border-radius: 10px;
    padding: 15px 20px;
    margin-bottom: 20px;
    color: #e74c3c;
    font-weight: 600;
    text-align: center;
    display: none;
    animation: satei-shake 0.5s ease;
}

@keyframes satei-shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-10px); }
    75% { transform: translateX(10px); }
}

/* 完了画面 */
.satei-completion-screen {
    text-align: center;
    padding: 60px 20px;
}

.satei-check-icon {
    width: 80px;
    height: 80px;
    background: var(--satei-sub-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 30px;
    font-size: 3rem;
    color: white;
    animation: satei-scaleIn 0.5s ease;
}

@keyframes satei-scaleIn {
    from {
        transform: scale(0);
    }
    to {
        transform: scale(1);
    }
}

.satei-completion-title {
    font-size: 2rem;
    color: #333;
    margin-bottom: 20px;
    font-weight: 700;
}

.satei-completion-text {
    color: #666;
    line-height: 1.8;
}

/* レート制限超過画面 */
.satei-rate-limit-exceeded {
    text-align: center;
    padding: 60px 20px;
}

.satei-exceeded-icon {
    width: 80px;
    height: 80px;
    background: #ff9800;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 30px;
    font-size: 3rem;
    animation: satei-scaleIn 0.5s ease;
}

.satei-exceeded-title {
    font-size: 1.8rem;
    color: #d32f2f;
    margin-bottom: 20px;
    font-weight: 700;
}

.satei-exceeded-text {
    color: #666;
    line-height: 1.8;
    font-size: 1rem;
}

.satei-exceeded-text p {
    margin-bottom: 15px;
}

/* ローディング */
.satei-loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255,255,255,0.9);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.satei-loading-overlay.active {
    display: flex;
}

.satei-spinner {
    width: 50px;
    height: 50px;
    border: 5px solid #f3f3f3;
    border-top: 5px solid var(--satei-main-color);
    border-radius: 50%;
    animation: satei-spin 1s linear infinite;
}

@keyframes satei-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* レスポンシブ */
@media (max-width: 768px) {
    .satei-container {
        padding: 10px;
    }

    .satei-header h1 {
        font-size: 1.5rem;
    }

    .satei-form-container {
        padding: 30px 20px;
    }

    .satei-step-title {
        font-size: 1.3rem;
    }

    .satei-button-group {
        grid-template-columns: 1fr;
    }

    .satei-button-group.satei-property-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .satei-button-group.satei-five-grid {
        grid-template-columns: 1fr;
    }

    .satei-navigation {
        flex-direction: column-reverse;
    }

    .satei-progress-bar {
        font-size: 0.8rem;
    }

    .satei-step-circle {
        width: 35px;
        height: 35px;
        font-size: 0.9rem;
    }

    /* 住所入力は横並びを維持（モバイルでも） */
    .satei-address-row {
        gap: 10px;
    }

    /* レート制限超過画面のモバイル対応 */
    .satei-exceeded-title {
        font-size: 1.4rem;
    }

    .satei-exceeded-icon {
        width: 60px;
        height: 60px;
        font-size: 2rem;
    }

    .satei-rate-limit-exceeded {
        padding: 40px 15px;
    }

    /* 完了画面のモバイル対応 */
    .satei-completion-title {
        font-size: 1.5rem;
    }

    .satei-completion-screen {
        padding: 40px 15px;
    }
}

/* 郵便番号自動補完関連 */
.satei-form-note {
    font-size: 0.85rem;
    color: #666;
    margin-top: 5px;
    font-style: italic;
}

/* 住所表示関連 */
.satei-address-row {
    display: flex;
    gap: 15px;
    align-items: flex-start;
}

.satei-address-municipality {
    flex: 0 0 auto;
    max-width: 60%;
}

.satei-address-details {
    flex: 1;
    min-width: 0;
}

.satei-address-display {
    background-color: #ffffff !important;
    background: #ffffff !important;
    border: 1px solid #e9ecef;
    padding: 10px 15px;
    border-radius: 5px;
    margin-bottom: 10px;
    font-weight: normal !important;
    color: #000000 !important;
    min-height: 40px;
    display: flex;
    align-items: center;
}

.satei-address-display span {
    background-color: transparent !important;
    background: transparent !important;
    color: #000000 !important;
    font-weight: normal !important;
}

.satei-address-display:empty::before {
    content: "郵便番号を入力すると自動で表示されます";
    color: #999;
    font-style: italic;
    font-weight: normal;
}

/* チェックボックス関連 */
.satei-checkbox-wrapper {
    margin: 10px 0;
}

.satei-checkbox-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 0.95rem;
    color: #555;
}

.satei-checkbox-label input[type="checkbox"] {
    margin-right: 8px;
    width: 18px;
    height: 18px;
    accent-color: var(--satei-main-color);
}

/* 面積単位切り替え関連 */
.satei-area-unit-toggle {
    display: flex;
    gap: 20px;
    margin-bottom: 10px;
    justify-content: flex-start;
}

.satei-area-unit-toggle input[type="radio"] {
    margin-right: 5px;
    accent-color: var(--satei-main-color);
}

.satei-area-unit-toggle label {
    cursor: pointer;
    font-weight: 500;
    color: #555;
}

.satei-area-input-group {
    display: flex;
    gap: 15px;
    align-items: center;
}

.satei-area-input-group .satei-form-input {
    flex: 1;
    min-width: 120px;
}

.satei-area-converted {
    padding: 8px 12px;
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 5px;
    font-size: 0.9rem;
    color: #495057;
    text-align: center;
    min-width: 100px;
    white-space: nowrap;
}

.satei-area-converted:empty {
    display: none;
}

