/* 
Theme Name: Hello Elementor Child
Theme URI: https://github.com/elementor/hello-theme-child/
Description: Hello Elementor Child is a child theme of Hello Elementor, created by Elementor team
Author: Elementor Team
Author URI: https://elementor.com/
Template: hello-elementor
Version: 2.0.0
Text Domain: hello-elementor-child
License: GNU General Public License v3 or later.
License URI: https://www.gnu.org/licenses/gpl-3.0.html
Tags: flexible-header, custom-colors, custom-menu, custom-logo, editor-style, featured-images, rtl-language-support, threaded-comments, translation-ready
*/

/* Multi-step Form Styles */

/* General form styling */
.survey-form-container {
    max-width: 800px;
    margin: 0 auto;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

.survey-form-title {
    text-align: center;
    margin-bottom: 30px;
    color: #333;
}

.survey-form {
    background: #fff;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* Progress bar */
.form-progress {
    margin-bottom: 30px;
}

.progress-container {
    background-color: #f0f0f0;
    border-radius: 5px;
    height: 10px;
    overflow: hidden;
    margin-bottom: 10px;
}

.progress-bar {
    background-color: #007bff;
    height: 100%;
    width: 20%; /* Default 20% for first step */
    transition: width 0.3s ease;
}

.step-indicator {
    text-align: center;
    font-size: 14px;
    color: #666;
}

/* Form steps */
.form-step {
    display: none; /* Hidden by default, shown by JS */
}

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

/* Step sections */
.form-section {
    margin-bottom: 25px;
    padding: 15px;
    border: 1px solid #ddd;
    background-color: #fafafa;
    border-radius: 5px;
}

.form-section h3 {
    margin-top: 0;
    margin-bottom: 15px;
    color: #333;
    font-size: 18px;
}

/* Form fields */
.form-row {
    margin-bottom: 15px;
}

label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: #333;
}

.wpcf7-form input[type="text"],
.wpcf7-form input[type="email"],
.wpcf7-form input[type="tel"],
.wpcf7-form input[type="number"],
.wpcf7-form input[type="date"],
.wpcf7-form select,
.wpcf7-form textarea {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: #fff;
    font-size: 14px;
}

.wpcf7-form-control-wrap {
    display: block;
    margin-bottom: 10px;
}

/* Radio and checkbox styles */
.wpcf7-radio,
.wpcf7-checkbox {
    display: block;
}

.wpcf7-list-item {
    display: block;
    margin: 0 0 8px 0;
}

.wpcf7-list-item label {
    display: flex;
    align-items: center;
    font-weight: normal;
}

.wpcf7-list-item input[type="radio"],
.wpcf7-list-item input[type="checkbox"] {
    margin-right: 8px;
}

/* Navigation buttons */
.form-navigation {
    display: flex;
    justify-content: space-between;
    margin-top: 20px;
}

.step-nav button {
    padding: 10px 20px;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.2s;
}

.step-nav button:hover {
    background-color: #0069d9;
}

.step-nav button:disabled {
    background-color: #cccccc;
    cursor: not-allowed;
}

.submit-form {
    background-color: #4caf50;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
    transition: background-color 0.3s ease;
}

.submit-form:hover {
    background-color: #45a049;
}

/* Children info section */
#children-info-container {
    margin-bottom: 20px;
}

.child-entry {
    padding: 15px;
    margin-bottom: 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    background-color: #f9f9f9;
    position: relative;
}

.gender-field,
.age-type-field,
.age-field,
.birth-field {
    margin-bottom: 10px;
}

.remove-child {
    background-color: #dc3545;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 5px 10px;
    cursor: pointer;
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 12px;
}

.remove-child:hover {
    background-color: #c82333;
}

#add-child {
    display: block;
    width: 100%;
    padding: 8px;
    background-color: #6c757d;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    margin-top: 10px;
    transition: background-color 0.2s;
}

#add-child:hover {
    background-color: #5a6268;
}

/* Agreement section */
.agreement-section label {
    display: flex;
    align-items: flex-start;
}

.agreement-section input[type="checkbox"] {
    margin-top: 5px;
    margin-right: 10px;
}

/* Email Verification Page Styles */
.email-verification-container {
    max-width: 600px;
    margin: 40px auto;
    padding: 30px;
    background-color: #ffffff;
    border-radius: 8px;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.email-verification-title {
    color: #333;
    margin-bottom: 20px;
    font-size: 24px;
}

.email-verification-description {
    margin-bottom: 25px;
    color: #555;
    line-height: 1.6;
}

.email-verification-form {
    margin-bottom: 20px;
}

.email-verification-form input[type="email"] {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
    margin-bottom: 15px;
}

#submit-email {
    background-color: #4CAF50;
    color: white;
    border: none;
    padding: 12px 24px;
    font-size: 16px;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s;
    width: 100%;
}

#submit-email:hover {
    background-color: #45a049;
}

#message-container {
    margin-top: 20px;
    padding: 15px;
    border-radius: 4px;
}

#message-container .success {
    color: #155724;
    background-color: #d4edda;
    border: 1px solid #c3e6cb;
    padding: 15px;
    border-radius: 4px;
}

#message-container .error {
    color: #721c24;
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    padding: 15px;
    border-radius: 4px;
}

#message-container .info {
    color: #0c5460;
    background-color: #d1ecf1;
    border: 1px solid #bee5eb;
    padding: 15px;
    margin-top: 10px;
    border-radius: 4px;
}

#message-container .pending {
    color: #856404;
    background-color: #fff3cd;
    border: 1px solid #ffeeba;
    padding: 15px;
    border-radius: 4px;
}

/* Loading spinner */
.loader {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #3498db;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    animation: spin 1s linear infinite;
    margin: 15px auto;
}

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

/* Cancel button */
.cancel-btn {
    background-color: #6c757d;
    color: white;
    border: none;
    padding: 8px 16px;
    margin-top: 15px;
    font-size: 14px;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.cancel-btn:hover {
    background-color: #5a6268;
}

/* Validation styles */
.validation-error {
    border: 1px solid #ff0000 !important;
    background-color: #fff8f8 !important;
}

.custom-error {
    color: #ff0000;
    font-size: 0.8rem;
    margin-top: 5px;
    display: block;
}

/* Responsive styles */
@media screen and (max-width: 768px) {
    .survey-form-container,
    .email-verification-container {
        padding: 15px;
    }
    
    .step-nav button {
        padding: 8px 15px;
        font-size: 14px;
    }
    
    .form-section {
        padding: 12px;
    }
    
    .wpcf7-form input,
    .wpcf7-form select,
    .wpcf7-form textarea {
        font-size: 16px; /* Better for mobile input */
    }
}

/* Other input fields */
.other-input {
    display: none;
    margin-top: 8px;
}

/* JA name selection */
#ja-name-other-wrap {
    display: none;
    margin-top: 10px;
}

/* Success message */
#form-success-message {
    display: none;
    padding: 15px;
    background-color: #dff0d8;
    border: 1px solid #d6e9c6;
    color: #3c763d;
    border-radius: 4px;
    margin-bottom: 20px;
    text-align: center;
    font-weight: bold;
}

/* Thank you page styles */
.thanks-container {
    max-width: 700px;
    margin: 40px auto;
    padding: 30px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.thanks-title {
    color: #28a745;
    margin-bottom: 25px;
    font-size: 28px;
}

.thanks-message {
    margin-bottom: 30px;
    line-height: 1.6;
}

.thanks-message p {
    margin-bottom: 15px;
}

.thanks-navigation {
    margin-top: 30px;
}

.home-button {
    display: inline-block;
    padding: 12px 25px;
    background-color: #007bff;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    font-weight: 500;
    transition: background-color 0.2s;
}

.home-button:hover {
    background-color: #0069d9;
    color: white;
    text-decoration: none;
}

/* Email verification notes */
.email-verification-notes {
    margin-top: 25px;
    padding-top: 15px;
    border-top: 1px solid #eee;
    color: #666;
    font-size: 14px;
    text-align: left;
}

.email-verification-notes p {
    margin-bottom: 5px;
}

.email-verification-form small {
    display: block;
    margin-top: -10px;
    margin-bottom: 15px;
    color: #666;
    font-size: 12px;
    text-align: left;
}

.required {
    color: #000;
    font-weight: bold;
}

/* 確認画面のスタイル */
#form-summary {
    margin: 20px 0;
    padding: 15px;
    background-color: #f9f9f9;
    border: 1px solid #e0e0e0;
    border-radius: 5px;
}

.summary-section {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px dashed #ccc;
}

.summary-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.summary-section h4 {
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 1.1rem;
    color: #333;
}

.summary-section p {
    margin: 8px 0;
    line-height: 1.5;
}

/* 隠された CF7 フィールド */
.hidden-cf7-fields {
    position: absolute;
    visibility: hidden;
    height: 0;
    overflow: hidden;
}
