/* Contact Form Styles - Matching A.R.S Site Design */

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

/* Form Container - matches privacy policy structure */
.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 - must be 12px on PC */
    .contact-form-container > p .form-note-text {
        font-size: 12px !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 - 12px for both PC and mobile */
.contact-form-container > p .form-note-text,
.contact-form-container .form-note-text,
.form-note-text {
    font-size: 12px !important;
}

/* PC specific - ensure form note text is 12px */
@media only screen and (min-width: 768px) {
    .contact-form-container > p .form-note-text,
    .contact-form-container .form-note-text,
    .form-note-text {
        font-size: 12px !important;
    }
}

/* Mobile specific - ensure form note text is 12px */
@media only screen and (max-width: 767px) {
    .contact-form-container > p .form-note-text,
    .contact-form-container .form-note-text,
    .form-note-text {
        font-size: 12px !important;
    }
}

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

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

/* Full width fields (company, email, subject, message, privacy policy) */
@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 label styling */
@media only screen and (min-width: 768px) {
    label {
        font-size: 1rem;
    }
}

.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', 'Lato', 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 input styling */
@media only screen and (min-width: 768px) {
    input[type="text"],
    input[type="email"],
    textarea,
    select {
        font-size: 1rem;
        padding: 12px 16px;
    }
}

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(29, 32, 136, 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;
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
    text-align: center;
    text-decoration: none;
    font-family: 'Noto Sans JP', 'Lato', 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(29, 32, 136, 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;
    }
}

/* Captcha */
.captcha-group {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.captcha-img {
    border-radius: var(--radius);
    border: 1px solid var(--border-color);
    cursor: pointer;
}

/* 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;
}

/* PC specific confirm page styling */
@media only screen and (min-width: 768px) {
    .confirm-row .label {
        font-size: 0.9rem;
    }
    
    .confirm-row .value {
        font-size: 1rem;
        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;
    }

    .confirm-row .value {
        width: 70%;
    }
}

/* 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) {
    .contact-form-container {
        padding: 0 15px;
        width: 100%;
        max-width: 100%;
    }
    
    .contact-form-container h1 {
        font-size: 1.4rem;
    }
    
    .contact-form-container > p {
        font-size: 0.9rem;
    }
    
    .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;
    }
    
    .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;
    }
    
    .btn.ars-btn.btn-2 {
        width: 100% !important;
        max-width: 100% !important;
        height: 48px !important;
        min-height: 48px !important;
        max-height: 48px !important;
        font-size: 0.95rem !important;
        padding: 0 20px !important;
        line-height: 1 !important;
        box-sizing: border-box !important;
    }
    
    .captcha-group {
        flex-direction: column;
        align-items: stretch;
    }
    
    .captcha-img {
        width: 100%;
        max-width: 200px;
        margin: 0 auto 1rem;
    }
    
    .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;
}

/* Privacy Policy link in checkbox */
.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;
    }
}
