/* Contact Form - Google Forms Style */

/* Form Container */
.contact-form {
    width: 100%;
    margin: 0;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 48px 40px;
}

@media (max-width: 768px) {
    .contact-form {
        padding: 32px 24px;
        margin: 0;
        border-radius: 4px;
    }
}

/* Form Instructions */
.form-instructions {
    margin-bottom: 32px;
    padding: 16px 20px;
    background: #f8f9fa;
    border-left: 4px solid #4285f4;
    border-radius: 4px;
}

.form-instructions p {
    margin: 0;
    line-height: 1.5;
    color: #5f6368;
}

.required-note {
    display: inline-flex;
    align-items: center;
    font-size: 14px;
    color: #d93025;
    margin-bottom: 24px;
}

.required-marker {
    background: #d93025;
    color: white;
    font-size: 12px;
    padding: 2px 6px;
    border-radius: 3px;
    margin-right: 8px;
    font-weight: 500;
}

/* Form Groups */
.contact-form .form-group {
    margin-bottom: 64px !important; /* 32px × 2 = 64px, Bootstrap CSSを上書き */
    position: relative;
}

.contact-form .form-group-name {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 64px !important; /* 他の項目と同じ余白 */
}

/* form-group-name内のform-groupの下余白を無効化 */
.contact-form .form-group-name .form-group {
    margin-bottom: 0 !important;
}

@media (max-width: 768px) {
    .contact-form .form-group {
        margin-bottom: 48px !important; /* SP用：少し小さめに */
    }
    
    .contact-form .form-group-name {
        grid-template-columns: 1fr;
        gap: 24px;
        margin-bottom: 48px !important; /* SP用：少し小さめに */
    }
}

/* Labels */
.form-label {
    display: block;
    font-size: 18px;
    font-weight: bold;
    color: #202124;
    margin-bottom: 8px;
    line-height: 1.4;
}

@media (max-width: 768px) {
    .form-label {
        font-size: 16px;
    }
}

/* 必須マークはHTMLで直接指定するためCSSは削除 */

/* Input Fields */
.form-input {
    width: 100%;
    padding: 16px 16px 16px 16px;
    border: 1px solid #dadce0;
    border-radius: 4px;
    font-size: 16px;
    line-height: 1.5;
    background: #fff;
    transition: all 0.2s ease;
    box-sizing: border-box;
    font-family: inherit;
}

.form-input:focus {
    outline: none;
    border-color: #4285f4;
    box-shadow: 0 0 0 2px rgba(66, 133, 244, 0.2);
}

.form-input:hover:not(:focus) {
    border-color: #5f6368;
}

.form-input::placeholder {
    color: #9aa0a6;
}

/* Textarea */
.form-textarea {
    width: 100%;
    min-height: 120px;
    padding: 16px;
    border: 1px solid #dadce0;
    border-radius: 4px;
    font-size: 16px;
    line-height: 1.5;
    background: #fff;
    transition: all 0.2s ease;
    box-sizing: border-box;
    font-family: inherit;
    resize: vertical;
}

.form-textarea:focus {
    outline: none;
    border-color: #4285f4;
    box-shadow: 0 0 0 2px rgba(66, 133, 244, 0.2);
}

.form-textarea:hover:not(:focus) {
    border-color: #5f6368;
}

/* Radio Buttons */
.radio-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.radio-item {
    display: flex;
    align-items: center;
    cursor: pointer;
    transition: background-color 0.2s ease;
    padding: 8px 12px;
    border-radius: 4px;
}

.radio-item:hover {
    background-color: #f8f9fa;
}

.radio-input {
    width: 20px;
    height: 20px;
    margin-right: 12px;
    cursor: pointer;
    accent-color: #4285f4;
}

.radio-label {
    font-size: 16px;
    color: #202124;
    cursor: pointer;
    line-height: 1.4;
}

/* Helper Text */
.helper-text {
    font-size: 16px;
    color: #5f6368;
    margin-top: 4px;
    line-height: 1.3;
}

@media (max-width: 768px) {
    .helper-text {
        font-size: 14px;
    }
}

/* Error Messages */
.error-message {
    font-size: 16px;
    color: #d93025;
    margin-top: 4px;
    line-height: 1.3;
    display: block; /* デフォルトで表示 */
    position: relative;
    padding-left: 24px; /* アイコン分のスペース */
}

.error-message::before {
    content: "\f071"; /* Font Awesome exclamation-triangle */
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    position: absolute;
    left: 0;
    top: 0;
    color: #d93025;
    font-size: 14px;
}

@media (max-width: 768px) {
    .error-message {
        font-size: 14px;
        padding-left: 20px; /* スマホでは少し小さめ */
    }
    
    .error-message::before {
        font-size: 12px;
    }
}

.error-message:empty {
    display: none; /* 内容が空の場合は非表示 */
}

.error-message.show {
    display: block;
}

/* エラー時のハイライト */
.form-input.error,
.form-textarea.error {
    border-color: #d93025 !important;
    box-shadow: 0 0 0 2px rgba(217, 48, 37, 0.2) !important;
    background-color: #fef9f9;
}

.form-input.error:focus,
.form-textarea.error:focus {
    border-color: #d93025 !important;
    box-shadow: 0 0 0 2px rgba(217, 48, 37, 0.3) !important;
}

/* ラジオボタングループのエラー時 */
.contact-form .radio-group.error {
    background-color: #fef9f9;
    border: 1px solid #d93025;
    border-radius: 4px;
    padding: 8px;
}

/* フォームグループ全体のエラー時 */
.contact-form .form-group.error .form-label {
    color: #d93025;
}

.contact-form .form-group.error .form-label .required-marker {
    background: #b71c1c;
}

/* Submit Section */
.submit-section {
    margin-top: 48px;
    text-align: center;
}

.submit-description {
    font-size: 14px;
    color: #5f6368;
    margin-bottom: 24px;
    line-height: 1.4;
}

.submit-buttons {
    display: flex;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
}

.btn-primary {
    background: #4285f4;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 140px;
    text-transform: none;
}

.btn-primary:hover {
    background: #3367d6;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.btn-primary:active {
    background: #2851a3;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.btn-secondary {
    background: #fff;
    color: #5f6368;
    border: 1px solid #dadce0;
    padding: 12px 24px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 140px;
    text-transform: none;
}

.btn-secondary:hover {
    background: #f8f9fa;
    border-color: #5f6368;
}

.btn-secondary:active {
    background: #f1f3f4;
}

/* Confirmation Page Styles */
.confirmation-item {
    display: flex;
    margin-bottom: 24px;
    padding: 16px 0;
    border-bottom: 1px solid #e8eaed;
}

.confirmation-item:last-child {
    border-bottom: none;
}

.confirmation-label {
    font-weight: 500;
    color: #202124;
    min-width: 140px;
    margin-right: 24px;
    flex-shrink: 0;
}

.confirmation-value {
    color: #5f6368;
    flex: 1;
    line-height: 1.5;
    word-break: break-word;
}

@media (max-width: 600px) {
    .confirmation-item {
        flex-direction: column;
        gap: 8px;
    }
    
    .confirmation-label {
        min-width: auto;
        margin-right: 0;
    }
}

/* Hide legacy table styles */
#inquiry2_waku.common_line_tbl,
.inquiry2 {
    display: none;
}

/* Error message container */
.global-error {
    background: #fce8e6;
    border: 1px solid #d93025;
    border-radius: 4px;
    padding: 16px;
    margin-bottom: 24px;
    display: none;
    position: relative;
    padding-left: 48px; /* アイコン分のスペース */
}

.global-error::before {
    content: "\f06a"; /* Font Awesome exclamation-circle */
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #d93025;
    font-size: 20px;
}

.global-error.show {
    display: block;
}

.global-error-text {
    color: #d93025;
    font-size: 14px;
    font-weight: 500;
    margin: 0;
}

@media (max-width: 768px) {
    .global-error {
        padding-left: 40px;
    }
    
    .global-error::before {
        left: 12px;
        font-size: 18px;
    }
}

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

.contact-form .form-group {
    animation: fadeIn 0.3s ease-out;
}

/* Focus improvements */
.form-input:focus,
.form-textarea:focus {
    transform: translateY(-1px);
}

/* Loading state */
.btn-primary:disabled {
    background: #dadce0;
    color: #9aa0a6;
    cursor: not-allowed;
}

.btn-primary:disabled:hover {
    background: #dadce0;
    box-shadow: none;
} 