/* ==========================================
   Contact Form Page - Complete Styling
   ========================================== */

/* Contact Form Section */
.contact-form-section {
    padding: 80px 40px 100px;
    min-height: calc(100vh - 400px);
}

.contact-container {
    max-width: 900px;
    margin: 0 auto;
}

/* Section Header */
.section-header {
    text-align: center;
    margin-bottom: 50px;
}

.section-title-en {
    display: block;
    font-size: 0.875rem;
    font-weight: 700;
    color: #9DCC01;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    margin-bottom: 12px;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 20px;
    line-height: 1.3;
}

.section-subtitle {
    font-size: .8rem;
    color: #555555;
    line-height: 1.8;
    margin-top: 16px;
    margin-bottom: 28px;
}

/* Form Wrapper */
.form-wrapper {
    background: white;
    border-radius: 16px;
    padding: 60px;
    box-shadow:
        0 4px 6px rgba(0, 0, 0, 0.02),
        0 10px 20px rgba(0, 0, 0, 0.03),
        0 20px 40px rgba(0, 0, 0, 0.04);
    transition: box-shadow 0.3s ease;
}

.form-wrapper:hover {
    box-shadow:
        0 4px 6px rgba(0, 0, 0, 0.03),
        0 10px 20px rgba(0, 0, 0, 0.05),
        0 20px 40px rgba(0, 0, 0, 0.06);
}

/* Contact Form */
.contact-form {
    display: flex;
    flex-direction: column;
    gap: 22px;
}

/* Form Groups */
.form-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
    transition: all 0.3s ease;
}

.form-group.focused .form-label {
    color: #9DCC01;
}

.form-group.filled .form-input,
.form-group.filled .form-textarea {
    background: #FAFFFE;
}

/* Form Labels */
.form-label {
    font-size: 0.9375rem;
    font-weight: 600;
    color: #1a1a1a;
    letter-spacing: 0.02em;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: color 0.3s ease;
}

.form-label svg {
    stroke: currentColor;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.form-group.focused .form-label svg {
    stroke: #9DCC01;
    transform: scale(1.1);
}

.form-label.required::after {
    content: '*';
    color: #EF4444;
    font-weight: 700;
    font-size: 1.125rem;
    margin-left: 2px;
}

/* Form Inputs */
.form-input,
.form-textarea {
    width: 100%;
    padding: 16px 20px;
    border: 2px solid #E8E8E8;
    border-radius: 10px;
    font-size: 1rem;
    font-family: 'Helvetica Neue', Arial, 'Hiragino Sans', sans-serif;
    color: #1a1a1a;
    background: white;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    outline: none;
}

.form-input:hover,
.form-textarea:hover {
    border-color: #B8E033;
}

.form-input:focus,
.form-textarea:focus {
    border-color: #9DCC01;
    box-shadow:
        0 0 0 4px rgba(157, 204, 1, 0.1),
        0 2px 8px rgba(157, 204, 1, 0.15);
    background: #fafffe;
}

.form-input::placeholder,
.form-textarea::placeholder {
    color: #AAAAAA;
    opacity: 1;
}

/* Textarea Specific */
.form-textarea {
    min-height: 180px;
    resize: vertical;
    line-height: 1.7;
    font-family: inherit;
}

/* Error Messages */
.error-message {
    font-size: 0.875rem;
    color: #EF4444;
    font-weight: 500;
    display: block;
    margin-top: 6px;
    min-height: 20px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.error-message:not(:empty) {
    opacity: 1;
}

/* Submit Error Message (above button) */
.error-message.submit-error {
    text-align: center;
    font-size: 0.9375rem;
    font-weight: 600;
    margin: 0 0 16px 0;
    padding: 12px 20px;
    background: #FEF2F2;
    border: 1px solid #FECACA;
    border-radius: 8px;
    min-height: auto;
}

.error-message.submit-error:empty {
    display: none;
}

/* Privacy Policy Section */
.form-group.privacy-policy {
    margin-top: 8px;
}

.policy-box {
    border: 2px solid #E8E8E8;
    border-radius: 12px;
    padding: 32px;
    max-height: 420px;
    overflow-y: auto;
    transition: border-color 0.3s ease;
}

.policy-box::-webkit-scrollbar {
    width: 8px;
}

.policy-box::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.policy-box::-webkit-scrollbar-thumb {
    background: #9DCC01;
    border-radius: 10px;
}

.policy-box::-webkit-scrollbar-thumb:hover {
    background: #7AA201;
}

.policy-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 20px;
    padding-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 10px;
    border-bottom: 0;
}

.policy-title::before {
    font-size: 1.5rem;
}

.policy-content h4 {
    font-size: 1rem;
    font-weight: 600;
    color: #1a1a1a;
    margin: 24px 0 12px 0;
    padding-left: 12px;
}

.policy-content p {
    font-size: 0.9375rem;
    line-height: 1.8;
    color: #555555;
    margin-bottom: 14px;
}

.policy-content ul {
    list-style: none;
    padding-left: 0;
    margin: 12px 0;
}

.policy-content li {
    font-size: 0.9375rem;
    line-height: 1.8;
    margin-bottom: 8px;
    padding-left: 28px;
    position: relative;
}

.policy-content li::before {
    content: '・';
    position: absolute;
    left: 8px;
    font-weight: 700;
}

/* Agree Group (Checkbox) */
.agree-group {
    margin-top: 24px;
    padding: 20px;
    background: #F9FAFB;
    border-radius: 10px;
    transition: all 0.3s ease;
    text-align: center;
}

.agree-group:has(.form-checkbox:checked) {
    background: #F7FCE8;
    border-color: #9DCC01;
}

.checkbox-label {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    cursor: pointer;
    user-select: none;
    position: relative;
}

/* Hide default checkbox */
.form-checkbox {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.checkbox-text {
    font-size: 1rem;
    color: #1a1a1a;
    font-weight: 600;
    line-height: 1.5;
    position: relative;
    padding-left: 38px;
}

/* Custom checkbox design - unchecked state */
.checkbox-text::before {
    content: '';
    position: absolute;
    left: 0;
    top: 45%;
    transform: translateY(-50%);
    width: 24px;
    height: 24px;
    border: 2px solid #E8E8E8;
    border-radius: 6px;
    background: white;
    transition: all 0.3s ease;
}

/* Checked state - green background */
.form-checkbox:checked + .checkbox-text::before {
    background: #9DCC01;
    border-color: #9DCC01;
}

/* White checkmark icon when checked */
.form-checkbox:checked + .checkbox-text::after {
    content: '';
    position: absolute;
    left: 10px;
    top: 42%;
    transform: translateY(-50%) rotate(45deg);
    width: 6px;
    height: 11px;
    border: solid white;
    border-width: 0 2.5px 2.5px 0;
}

/* reCAPTCHA Container */
.g-recaptcha {
    margin: 28px 0;
    display: flex;
    justify-content: center;
    padding: 20px;
    background: #F9FAFB;
    border-radius: 10px;
}

/* Submit Section */
.form-submit {
    display: flex;
    justify-content: center;
    margin-top:8px;
    padding-top: 24px;
    border-top: 2px solid #F0F0F0;
}

.submit-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 18px 56px;
    background: linear-gradient(135deg, #9DCC01 0%, #7AA201 100%);
    color: white;
    font-size: 1.0625rem;
    font-weight: 700;
    border: none;
    border-radius: 2px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow:
        0 4px 12px rgba(157, 204, 1, 0.3),
        0 8px 24px rgba(157, 204, 1, 0.2);
    letter-spacing: 0.08em;
    position: relative;
    overflow: hidden;
}

.submit-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.6s ease;
}


.submit-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.submit-button svg {
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.submit-button:hover svg {
    transform: translateX(6px);
}

/* Animations */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.contact-form-section.active {
    animation: slideIn 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Responsive Design */
@media (max-width: 768px) {
    .contact-form-section {
        padding: 50px 20px 60px;
    }

    .section-title {
        font-size: 2rem;
    }

    .form-wrapper {
        padding: 40px 28px;
        border-radius: 12px;
    }

    .contact-form {
        gap: 26px;
    }

    .form-input,
    .form-textarea {
        padding: 14px 18px;
        font-size: 0.9375rem;
    }

    .policy-box {
        padding: 24px;
        max-height: 320px;
    }

    .submit-button {
        width: 100%;
        padding: 18px 40px;
    }
}

@media (max-width: 480px) {

    .contact-form-section {
        padding: 40px 15px 50px;
    }

    .section-title {
        font-size: 1.75rem;
    }

    .section-subtitle {
        font-size: 0.9375rem;
    }

    .form-wrapper {
        padding: 30px 20px;
        border-radius: 10px;
    }

    .contact-form {
        gap: 12px;
    }

    .form-input,
    .form-textarea {
        padding: 13px 16px;
        font-size: 0.875rem;
        border-radius: 8px;
    }

    .form-textarea {
        min-height: 150px;
    }

    .policy-box {
        padding: 20px;
        max-height: 280px;
    }

    .policy-title {
        font-size: 1.125rem;
    }

    .policy-content h4 {
        font-size: 0.9375rem;
    }

    .policy-content p,
    .policy-content li {
        font-size: 0.875rem;
    }

    .agree-group {
        padding: 16px;
    }

    .checkbox-text {
        font-size: 0.8375rem;
    }

    .submit-button {
        padding: 16px 36px;
        font-size: 1rem;
    }
}

/* Confirmation Page Styles */
.confirm-content {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.confirm-item {
    border-bottom: 1px solid #E8E8E8;
    padding-bottom: 20px;
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 24px;
}

.confirm-item:last-of-type {
    border-bottom: 2px solid #F0F0F0;
    margin-bottom: 12px;
}

.confirm-label {
    font-size: 0.9375rem;
    font-weight: 600;
    color: #1a1a1a;
    letter-spacing: 0.02em;
    display: flex;
    align-items: flex-start;
    gap: 4px;
}

.confirm-label.required::after {
    content: '*';
    color: #EF4444;
    font-weight: 700;
    font-size: 1.125rem;
    margin-left: 2px;
}

.confirm-value {
    font-size: 1rem;
    color: #1a1a1a;
    line-height: 1.8;
    word-break: break-word;
    white-space: pre-wrap;
}

.confirm-buttons {
    display: flex;
    gap: 16px;
    justify-content: center;
    align-items: center;
    margin-top: 16px;
}

.back-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 18px 40px;
    background: white;
    color: #1a1a1a;
    font-size: 1.0625rem;
    font-weight: 700;
    border: 2px solid #E8E8E8;
    border-radius: 2px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    letter-spacing: 0.08em;
}

.back-button:hover {
    background: #F9FAFB;
    border-color: #9DCC01;
    color: #9DCC01;
}

.back-button svg {
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.back-button:hover svg {
    transform: translateX(-6px);
}

/* Thanks Page Styles */
.thanks-content {
    text-align: center;
    padding: 60px 40px;
}

.thanks-icon {
    display: flex;
    justify-content: center;
    margin-bottom: 32px;
}

.thanks-icon svg {
    stroke: #9DCC01;
    width: 80px;
    height: 80px;
}

.thanks-title {
    font-size: 2rem;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 24px;
    line-height: 1.4;
}

.thanks-message {
    font-size: 1rem;
    color: #555555;
    line-height: 1.8;
    margin-bottom: 48px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.submit-button[href] {
    text-decoration: none;
}

/* Responsive Adjustments for Confirm and Thanks Pages */
@media (max-width: 768px) {
    .confirm-item {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .confirm-buttons {
        flex-direction: column-reverse;
        gap: 12px;
    }

    .submit-button,
    .back-button {
        width: 100%;
    }

    .thanks-content {
        padding: 40px 20px;
    }

    .thanks-title {
        font-size: 1.75rem;
    }
}

@media (max-width: 480px) {
    .confirm-label,
    .confirm-value {
        font-size: 0.875rem;
    }

    .thanks-icon svg {
        width: 60px;
        height: 60px;
    }

    .thanks-title {
        font-size: 1.5rem;
    }

    .thanks-message {
        font-size: 0.9375rem;
    }
}

/* Print Styles */
@media print {
    .submit-button,
    .back-button,
    .g-recaptcha {
        display: none;
    }

    .form-wrapper {
        box-shadow: none;
        border: 1px solid #ddd;
    }

    .policy-box {
        max-height: none;
        border: 1px solid #ddd;
    }
}
