.interview-parts-form {
    max-width: 800px;
    margin: 2em auto;
    padding: 2em;
    background: #fff;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
}

.interview-parts-form .form-group {
    margin-bottom: 1.5em;
}

.interview-parts-form label {
    display: block;
    margin-bottom: 0.5em;
    font-weight: bold;
    color: #333;
}

.interview-parts-form .required {
    color: #e53e3e;
    margin-left: 0.25em;
}

.interview-parts-form input[type="text"],
.interview-parts-form textarea {
    width: 100%;
    padding: 0.75em;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1em;
}

.interview-parts-form input[type="file"] {
    width: 100%;
    padding: 0.75em;
    border: 2px dashed #ddd;
    border-radius: 4px;
    background: #f9f9f9;
    cursor: pointer;
    transition: all 0.3s;
    box-sizing: border-box;
}

.interview-parts-form input[type="file"]:hover {
    border-color: #4299e1;
    background: #f0f8ff;
}

.interview-parts-form input[type="file"]:focus {
    outline: none;
    border-color: #4299e1;
    box-shadow: 0 0 0 2px rgba(66, 153, 225, 0.1);
}

.interview-parts-form textarea {
    min-height: 150px;
    resize: vertical;
}

.interview-parts-form .form-submit {
    margin-top: 2em;
    text-align: center;
}

.interview-parts-form .submit-button {
    background: #4299e1;
    color: white;
    padding: 0.75em 2em;
    border: none;
    border-radius: 4px;
    font-size: 1em;
    cursor: pointer;
    transition: background-color 0.3s;
}

.interview-parts-form .submit-button:hover {
    background: #3182ce;
}

.interview-parts-form .form-message {
    margin-top: 1em;
    padding: 1em;
    border-radius: 4px;
}

.interview-parts-form .form-message.success {
    background: #c6f6d5;
    color: #2f855a;
}

.interview-parts-form .form-message.error {
    background: #fed7d7;
    color: #c53030;
}

/* セクション機能のスタイル */
.interview-parts-form .form-section {
    animation: fadeIn 0.3s ease-in-out;
}

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



.interview-parts-form .section-navigation {
    margin-top: 2em;
    display: flex;
    justify-content: space-between;
    gap: 1em;
}

.interview-parts-form .next-section-button,
.interview-parts-form .prev-section-button {
    background: #4299e1;
    color: white;
    padding: 0.75em 1.5em;
    border: none;
    border-radius: 4px;
    font-size: 1em;
    cursor: pointer;
    transition: background-color 0.3s;
    min-width: 100px;
}

.interview-parts-form .prev-section-button {
    background: #718096;
}

.interview-parts-form .next-section-button:hover {
    background: #3182ce;
}

.interview-parts-form .prev-section-button:hover {
    background: #4a5568;
}

.interview-parts-form .section-navigation .submit-button {
    background: #48bb78;
    margin-left: auto;
}

.interview-parts-form .section-navigation .submit-button:hover {
    background: #38a169;
}

/* 確認チェックボックスのスタイル */
.interview-parts-form .confirmation-group {
    margin: 1em 0;
}

.interview-parts-form .confirmation-label {
    display: flex;
    align-items: flex-start;
    gap: 0.5em;
    font-weight: normal;
    font-size: 0.9em;
    cursor: pointer;
    line-height: 1.4;
    color: #666;
}

.interview-parts-form .confirmation-label input[type="checkbox"] {
    width: auto;
    margin: 0;
    flex-shrink: 0;
    margin-top: 0.1em;
}

.interview-parts-form .submit-button:disabled {
    background: #a0aec0;
    cursor: not-allowed;
    opacity: 0.6;
}

.interview-parts-form .submit-button:disabled:hover {
    background: #a0aec0;
}

/* 質問ごとの画像アップロード機能のスタイル */
.interview-parts-form .question-image-upload {
    margin-top: 10px;
}

.interview-parts-form .add-image-btn {
    background: none;
    border: 1px solid #ddd;
    padding: 5px 10px;
    font-size: 12px;
    color: #666;
    cursor: pointer;
    border-radius: 3px;
    transition: all 0.2s;
}

.interview-parts-form .add-image-btn:hover {
    border-color: #4299e1;
    color: #4299e1;
    background: #f7fafc;
}

.interview-parts-form .add-image-btn.has-image {
    border-color: #007cba;
    color: #007cba;
    background-color: #f0f8ff;
}

.interview-parts-form .add-image-btn.has-image:hover {
    background-color: #e6f3ff;
}

.interview-parts-form .question-image-upload .image-preview {
    margin-top: 10px;
    display: none;
    text-align: left;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 5px;
    background-color: #f9f9f9;
}

.interview-parts-form .question-image-upload .image-preview img {
    max-width: 200px;
    max-height: 150px;
    border: 1px solid #ddd;
    border-radius: 3px;
    object-fit: cover;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.interview-parts-form .question-image-upload .image-preview .file-info {
    margin-top: 5px;
    font-size: 11px;
    color: #666;
    font-style: italic;
}

.interview-parts-form .remove-image-btn {
    display: inline-block;
    margin-top: 8px;
    background: #dc3545;
    color: white;
    border: none;
    padding: 4px 8px;
    font-size: 11px;
    cursor: pointer;
    border-radius: 3px;
    transition: background-color 0.2s;
}

.interview-parts-form .remove-image-btn:hover {
    background: #c82333;
}

/* 画像プレビューのスタイル */
.interview-parts-form .image-preview {
    margin-top: 1em;
    text-align: center;
}

.interview-parts-form .image-preview img {
    max-width: 200px;
    max-height: 200px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    object-fit: cover;
}

.interview-parts-form .image-preview .preview-info {
    margin-top: 0.5em;
    font-size: 0.9em;
    color: #666;
}

.interview-parts-form .image-preview .remove-image {
    display: inline-block;
    margin-top: 0.5em;
    padding: 0.25em 0.75em;
    background: #e53e3e;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 0.8em;
    cursor: pointer;
    transition: background-color 0.3s;
}

.interview-parts-form .image-preview .remove-image:hover {
    background: #c53030;
}

/* ファイル入力のドラッグ&ドロップ対応 */
.interview-parts-form .file-input-wrapper {
    position: relative;
}

.interview-parts-form .file-input-wrapper.dragover input[type="file"] {
    border-color: #4299e1;
    background: #e6f3ff;
    transform: scale(1.02);
}

.interview-parts-form .file-input-label {
    display: block;
    text-align: center;
    padding: 0.75em;
    border: 2px dashed #ddd;
    border-radius: 4px;
    background: #f9f9f9;
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
    min-height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.interview-parts-form .file-input-label:hover {
    border-color: #4299e1;
    background: #f0f8ff;
}

.interview-parts-form .file-input-label.has-file {
    border-color: #48bb78;
    background: #f0fff4;
}

.interview-parts-form .file-input-label input[type="file"] {
    position: absolute;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
    border: none;
    background: none;
    padding: 0;
}

.interview-parts-form .file-input-text {
    pointer-events: none;
    font-size: 0.85em;
    color: #666;
    line-height: 1.3;
}

.interview-parts-form .file-input-text .file-icon {
    font-size: 1.5em;
    margin-bottom: 0.3em;
    display: block;
}

.interview-parts-form .file-input-text strong {
    font-size: 0.95em;
}

.interview-parts-form .file-input-text small {
    font-size: 0.8em;
    line-height: 1.2;
}

/* サンクスモーダルのスタイル */
.thanks-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 999999;
}

.thanks-modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
}

.thanks-modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.thanks-modal-header {
    padding: 20px 25px 10px;
    text-align: right;
    border-bottom: 1px solid #f0f0f0;
    flex-shrink: 0;
}

.thanks-modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    padding: 5px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
    border-radius: 50%;
    transition: all 0.2s;
}

.thanks-modal-close:hover {
    color: #333;
    background: #f5f5f5;
}

.thanks-modal-body {
    padding: 30px;
    flex: 1;
    overflow-y: auto;
    text-align: center;
}

.thanks-modal-body h1,
.thanks-modal-body h2,
.thanks-modal-body h3 {
    color: #2c3e50;
    margin-bottom: 1em;
}

.thanks-modal-body p {
    color: #555;
    line-height: 1.6;
    margin-bottom: 1em;
}

.thanks-modal-body img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 1em 0;
}

.thanks-modal-footer {
    padding: 20px 30px;
    text-align: center;
    border-top: 1px solid #f0f0f0;
    background: #fafafa;
    flex-shrink: 0;
}

.thanks-modal-close-btn {
    background: #4299e1;
    color: white;
    padding: 12px 30px;
    border: none;
    border-radius: 25px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 2px 10px rgba(66, 153, 225, 0.3);
}

.thanks-modal-close-btn:hover {
    background: #3182ce;
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(66, 153, 225, 0.4);
}

.thanks-modal-close-btn:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(66, 153, 225, 0.4);
}

/* モーダル表示時のボディスクロール無効化 */
body.modal-open {
    overflow: hidden;
}

/* エラー状態のスタイル */
.interview-parts-form input.error,
.interview-parts-form textarea.error {
    border-color: #e53e3e;
    box-shadow: 0 0 0 3px rgba(229, 62, 62, 0.1);
}

/* モバイル対応 */
@media (max-width: 768px) {
    .interview-parts-form {
        padding: 1em;
        margin: 1em;
        max-width: calc(100vw - 2em);
        box-sizing: border-box;
    }
    
    .interview-parts-form .form-group {
        margin-bottom: 1.25em;
    }
    
    .interview-parts-form input[type="text"],
    .interview-parts-form textarea,
    .interview-parts-form input[type="file"] {
        box-sizing: border-box;
        max-width: 100%;
    }
    
    .interview-parts-form .file-input-label {
        padding: 1em;
        min-height: 90px;
    }
    
    .interview-parts-form .image-preview img {
        max-width: 150px;
        max-height: 150px;
    }
    

    
    .interview-parts-form .section-navigation {
        flex-direction: column;
        gap: 0.75em;
    }
    
    .interview-parts-form .section-navigation button {
        width: 100%;
        padding: 1em;
    }
    
    .interview-parts-form .confirmation-label {
        font-size: 1em;
        line-height: 1.5;
    }
}

@media (max-width: 480px) {
    .interview-parts-form {
        padding: 0.75em;
        margin: 0.5em;
    }
    
    .interview-parts-form .file-input-label {
        min-height: 70px;
        padding: 0.75em;
    }
    
    .interview-parts-form .file-input-text .file-icon {
        font-size: 1.2em;
    }
    
    .interview-parts-form .image-preview img {
        max-width: 120px;
        max-height: 120px;
    }
    
    /* モーダルのモバイル対応 */
    .thanks-modal-content {
        width: 95%;
        max-height: 85vh;
        margin: 20px;
    }
    
    .thanks-modal-body {
        padding: 20px;
    }
    
    .thanks-modal-footer {
        padding: 15px 20px;
    }
    
    .thanks-modal-close-btn {
        padding: 10px 25px;
        font-size: 14px;
    }
}