/**
 * STK_HT001 棚卸計画選択画面 スタイルシート
 * 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%;
    padding: 14px 16px;
    font-size: 16px;
    border: 2px solid #ccc;
    border-radius: 8px;
    background-color: #fff;
    transition: border-color 0.2s;
    -webkit-appearance: none;
    appearance: none;
}

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

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

.ht-input:disabled {
    background-color: #f0f0f0;
    color: #999;
    cursor: not-allowed;
}

/* ===========================
   メッセージエリア
   =========================== */
.error-message,
.success-message {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 16px;
    font-size: 14px;
    line-height: 1.5;
}

.error-message {
    background-color: #ffebee;
    color: #c62828;
    border: 1px solid #ef5350;
}

.success-message {
    background-color: #e8f5e9;
    color: #2e7d32;
    border: 1px solid #66bb6a;
}

/* ===========================
   ローディング表示
   =========================== */
.loading-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 24px;
    color: #666;
}

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

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

.loading-indicator p {
    font-size: 14px;
    color: #666;
}

/* ===========================
   フッター（ボタンエリア）
   =========================== */
.ht-footer {
    flex-shrink: 0;
    padding: 16px;
    background-color: #f5f5f5;
    border-top: 1px solid #e0e0e0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* ボタン共通スタイル */
.ht-button {
    width: 100%;
    padding: 14px 20px;
    font-size: 16px;
    font-weight: bold;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.2s, border-color 0.2s, opacity 0.2s;
    -webkit-appearance: none;
    appearance: none;
    text-align: center;
    touch-action: manipulation;
}

.ht-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

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

.ht-button-primary:hover:not(:disabled) {
    background-color: #005a4b;
}

.ht-button-primary:active:not(:disabled) {
    background-color: #003d7a;
}

/* セカンダリボタン（更新など） */
.ht-button-secondary {
    background-color: #6c757d;
    color: #fff;
}

.ht-button-secondary:hover:not(:disabled) {
    background-color: #5a6268;
}

.ht-button-secondary:active:not(:disabled) {
    background-color: #545b62;
}

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

.ht-button-tertiary:hover:not(:disabled) {
    background-color: #f8f9fa;
    border-color: #999;
}

.ht-button-tertiary:active:not(:disabled) {
    background-color: #e9ecef;
}

/* ===========================
   レスポンシブデザイン
   =========================== */
@media (min-width: 768px) {
    .ht-footer {
        flex-direction: row;
        justify-content: flex-end;
    }

    .ht-button {
        width: auto;
        min-width: 120px;
    }
}

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

.ht-input:focus-visible {
    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;
}
