/* フォームコンテナ */
.form-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    font-family: 'Hiragino Sans', 'Hiragino Kaku Gothic Pro', 'Yu Gothic', 'Meiryo', sans-serif;
}

.form-wrapper {
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

/* パンくずリスト */
.form-breadcrumb {
    background: #dedede;
    color: rgb(66, 66, 66);
    padding: 20px;
    text-align: center;
}

.form-breadcrumb h2 {
    margin: 0;
    font-size: 1.8rem;
    font-weight: bold;
}

/* 商品画像 */
.form-product-image {
    text-align: center;
    padding: 30px 20px;
    background: #f8f9fa;
}

.form-product-img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* フォーム */
#form-contact {
    padding: 30px;
}

.form-table {
    width: 100%;
}

.form-row {
    display: flex;
    flex-wrap: wrap;
    margin-bottom: 25px;
    border-bottom: 1px solid #eee;
    padding-bottom: 20px;
}

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

.form-label {
    flex: 0 0 250px;
    padding: 12px 20px 12px 0;
}

.form-label label {
    font-weight: bold;
    font-size: 1.05rem;
    color: #333;
    display: block;
}

.form-input {
    flex: 1;
    min-width: 0;
    padding: 12px 0;
}

/* 必須マーク */
.form-required {
    color: #ff4757;
    font-weight: bold;
    margin-left: 5px;
}

/* 入力フィールド */
.form-input input[type="text"],
.form-input input[type="email"],
.form-input textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-size: 1rem;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.form-input input[type="text"]:focus,
.form-input input[type="email"]:focus,
.form-input select:focus,
.form-input textarea:focus {
    outline: none;
    border-color: #f47963;
    box-shadow: 0 0 0 3px rgba(244, 121, 99, 0.1);
}

.form-input input:invalid {
    border-color: #ff4757;
}

.form-input input:valid {
    border-color: #2ed573;
}

/* プレースホルダー */
.form-input input::placeholder,
.form-input textarea::placeholder {
    color: #999;
    font-style: italic;
}

/* セレクトボックス */
.form-input select {
    width: 100%;
    background: white;
    cursor: pointer;
}

/* テキストエリア */
.form-input textarea {
    resize: vertical;
    min-height: 120px;
    font-family: inherit;
}

/* チェックボックスグループ */
.form-checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.form-checkbox-item {
    display: flex;
    align-items: center;
    cursor: pointer;
    padding: 8px 0;
    position: relative;
}

.form-checkbox-item input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    width: 0;
    height: 0;
}

.form-checkmark {
    width: 20px;
    height: 20px;
    background: white;
    border: 2px solid #ddd;
    border-radius: 4px;
    margin-right: 12px;
    position: relative;
    transition: all 0.3s ease;
}

.form-checkbox-item input[type="checkbox"]:checked ~ .form-checkmark {
    background: #f47963;
    border-color: #f47963;
}

.form-checkbox-item input[type="checkbox"]:checked ~ .form-checkmark:after {
    content: "";
    position: absolute;
    display: block;
    left: 6px;
    top: 2px;
    width: 6px;
    height: 12px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

/* エラーメッセージ */
.form-error-message {
    color: #ff4757;
    font-size: 0.9rem;
    margin-top: 8px;
    min-height: 20px;
}

/* 注意書き */
.form-note {
    color: #666;
    font-size: 0.9rem;
    margin-top: 5px;
    display: block;
}

/* 情報ボックス */
.form-info-box {
    background: #e3f2fd;
    border-left: 4px solid #2196f3;
    padding: 15px;
    margin: 20px 0;
    border-radius: 0 4px 4px 0;
}

.form-info-box p {
    margin: 0;
    color: #1976d2;
}

/* テキストエリアラッパー */
.form-textarea-wrapper {
    margin-top: 20px;
}

.form-textarea-wrapper p {
    margin: 0 0 10px 0;
    font-weight: bold;
    color: #333;
}

.form-char-counter {
    text-align: right;
    color: #666;
    font-size: 0.9rem;
    margin-top: 5px;
}

/* ボタン */
.form-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px solid #eee;
}

.form-submit-btn,
.form-reset-btn,
.form-return-btn {
    padding: 15px 40px;
    border: none;
    border-radius: 30px;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 160px;
}

.form-submit-btn {
    background: linear-gradient(135deg, #2196f3, #70b7f1);
    color: white;
    box-shadow: 0 4px 15px rgba(244, 121, 99, 0.3);
}

.form-submit-btn:hover {
    background: linear-gradient(135deg, #15588f, #4c7a9f);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(244, 121, 99, 0.4);
}

.form-reset-btn {
    background: #6c757d;
    color: white;
}

.form-reset-btn:hover {
    background: #5a6268;
    transform: translateY(-2px);
}

.form-return-btn {
    background: #28a745;
    color: white;
}

.form-return-btn:hover {
    background: #218838;
    transform: translateY(-2px);
}

/* 成功メッセージ */
.form-success-message {
    text-align: center;
    padding: 50px 30px;
    background: #d4edda;
    border-radius: 8px;
    margin: 30px;
}

.form-success-message h3 {
    color: #155724;
    margin-bottom: 20px;
    font-size: 1.5rem;
}

.form-success-message p {
    color: #155724;
    line-height: 1.6;
    margin-bottom: 30px;
}

/* 注意事項ボックス */
.form-notice-box {
    background: #e0e0e0;
    border: 2px solid #f47963;
    border-radius: 8px;
    margin: 30px;
    overflow: hidden;
}

.form-notice-content {
    background: #e9bbb3;
    color: white;
    padding: 15px 20px;
    text-align: center;
}

.form-notice-detail {
    padding: 20px;
}

.form-highlight {
    color: #2b2b2b;
    font-weight: bold;
}

/* レスポンシブデザイン */
@media (max-width: 768px) {
    .form-container {
        padding: 10px;
    }
    
    .form-breadcrumb h2 {
        font-size: 1.4rem;
    }
    
    #form-contact {
        padding: 20px;
    }
    
    .form-row {
        flex-direction: column;
        margin-bottom: 20px;
    }
    
    .form-label {
        flex: none;
        padding: 0 0 10px 0;
    }
    
    .form-input {
        padding: 0;
    }
    
    .form-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .form-submit-btn,
    .form-reset-btn,
    .form-return-btn {
        width: 100%;
        max-width: 300px;
    }
    
    .form-product-image {
        padding: 20px;
    }
    
    .form-success-message,
    .form-notice-box {
        margin: 20px 10px;
    }
}

@media (max-width: 480px) {
    .form-breadcrumb {
        padding: 15px 10px;
    }
    
    .form-breadcrumb h2 {
        font-size: 1.2rem;
    }
    
    #form-contact {
        padding: 15px;
    }
    
    .form-input input[type="text"],
    .form-input input[type="email"],
        .form-input textarea {
        padding: 10px 12px;
        font-size: 16px; /* iOSのズーム防止 */
    }
    
    .form-checkbox-group {
        gap: 12px;
    }
    
    .form-notice-detail {
        padding: 15px;
        font-size: 0.9rem;
        line-height: 1.5;
    }
}

/* アニメーション */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.form-success-message {
    animation: fadeIn 0.5s ease-out;
}

/* フォーカス時のアクセシビリティ改善 */
.form-checkbox-item:focus-within .form-checkmark {
    border-color: #f47963;
    box-shadow: 0 0 0 3px rgba(244, 121, 99, 0.1);
}

/* 印刷用スタイル */
@media print {
    .form-buttons {
        display: none;
    }
    
    .form-success-message {
        background: white;
        border: 1px solid #000;
    }
    
    .form-notice-box {
        background: white;
        border: 1px solid #000;
    }
}