/* お問い合わせフォームのスタイル */
.fsdb-contact-form-wrapper {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

/* ステップインジケーター */
.fsdb-step-indicator {
    display: flex;
    justify-content: space-between;
    margin-bottom: 40px;
    position: relative;
}

.fsdb-step-indicator::before {
    content: '';
    position: absolute;
    top: 20px;
    left: 25%;
    right: 25%;
    height: 2px;
    background: #ddd;
    z-index: 0;
}

.fsdb-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 1;
    flex: 1;
}

.fsdb-step-number {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #ddd;
    color: #999;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    margin-bottom: 8px;
    transition: all 0.3s;
}

.fsdb-step-label {
    font-size: 14px;
    color: #999;
    transition: color 0.3s;
}

.fsdb-step.active .fsdb-step-number {
    background: #3498db;
    color: white;
}

.fsdb-step.active .fsdb-step-label {
    color: #3498db;
    font-weight: 600;
}

.fsdb-step.completed .fsdb-step-number {
    background: #27ae60;
    color: white;
}

.fsdb-step.completed .fsdb-step-label {
    color: #27ae60;
}

/* フォームステップの切り替え */
.fsdb-form-step {
    display: none;
}

.fsdb-form-step.active {
    display: block;
    animation: fadeIn 0.3s;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fsdb-form-content,
.fsdb-step-confirm,
.fsdb-step-complete {
    background: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* Step2以降でフッターテキストを非表示 */
.fsdb-step-confirm .fsdb-footer-text,
.fsdb-step-complete .fsdb-footer-text {
    display: none;
}

/* フォーム表示タイトル */
.fsdb-form-title-display {
    font-size: 20px;
    font-weight: 600;
    color: #3a3a3a;
    margin-bottom: 30px;
    padding-bottom: 15px;
}

.fsdb-form-group {
    margin-bottom: 20px;
}

.fsdb-form-group label,
.fsdb-form-group .fsdb-field-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
}

.fsdb-form-group .required {
    color: #e74c3c;
}

.fsdb-form-group .error {
    display: block;
    color: #e74c3c;
    font-size: 13px;
    margin-top: 5px;
    font-weight: normal;
}

.fsdb-form-group input[type="text"],
.fsdb-form-group input[type="email"],
.fsdb-form-group input[type="tel"],
.fsdb-form-group input[type="url"],
.fsdb-form-group input[type="number"],
.fsdb-form-group input[type="date"],
.fsdb-form-group select,
.fsdb-form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.3s;
    box-sizing: border-box;
}

.fsdb-form-group input:focus,
.fsdb-form-group select:focus,
.fsdb-form-group textarea:focus {
    outline: none;
    border-color: #3498db;
}

.fsdb-form-group textarea {
    resize: vertical;
    font-family: inherit;
}

/* ラジオボタンとチェックボックス */
.fsdb-radio-group,
.fsdb-checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.fsdb-radio-label,
.fsdb-checkbox-label {
    display: flex;
    align-items: center;
    cursor: pointer;
}

.fsdb-radio-label input,
.fsdb-checkbox-label input {
    margin-right: 8px;
    cursor: pointer;
}

/* ヘルプテキスト */
.fsdb-help-text {
    font-size: 12px;
    color: #666;
    margin-top: 5px;
    margin-bottom: 0;
    padding-bottom: 0 !important;
}

/* フォーム説明 */
.fsdb-form-description {
    background: #f0f8ff;
    border-left: 4px solid #3498db;
    padding: 15px;
    margin-bottom: 20px;
    color: #333;
}

/* フィールドグループ */
.fsdb-field-group {
    background: #f9f9f9;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    padding: 20px;
    margin-bottom: 25px;
}

.fsdb-group-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #3498db;
}

.fsdb-group-title {
    margin: 0;
    color: #2c3e50;
    font-size: 18px;
    font-weight: 600;
}

.fsdb-group-controls {
    display: flex;
    gap: 10px;
}

.fsdb-add-group,
.fsdb-remove-group {
    display: flex;
    align-items: center;
    gap: 5px;
    background: #27ae60;
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    transition: background 0.3s;
}

.fsdb-add-group .dashicons,
.fsdb-remove-group .dashicons {
    font-size: 18px;
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
}

.fa-plus::before,
.fa-minus::before {
    font-style: normal !important;
}

.fsdb-add-group .dashicons .svg-inline--fa,
.fsdb-remove-group .dashicons .svg-inline--fa {
    margin-top: 0 !important;
}

.fsdb-add-group:hover {
    background: #229954;
}

.fsdb-remove-group {
    background: #e74c3c;
}

.fsdb-remove-group:hover {
    background: #c0392b;
}

.fsdb-repeatable-items {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.fsdb-repeatable-item {
    position: relative;
    padding: 15px;
    padding-top: 45px;
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
}

.fsdb-repeatable-item:first-child:last-child .fsdb-item-controls {
    display: none;
}

.fsdb-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e0e0e0;
}

.fsdb-item-title {
    margin: 0;
    font-size: 1.1em;
    font-weight: bold;
    color: #333;
}

.fsdb-item-controls {
    margin: 0;
    padding: 0;
    border: none;
}

.fsdb-group-fields {
    /* グループ内のフィールド */
}

/* 注意事項 */
.fsdb-notice-text {
    background: #fff3cd;
    border: 1px solid #ffc107;
    border-left: 4px solid #ffc107;
    padding: 15px;
    border-radius: 4px;
    margin: 25px 0;
    color: #856404;
    line-height: 1.6;
}

.fsdb-notice-text p {
    margin: 0.5em 0;
}

.fsdb-notice-text p:first-child {
    margin-top: 0;
}

.fsdb-notice-text p:last-child {
    margin-bottom: 0;
}

/* 繰り返しフィールド */
#fsdb-repeatable-fields {
    margin: 20px 0;
    padding: 20px;
    background: #f9f9f9;
    border-radius: 4px;
}

#fsdb-repeatable-fields h3 {
    margin: 0 0 15px 0;
    font-size: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.fsdb-add-field {
    background: #27ae60;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.3s;
}

.fsdb-add-field:hover {
    background: #229954;
}

.fsdb-repeatable-container {
    margin-top: 10px;
}

.fsdb-repeatable-item {
    margin-bottom: 10px;
}

.fsdb-repeatable-item input[type="text"] {
    flex: 1;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.fsdb-remove-field {
    background: #e74c3c;
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.3s;
    white-space: nowrap;
}

.fsdb-remove-field:hover {
    background: #c0392b;
}

/* 送信ボタン */
.fsdb-submit-btn {
    background: #3498db;
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    transition: background 0.3s;
    width: 100%;
}

.fsdb-submit-btn:hover {
    background: #2980b9;
}

.fsdb-submit-btn:disabled {
    background: #95a5a6;
    cursor: not-allowed;
}

/* 確認ボタン */
.fsdb-confirm-btn {
    background: #3498db;
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    transition: background 0.3s;
    width: 100%;
}

.fsdb-confirm-btn:hover {
    background: #2980b9;
}

/* 確認画面 */
.fsdb-confirm-title {
    margin-bottom: 20px;
    color: #333;
    font-size: 20px;
    text-align: center;
}

#fsdb-confirm-content {
    margin-bottom: 30px;
}

.fsdb-confirm-group {
    margin-bottom: 25px;
}

.fsdb-confirm-group h4 {
    background: #3498db;
    color: white;
    padding: 10px 15px;
    margin: 0 0 10px 0;
    border-radius: 4px;
    font-size: 16px;
}

.fsdb-confirm-group-item {
    margin-bottom: 15px;
    padding: 15px;
    background: #f9f9f9;
    border-left: 3px solid #3498db;
}

.fsdb-confirm-group-item h5 {
    margin: 0 0 10px 0;
    color: #2c3e50;
    font-size: 14px;
}

.fsdb-confirm-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 15px;
    background: white;
}

.fsdb-confirm-table th,
.fsdb-confirm-table td {
    padding: 15px;
    border-bottom: 1px solid #eee;
    text-align: left;
}

.fsdb-confirm-table th {
    background: #f9f9f9;
    font-weight: 600;
    width: 35%;
    color: #555;
}

.fsdb-confirm-table td {
    color: #333;
}

.fsdb-preserve-linebreak {
    white-space: pre-wrap;
    word-wrap: break-word;
}

.fsdb-additional-list {
    margin: 0;
    padding-left: 20px;
}

.fsdb-additional-list li {
    margin-bottom: 5px;
}

/* ボタングループ */
.fsdb-form-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
}

.fsdb-back-btn {
    background: #95a5a6;
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    transition: background 0.3s;
    min-width: 150px;
}

.fsdb-back-btn:hover {
    background: #7f8c8d;
}

.fsdb-form-buttons .fsdb-submit-btn {
    width: auto;
    min-width: 150px;
}

/* 完了画面 */
.fsdb-step-complete {
    text-align: center;
    padding: 40px 20px;
}

.fsdb-complete-message {
    background: #d4edda;
    border: 2px solid #c3e6cb;
    border-radius: 8px;
    padding: 40px 30px;
}

.fsdb-complete-icon {
    width: 80px;
    height: 80px;
    background: #27ae60;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    margin: 0 auto 20px;
}

.fsdb-complete-message h3 {
    color: #155724;
    margin-bottom: 15px;
    font-size: 24px;
    text-align: center;
}

.fsdb-complete-message p {
    color: #155724;
    line-height: 1.6;
    margin: 0;
}

/* メッセージ表示 */
.fsdb-message {
    margin-top: 20px;
    padding: 15px;
    border-radius: 4px;
    font-weight: 500;
}

.fsdb-message.fsdb-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.fsdb-message.fsdb-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
    .fsdb-contact-form-wrapper {
        padding: 10px;
    }

    .fsdb-form {
        padding: 20px;
    }

    .fsdb-repeatable-item {
        flex-direction: column;
        align-items: stretch;
    }

    .fsdb-remove-field {
        width: 100%;
    }

    .fsdb-step-indicator {
        margin-bottom: 30px;
    }

    .fsdb-step-label {
        font-size: 12px;
    }

    .fsdb-step-number {
        width: 35px;
        height: 35px;
        font-size: 14px;
    }

    .fsdb-confirm-table th,
    .fsdb-confirm-table td {
        padding: 10px;
        font-size: 14px;
    }

    .fsdb-confirm-table th {
        width: 30%;
    }

    .fsdb-form-buttons {
        flex-direction: column;
    }

    .fsdb-back-btn,
    .fsdb-form-buttons .fsdb-submit-btn {
        width: 100%;
        min-width: auto;
    }

    .fsdb-complete-icon {
        width: 60px;
        height: 60px;
        font-size: 36px;
    }

    .fsdb-complete-message h3 {
        font-size: 20px;
    }

    .fsdb-complete-message {
        padding: 30px 20px;
    }
}


@media (max-width: 600px) {
    .fsdb-contact-form-wrapper {
        padding: 0;
    }

    .fsdb-form {
        padding: 16px;
    }

    .fsdb-form-title-display {
        font-size: calc(20px * 0.8);
    }

    .fsdb-repeatable-item {
        padding: 8px;
        padding-top: 45px;
    }

    .fsdb-field-group {
        padding: 16px 8px;
    }

    .fsdb-confirm-table th, .fsdb-confirm-table td {
        display: block;
        width: 100%;
    }
}