/**
 * ARV_HT004 格納対象選択画面 スタイルシート
 * HT（ハンディターミナル）向けモバイルファースト設計
 */

/* ===========================
   リセットとベーススタイル
   =========================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    width: 100%;
    height: 100%;
    overflow: hidden;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 16px;
    line-height: 1.5;
    color: #333;
    background-color: #f5f5f5;
    -webkit-text-size-adjust: 100%;
    -webkit-tap-highlight-color: transparent;
}

/* ===========================
   コンテナ
   =========================== */
.ht-container {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;
    background-color: #fff;
}

/* ===========================
   ヘッダー
   =========================== */
.ht-header {
    flex-shrink: 0;
    padding: 12px 16px;
    background-color: #006f5e;
    color: #fff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.ht-title {
    font-size: 20px;
    font-weight: bold;
    margin-bottom: 4px;
}

.ht-user-info {
    font-size: 12px;
    opacity: 0.9;
    display: flex;
    gap: 12px;
}

.user-name::before {
    content: "▸ ";
}

.warehouse-name::before {
    content: "■ ";
}

/* ===========================
   メインコンテンツ
   =========================== */
.ht-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 24px 16px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

/* プロンプトエリア */
.prompt-area {
    margin-bottom: 20px;
}

.prompt-label {
    display: block;
    font-size: 18px;
    font-weight: bold;
    color: #333;
    line-height: 1.4;
}

/* 入力エリア */
.input-area {
    margin-bottom: 20px;
}

.ht-input {
    width: 100%;
    height: 56px;
    padding: 16px;
    font-size: 18px;
    border: 2px solid #ccc;
    border-radius: 8px;
    background-color: #fff;
    transition: border-color 0.2s ease;
    -webkit-appearance: none;
    appearance: none;
}

.ht-input:focus {
    outline: none;
    border-color: #006f5e;
    box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.25);
}

.ht-input::placeholder {
    color: #999;
}

/* エラーメッセージ */
.error-message {
    margin-bottom: 16px;
    padding: 12px 16px;
    background-color: #fee2e2;
    border-left: 4px solid #ef4444;
    border-radius: 4px;
    color: #991b1b;
    font-size: 16px;
    line-height: 1.4;
}

/* ローディングインジケーター */
.loading-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 32px;
}

.spinner {
    width: 48px;
    height: 48px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #006f5e;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-indicator p {
    margin-top: 16px;
    font-size: 16px;
    color: #666;
}

/* ===========================
   フッター：アクションボタン
   =========================== */
.ht-footer {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 16px;
    background-color: #f8f9fa;
    border-top: 1px solid #dee2e6;
}

.ht-button {
    width: 100%;
    min-height: 56px;
    padding: 16px 24px;
    font-size: 18px;
    font-weight: bold;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.2s ease;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

/* プライマリボタン（確定） */
.ht-button-primary {
    background-color: #006f5e;
    color: #fff;
}

.ht-button-primary:hover {
    background-color: #005a4b;
}

.ht-button-primary:active {
    background-color: #004a3e;
}

.ht-button-primary:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

/* ターシャリボタン（戻る） */
.ht-button-tertiary {
    background-color: #fff;
    color: #333;
    border: 2px solid #dee2e6;
}

.ht-button-tertiary:hover {
    background-color: #f8f9fa;
}

.ht-button-tertiary:active {
    background-color: #e9ecef;
}

/* ===========================
   アクセシビリティ
   =========================== */
.ht-button:focus {
    outline: 3px solid #006f5e;
    outline-offset: 2px;
}

/* スクリーンリーダー用の非表示テキスト */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* ===========================
   レスポンシブ調整（大画面用）
   =========================== */
@media (min-width: 768px) {
    .ht-container {
        max-width: 600px;
        margin: 0 auto;
        border-left: 1px solid #dee2e6;
        border-right: 1px solid #dee2e6;
    }
}

/* ===========================
   高コントラストモード対応
   =========================== */
@media (prefers-contrast: high) {
    .ht-input {
        border-width: 3px;
    }

    .ht-button {
        border-width: 3px;
    }
}
