/* ========================================
   BST Contact Form - フロントエンド用CSS
   ======================================== */

/* フォーム全体 */
.bstform-wrapper {
    width: 100%;
    margin: 0 auto;
}

/* フォームフィールド */
.bstform-field {
    margin-bottom: 20px;
}

.bstform-field label {
    display: flex;
    align-items: center;
    font-weight: 600;
    color: #333;
    margin-bottom: 5px;
}

.bstform-field .required {
    font-weight: bold;
    font-size: 0.9em;
    background-color: #d63638;
    color: #fff;
    padding: 2px 5px;
    border-radius: 4px;
}

.bstform-field .asterisk {
    font-weight: bold;
    font-size: 1.1em;
    color: #d63638;
    margin-left: 3px;
}

/* 必須文字（前）の場合のスタイル */
.bstform-field .required:first-child {
    margin-right: 5px;
}

/* アスタリスク（後）の場合のスタイル */
.bstform-field .required:last-child {
    margin-left: 3px;
}

/* 個人情報保護方針の同意チェックボックス */
.bstform-privacy-field {
    width: fit-content;
    margin: 25px auto;
    padding: 15px;
    background-color: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;

}

.bstform-privacy-label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
    font-size: 14px;
    line-height: 1.5;
}

.bstform-privacy-checkbox {
    margin: 0;
    margin-top: 2px;
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.bstform-privacy-text {
    flex: 1;
    color: #333;
}

.bstform-privacy-text a {
    color: #0073aa;
    text-decoration: underline;
    font-weight: 500;
}

.bstform-privacy-text a:hover {
    color: #005177;
    text-decoration: none;
}

/* 送信ボタンのスタイル */
.bstform-submit-btn {
    background-color: #0073aa;
    color: white;
    border: none;
    padding: 12px 30px;
    font-size: 16px;
    font-weight: bold;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.bstform-submit-btn:hover {
    background-color: #005177;
}

.bstform-submit-btn:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

/* ローディングスピナー */
.bstform-loading-spinner {
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: bstform-spin 0.8s linear infinite;
    vertical-align: middle;
    margin-right: 5px;
}

@keyframes bstform-spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* 注釈・補足説明 */
.bstform-field-description {
    display: block;
    color: #666;
    font-size: 12px;
    margin-top: 5px;
    line-height: 1.5;
}



/* 入力フィールド */
.bstform-field input[type="text"],
.bstform-field input[type="email"],
.bstform-field input[type="tel"],
.bstform-field input[type="url"],
.bstform-field textarea,
.bstform-field select {
    width: 100%;
    padding: 10px;
    font-size: 14px;
    border: 1px solid #ddd;
    border-radius: 4px;
    transition: border-color 0.3s ease;
}

.bstform-field input:focus,
.bstform-field textarea:focus,
.bstform-field select:focus {
    outline: none;
    border-color: #2271b1;
    box-shadow: 0 0 0 1px #2271b1;
}

.bstform-field textarea {
    min-height: 120px;
    resize: vertical;
}

/* ラジオボタン・チェックボックス */
.bstform-field input[type="radio"],
.bstform-field input[type="checkbox"] {
    margin-right: 8px;
}

.bstform-field .radio-option,
.bstform-field .checkbox-option {
    display: block;
    margin: 8px 0;
}

/* 送信ボタン */
.bstform-field button[type="submit"] {
    background: #313131;
    color: #fff;
    padding: 12px 30px;
    font-size: 16px;
    font-weight: 600;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin: 0 auto;
    display: block;
    width: fit-content;
}

.bstform-field button[type="submit"]:hover {
    background: #135e96;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(34, 113, 177, 0.3);
}

/* 成功・エラーメッセージ */
.bstform-message {
    padding: 15px 20px;
    margin-bottom: 20px;
    border-radius: 4px;
    font-weight: 600;
}

.bstform-message-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.bstform-message-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.bstform-zipcode-search-btn {
    margin-left: 10px;
    padding: 5px 15px;
    background: #000;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

/* 成功メッセージ */
.bstform-success-msg {
    position: fixed;
    top: 20px;
    right: 20px;
    background: #00a32a;
    color: #fff;
    padding: 15px 20px;
    border-radius: 4px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    z-index: 10000;
    animation: slideIn 0.3s ease;
}

/* レスポンシブ対応 */
@media screen and (max-width: 600px) {
    .bstform-wrapper {
        padding: 0 15px;
    }

    .bstform-field input,
    .bstform-field textarea,
    .bstform-field select {
        font-size: 16px;
        /* iOSでズームを防ぐ */
    }
}

/* 日時フィールドの横並び表示（コンテナ内のみ） */
.bstform-datetime-container .bstform-datetime-fields .bstform-field {
    display: inline-flex;
    align-items: center;
    margin: 0;
    flex-shrink: 0;
}

.bstform-datetime-container .bstform-datetime-fields .bstform-field label {
    margin-right: 5px;
    margin-bottom: 0;
    white-space: nowrap;
    font-weight: normal;
}

.bstform-datetime-container .bstform-datetime-fields .bstform-field select {
    width: auto;
    min-width: 60px;
}

/* 年のセレクトボックスの幅を少し広げる */
.bstform-wrapper .bstform-field[data-field-name="pickup_year"] select {
    min-width: 80px;
}

/* 月のセレクトボックスの幅調整 */
.bstform-wrapper .bstform-field[data-field-name="pickup_month"] select {
    min-width: 70px;
}

/* 日のセレクトボックスの幅調整 */
.bstform-wrapper .bstform-field[data-field-name="pickup_day"] select {
    min-width: 60px;
}

/* 時のセレクトボックスの幅調整 */
.bstform-wrapper .bstform-field[data-field-name="pickup_hour"] select {
    min-width: 70px;
}

/* 分のセレクトボックスの幅調整 */
.bstform-wrapper .bstform-field[data-field-name="pickup_minute"] select {
    min-width: 70px;
}

/* 日時フィールドグループのコンテナ */
.bstform-datetime-container {
    margin-bottom: 20px;

}

.bstform-datetime-container h3 {
    font-weight: 600;
    margin-bottom: 10px;
    color: #333;
}

.bstform-datetime-container h3 .required {
    font-weight: 600;
    font-size: 0.9em;
    background-color: #d63638;
    color: #fff;
    padding: 2px 5px;
    border-radius: 4px;
}

.bstform-datetime-container h3 .asterisk {
    font-weight: bold;
    font-size: 1.1em;
    color: #d63638;
    margin-left: 3px;
}


.bstform-datetime-container .bstform-datetime-fields {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.bstform-datetime-container .bstform-datetime-fields .bstform-field {
    margin: 0;
    flex-shrink: 0;
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
    .bstform-datetime-container .bstform-datetime-fields {
        flex-direction: column;
        align-items: stretch;
    }

    .bstform-datetime-container .bstform-datetime-fields .bstform-field {
        display: flex;
        margin-bottom: 10px;
    }

    .bstform-datetime-container .bstform-datetime-fields .bstform-field select {
        flex: 1;
        min-width: auto;
    }
}

/* ファイルアップロードフィールドのスタイル */
.bstform-file-input {
    width: 100%;
    max-width: 400px;
    padding: 12px;
    border: 2px dashed #ddd;
    border-radius: 6px;
    background-color: #fafafa;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
}

.bstform-file-input:hover {
    border-color: #0073aa;
    background-color: #f0f8ff;
    transform: translateY(-1px);
}

.bstform-file-input:focus {
    outline: none;
    border-color: #0073aa;
    box-shadow: 0 0 0 3px rgba(0, 115, 170, 0.1);
}

.bstform-file-input:valid {
    border-color: #ccc;
    background-color: #f3f3f3;
}

.bstform-file-input:invalid {
    border-color: #dc3545;
    background-color: #fff8f8;
}

.bstform-file-info {
    display: block;
    margin-top: 8px;
    padding: 10px;
    font-size: 0.85em;
    color: #666;
    line-height: 1.5;
    background-color: #f8f9fa;
    border-radius: 4px;
    border-left: 3px solid #0073aa;
}

.bstform-file-info strong {
    color: #333;
}

/* ファイル選択時の視覚的フィードバック */
.bstform-file-input::file-selector-button {
    background-color: #0073aa;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    margin-right: 10px;
    transition: background-color 0.3s ease;
}

.bstform-file-input::file-selector-button:hover {
    background-color: #005a87;
}

/* 必須ファイルフィールドのスタイル */
.bstform-field:has(.bstform-file-input[required]) .bstform-file-input {
    border-color: #dc3545;
}

.bstform-field:has(.bstform-file-input[required]:valid) .bstform-file-input {
    border-color: #28a745;
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
    .bstform-file-input {
        max-width: 100%;
    }
}