/* Contact Form Styles - Matching Matthew合同会社 Site Design */

:root {
    --primary-color: #E4405F;
    --primary-hover: #c7354f;
    --bg-color: #ffffff;
    --text-color: #303030;
    --text-light: #707070;
    --border-color: #e0e0e0;
    --error-color: #e60012;
    --success-color: #10b981;
    --radius: 3px;
}

/* High specificity override for form note text - must come first */
.module .matt-image-content .contact-form-container > p .form-note-text,
.module .contact-form-container > p .form-note-text,
.matt-image-content .contact-form-container > p .form-note-text,
body .module .contact-form-container > p .form-note-text {
    font-size: 14px !important;
    line-height: 1.6 !important;
}

/* Form Container */
.contact-form-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 0;
    text-align: left;
    width: 100%;
}

.contact-form-container h1 {
    font-size: 1.6rem;
    color: #111;
    text-align: center;
    margin-bottom: 1rem;
    font-weight: bold;
}

.contact-form-container > p {
    text-align: center;
    color: #707070;
    margin-bottom: 2rem;
    font-size: 1rem;
}

/* PC specific styles */
@media only screen and (min-width: 768px) {
    .contact-form-container {
        padding: 0;
    }
    
    .contact-form-container h1 {
        font-size: 1.6rem;
    }
    
    .contact-form-container > p {
        font-size: 1rem;
    }
    
    /* Override for form note text - larger size on PC */
    .contact-form-container > p .form-note-text,
    .module .contact-form-container > p .form-note-text,
    .matt-image-content .contact-form-container > p .form-note-text,
    .module .matt-image-content .contact-form-container > p .form-note-text {
        font-size: 14px !important;
    }
}

/* Mobile specific styles */
@media only screen and (max-width: 767px) {
    .contact-form-container {
        padding: 0 15px !important;
        width: 100% !important;
        max-width: 100% !important;
        display: block !important;
    }
    
    .contact-form-container h1 {
        font-size: 1.4rem;
    }
    
    .contact-form-container > p {
        font-size: 12px;
    }
    
    .form-group {
        margin-bottom: 1.2rem;
    }
    
    label {
        font-size: 0.9rem;
    }
    
    input[type="text"],
    input[type="email"],
    textarea,
    select {
        font-size: 0.9rem;
        padding: 10px 14px;
    }
}

/* Form note text styling - larger size for better readability */
.contact-form-container > p .form-note-text,
.contact-form-container .form-note-text,
.form-note-text,
.module .contact-form-container > p .form-note-text,
.matt-image-content .contact-form-container > p .form-note-text,
.module .matt-image-content .contact-form-container > p .form-note-text {
    font-size: 14px !important;
}

/* Form Styles */
.contact-form {
    background: var(--bg-color);
    padding: 0;
}

.form-group {
    margin-bottom: 1.5rem;
}

/* Full width fields */
@media (min-width: 768px) {
    .form-group:not(.half-width) {
        width: 100% !important;
        flex: 0 0 100% !important;
        max-width: 100% !important;
    }
}

label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-color);
    font-size: 1rem;
}

/* PC specific - larger labels and inputs */
@media only screen and (min-width: 768px) {
    label {
        font-size: 1.3rem !important;
    }
    
    input[type="text"],
    input[type="email"],
    textarea,
    select {
        font-size: 1.3rem !important;
    }
    
    .btn,
    button {
        font-size: 1.3rem !important;
    }
}

.required {
    color: var(--error-color);
    margin-left: 4px;
}

input[type="text"],
input[type="email"],
textarea,
select {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    font-family: 'Noto Sans JP', 'Inter', sans-serif;
    font-size: 1rem;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    box-sizing: border-box;
    background-color: #fff;
    color: var(--text-color);
    max-width: 100%;
}

/* PC specific - ensure inputs are larger */
@media only screen and (min-width: 768px) {
    .contact-form-container input[type="text"],
    .contact-form-container input[type="email"],
    .contact-form-container textarea,
    .contact-form-container select,
    .module .contact-form-container input[type="text"],
    .module .contact-form-container input[type="email"],
    .module .contact-form-container textarea,
    .module .contact-form-container select {
        font-size: 1.3rem !important;
        padding: 14px 18px !important;
    }
    
    .contact-form-container label,
    .module .contact-form-container label {
        font-size: 1.3rem !important;
    }
    
    .contact-form-container .btn,
    .contact-form-container button,
    .module .contact-form-container .btn,
    .module .contact-form-container button {
        font-size: 1.3rem !important;
    }
}

input[type="text"]:focus,
input[type="email"]:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(228, 64, 95, 0.1);
}

textarea {
    min-height: 120px;
    resize: vertical;
}

/* Half-width fields */
.form-group.half-width {
    width: 100%;
    margin-bottom: 1.5rem;
    box-sizing: border-box;
}

@media (min-width: 768px) {
    .form-group.half-width {
        flex: 0 0 calc((100% - 30px) / 2) !important;
        max-width: calc((100% - 30px) / 2) !important;
        width: calc((100% - 30px) / 2) !important;
        margin-bottom: 1.5rem !important;
        box-sizing: border-box !important;
    }
}

/* Error Messages */
.error {
    color: var(--error-color);
    font-size: 0.875rem;
    margin-top: 0.5rem;
    display: block;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: var(--primary-color);
    color: white;
    padding: 0 30px;
    border: none;
    border-radius: var(--radius);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
}

/* PC specific - larger button text and height */
@media only screen and (min-width: 768px) {
    .btn {
        font-size: 1.3rem !important;
        height: 60px !important;
        padding: 0 40px !important;
    }
}
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
    text-align: center;
    text-decoration: none;
    font-family: 'Noto Sans JP', 'Inter', sans-serif;
    min-width: 160px;
    height: 50px;
    line-height: 1;
    white-space: nowrap;
}

.btn:hover {
    background-color: var(--primary-hover);
    box-shadow: 0 6px 50px 8px rgba(228, 64, 95, 0.15);
    color: #ffffff;
}

.btn-secondary {
    background-color: #707070;
}

.btn-secondary:hover {
    background-color: #505050;
}

.actions {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
    justify-content: center;
}

.actions .btn {
    flex: 1;
    max-width: 200px;
}

/* PC specific button styling */
@media only screen and (min-width: 768px) {
    .actions {
        gap: 1.5rem;
    }
    
    .actions .btn {
        max-width: 220px;
    }
}

/* Confirm Page */
.confirm-details {
    text-align: left;
    margin: 2rem 0;
}

.confirm-row {
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 0;
    display: flex;
    flex-direction: column;
}

.confirm-row:last-child {
    border-bottom: none;
}

.confirm-row .label {
    font-weight: 600;
    color: var(--text-light);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.confirm-row .value {
    color: var(--text-color);
    font-size: 1rem;
    word-break: break-word;
    line-height: 1.6;
}

@media (min-width: 768px) {
    .confirm-row {
        flex-direction: row;
        justify-content: space-between;
        align-items: flex-start;
    }

    .confirm-row .label {
        width: 30%;
        margin-bottom: 0;
        padding-right: 2rem;
        font-size: 1.3rem !important;
    }

    .confirm-row .value {
        width: 70%;
        font-size: 1.3rem !important;
    }
}

/* Thanks Page */
.thanks-message {
    text-align: center;
    padding: 2rem 0;
}

.check-icon {
    color: var(--success-color);
    font-size: 4rem;
    margin-bottom: 1rem;
    font-weight: bold;
}

.thanks-message h1 {
    margin-bottom: 1rem;
}

.thanks-message p {
    color: var(--text-color);
    margin-bottom: 0.5rem;
}

.thanks-message .btn {
    margin-top: 2rem;
}

/* Mobile specific styles */
@media only screen and (max-width: 767px) {
    .actions {
        flex-direction: column;
        gap: 1rem;
        margin-top: 2rem;
    }
    
    .actions .btn {
        max-width: 100% !important;
        width: 100% !important;
        min-width: auto !important;
        height: 48px !important;
        min-height: 48px !important;
        max-height: 48px !important;
        font-size: 0.95rem !important;
        padding: 0 20px !important;
        border-radius: 3px !important;
        line-height: 1 !important;
        box-sizing: border-box !important;
    }
    
    .confirm-row {
        flex-direction: column;
    }
    
    .confirm-row .label {
        width: 100%;
        margin-bottom: 0.5rem;
        font-size: 0.85rem;
    }
    
    .confirm-row .value {
        width: 100%;
        font-size: 0.9rem;
    }
    
    .thanks-message {
        padding: 1rem 0;
    }
    
    .check-icon {
        font-size: 3rem;
    }
}

/* Badge styles */
.required-badge,
.optional-badge {
    font-size: 0.75rem;
    padding: 2px 6px;
    border-radius: 4px;
    margin-left: 8px;
    vertical-align: middle;
}

.required-badge {
    background-color: var(--error-color);
    color: white;
}

.optional-badge {
    background-color: #9ca3af;
    color: white;
}

/* Checkbox styling */
.checkbox-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-weight: normal;
}

.checkbox-label input[type="checkbox"] {
    width: auto;
    margin-right: 8px;
    cursor: pointer;
}

.checkbox-label a {
    color: var(--primary-color);
    text-decoration: underline;
    transition: color 0.3s ease;
}

.checkbox-label a:hover {
    color: var(--primary-hover);
    text-decoration: underline;
}

/* Mobile checkbox - larger size for better touch interaction */
@media only screen and (max-width: 767px) {
    .checkbox-label input[type="checkbox"] {
        width: 20px !important;
        height: 20px !important;
        min-width: 20px !important;
        min-height: 20px !important;
        margin-right: 10px !important;
        cursor: pointer;
        flex-shrink: 0;
    }
    
    .checkbox-label,
    .checkbox-label *,
    .form-group .checkbox-label {
        font-size: 12px !important;
        line-height: 1.5;
    }
}

/* PC checkbox - larger size for better visibility */
@media only screen and (min-width: 768px) {
    .checkbox-label input[type="checkbox"] {
        width: 20px !important;
        height: 20px !important;
        min-width: 20px !important;
        min-height: 20px !important;
        margin-right: 10px !important;
        cursor: pointer;
        flex-shrink: 0;
    }
    
    .checkbox-label {
        font-size: 1rem;
        line-height: 1.5;
    }
}

/* Form grid */
.form-grid {
    display: block;
    width: 100%;
    box-sizing: border-box;
}

@media (min-width: 768px) {
    .form-grid {
        display: flex !important;
        flex-wrap: wrap !important;
        gap: 0 30px !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }
}

/* Ensure form is visible on mobile */
@media only screen and (max-width: 767px) {
    .form-grid {
        display: block !important;
        width: 100% !important;
    }
    
    .contact-form {
        width: 100% !important;
        display: block !important;
    }
}

/* Section title styling */
.section-title {
    font-family: 'Noto Sans JP', sans-serif;
    font-weight: 700;
    color: #333;
}

.title-underline {
    width: 60px;
    height: 3px;
    background: var(--primary-color);
    margin: 0 auto 2rem;
}

/* Final override with maximum specificity for form note text on PC */
@media only screen and (min-width: 768px) {
    body .module .matt-image-content .contact-form-container > p .form-note-text,
    body .module .contact-form-container > p .form-note-text,
    body .matt-image-content .contact-form-container > p .form-note-text,
    .module .matt-image-content .contact-form-container > p .form-note-text,
    .module .contact-form-container > p .form-note-text,
    .matt-image-content .contact-form-container > p .form-note-text,
    .contact-form-container > p .form-note-text,
    .contact-form-container .form-note-text,
    .form-note-text {
        font-size: 14px !important;
        line-height: 1.6 !important;
    }
}

/* Ensure reCAPTCHA v3 badge is visible */
.grecaptcha-badge,
#recaptcha-badge {
    visibility: visible !important;
    opacity: 1 !important;
    display: flex !important;
    z-index: 99999 !important;
    position: fixed !important;
    bottom: 14px !important;
    right: 14px !important;
    pointer-events: auto !important;
}
