/* 店舗別お問い合わせフォーム専用CSS */

/* スクロール位置調整用 */
#shop-contact-form-anchor {
    scroll-margin-top: 70px;
    /* ヘッダーの高さに合わせて調整 */
    padding-top: 30px;
}

.shop-contact-form {
    max-width: 600px;
    margin: 0 auto;
    padding: 20px;
}

.shop-contact-form .form-group {
    margin-bottom: 20px;
}

.shop-contact-form .form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    color: #333;
}

.shop-contact-form .required {
    color: #e74c3c;
    margin-left: 3px;
}

.shop-contact-form .form-group input,
.shop-contact-form .form-group select,
.shop-contact-form .form-group textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-size: 16px;
    box-sizing: border-box;
    transition: border-color 0.3s ease;
}

.shop-contact-form .form-group input:focus,
.shop-contact-form .form-group select:focus,
.shop-contact-form .form-group textarea:focus {
    outline: none;
    border-color: #2B6D42;
    box-shadow: 0 0 0 3px rgba(43, 109, 66, 0.1);
}

.shop-contact-form .form-group.error input,
.shop-contact-form .form-group.error select,
.shop-contact-form .form-group.error textarea {
    border-color: #e74c3c;
}

.shop-contact-form .error-message {
    color: #e74c3c;
    font-size: 14px;
    margin-top: 5px;
    display: block;
}

.shop-contact-form .form-submit {
    text-align: center;
    margin-top: 30px;
}

.shop-contact-form .btn {
    padding: 14px 40px;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    margin: 0 10px;
    transition: all 0.3s ease;
}

.shop-contact-form .btn-primary {
    background-color: #2B6D42;
    color: white;
}

.shop-contact-form .btn-primary:hover {
    background-color: #1e4d2e;
    transform: translateY(-2px);
}

.shop-contact-form .btn-secondary {
    background-color: #6c757d;
    color: white;
}

.shop-contact-form .btn-secondary:hover {
    background-color: #545b62;
    transform: translateY(-2px);
}

/* 確認画面 */
.shop-contact-form .confirm-content h3 {
    text-align: center;
    margin-bottom: 30px;
    color: #333;
    font-size: 24px;
}

.shop-contact-form .confirm-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 30px;
    background: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    overflow: hidden;
}

.shop-contact-form .confirm-table th,
.shop-contact-form .confirm-table td {
    padding: 16px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.shop-contact-form .confirm-table th {
    background-color: #f8f9fa;
    font-weight: bold;
    width: 200px;
    color: #555;
}

.shop-contact-form .confirm-table tr:last-child th,
.shop-contact-form .confirm-table tr:last-child td {
    border-bottom: none;
}

.shop-contact-form .confirm-buttons {
    text-align: center;
}

/* 完了画面 */
.shop-contact-form .complete-content {
    text-align: center;
    padding: 60px 20px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 10px;
    margin: 20px 0;
}

.shop-contact-form .complete-content h3 {
    color: #28a745;
    margin-bottom: 20px;
    font-size: 28px;
}

.shop-contact-form .complete-content p {
    font-size: 16px;
    line-height: 1.6;
    color: #666;
    margin-bottom: 30px;
}

.shop-contact-form .complete-buttons {
    margin-top: 30px;
}

/* レスポンシブデザイン */
@media (max-width: 768px) {
    .shop-contact-form {
        padding: 10px;
    }

    .shop-contact-form .confirm-table {
        font-size: 14px;
    }

    .shop-contact-form .confirm-table th {
        width: 120px;
        padding: 12px 8px;
    }

    .shop-contact-form .confirm-table td {
        padding: 12px 8px;
    }

    .shop-contact-form .btn {
        display: block;
        margin: 10px 0;
        width: 100%;
        padding: 16px;
    }

    .shop-contact-form .confirm-buttons form {
        display: block !important;
        margin-bottom: 10px;
    }

    .shop-contact-form .complete-content {
        padding: 40px 15px;
    }

    .shop-contact-form .complete-content h3 {
        font-size: 24px;
    }
}

/* アニメーション */
.shop-contact-form .form-group {
    animation: fadeInUp 0.5s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.shop-contact-form .confirm-table {
    animation: fadeIn 0.5s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* JavaScript連携スタイル */
.shop-contact-form .form-group.focused {
    transform: scale(1.02);
}

.shop-contact-form .form-group.focused label {
    color: #2B6D42;
}

.shop-contact-form .btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

.shop-contact-form .form-group {
    animation-fill-mode: both;
}

/* 送信中の表示 */
.shop-contact-form .sending {
    position: relative;
}

.shop-contact-form .sending::after {
    content: '';
    position: absolute;
    top: 50%;
    right: 15px;
    width: 16px;
    height: 16px;
    border: 2px solid #ffffff;
    border-top: 2px solid transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: translateY(-50%) rotate(0deg);
    }

    100% {
        transform: translateY(-50%) rotate(360deg);
    }
}

/* エラーメッセージのアニメーション */
.shop-contact-form .error-message {
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.back-button {
    background-color: #6c757d;
    margin-right: 15px;
}

.submit-button:hover {
    background-color: #1c4c2e;
}

.back-button:hover {
    background-color: #5a6268;
}

span.required {
    color: #e74c3c;
    margin-left: 3px;
}

span.note {
    font-size: 14px;
    color: #666;
    font-weight: normal;
}

.form-success {
    background-color: #d4edda;
    color: #155724;
    padding: 20px;
    margin: 20px 0;
    border: 1px solid #c3e6cb;
    border-radius: 4px;
    text-align: center;
}

.form-success p {
    margin-bottom: 15px;
}

.form-success .back-button {
    margin-top: 15px;
}

.form-errors {
    background-color: #f8d7da;
    color: #721c24;
    padding: 15px;
    margin-bottom: 20px;
    border: 1px solid #f5c6cb;
    border-radius: 4px;
}

.form-errors ul {
    margin: 10px 0 0 20px;
    padding: 0;
}

.form-errors li {
    margin-bottom: 5px;
}

/* 確認画面 */
.form-confirm {
    padding: 20px 0;
}

.form-confirm h3 {
    font-size: 20px;
    margin-bottom: 15px;
    color: #333;
}

.confirm-table {
    margin: 20px 0 30px;
}

.confirm-table table {
    width: 100%;
    border-collapse: collapse;
}

.confirm-table th,
.confirm-table td {
    padding: 12px;
    border: 1px solid #ddd;
    text-align: left;
}

.confirm-table th {
    width: 30%;
    background-color: #f5f5f5;
    font-weight: bold;
}

.form-buttons {
    text-align: center;
    margin-top: 25px;
}

/* 他のフィールドスタイル */
#shop_name {
    background-color: #f9f9f9;
    color: #666;
}

.input-error {
    border-color: #dc3545 !important;
    background-color: #fff8f8 !important;
}

/* レスポンシブ対応 */
@media (max-width: 767px) {

    .confirm-table th,
    .confirm-table td {
        display: block;
        width: 100%;
    }

    .confirm-table th {
        border-bottom: none;
    }

    .form-buttons button {
        margin: 10px 5px;
    }
}