﻿/* =============================================
   registry.css
   写真登録アプリ固有のコンポーネントスタイル
   スマホ表示の基盤レイアウトはmobile.cssへ
   ============================================= */

/* =============================================
   共通カードコンテナ
   ============================================= */

.photo-regist-card,
.take-photo-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
    padding: 20px 16px;
    max-width: 480px;
    margin: 0 auto;
    font-family: system-ui, -apple-system, BlinkMacSystemFont;
}

/* =============================================
   共通：説明テキストブロック
   ============================================= */

.description {
    font-size: 0.8rem;
  color: #444;
    margin-bottom: 14px;
    line-height: 1.6;
}

.description p {
    margin: 0 0 6px 0;
}

.description h5 {
font-size: 0.85rem;
    font-weight: 700;
    margin: 10px 0 4px 0;
    color: #212529;
}

.description ul {
    padding-left: 18px;
margin: 4px 0 0 0;
}

.description li {
    margin-bottom: 3px;
}

/* =============================================
   共通：エラー / 完了メッセージカード
   ============================================= */

.error-card {
    background: #fff;
    border-radius: 12px;
box-shadow: 0 2px 12px rgba(0,0,0,0.08);
    padding: 32px 20px;
    max-width: 480px;
    margin: 0 auto;
    text-align: center;
}

.error-card .error-icon {
    font-size: 3rem;
    margin-bottom: 16px;
    display: block;
    color: #dc3545;
}

.error-card h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: #dc3545;
    margin-bottom: 8px;
}

.error-card p {
    font-size: 0.9rem;
    color: #6c757d;
}

.success-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
    padding: 32px 20px;
    max-width: 480px;
    margin: 0 auto;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.success-card .success-icon {
    font-size: 3rem;
    margin-bottom: 16px;
    display: block;
    color: #198754;
}

.success-card h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: #198754;
    margin-bottom: 8px;
}

.success-card p {
    font-size: 0.9rem;
    color: #6c757d;
}

/* =============================================
   登録画面（ModelPictureRegistry）固有
   ============================================= */

/* モデル名 + Uploadボタン行 */
.model-row {
    display: flex;
    align-items: center;
 justify-content: space-between;
    gap: 10px;
    margin: 14px 0 16px;
    flex-wrap: wrap;
}

.model-name {
    font-size: 1.1rem;
    font-weight: 700;
color: #212529;
    word-break: break-all;
    flex: 1 1 auto;
    min-width: 0;
}

.btn-upload {
    padding: 10px 22px;
    font-size: 0.95rem;
    font-weight: 600;
    background-color: #0d6efd;
    color: #fff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    white-space: nowrap;
    flex-shrink: 0;
    -webkit-tap-highlight-color: transparent;
    letter-spacing: 0.02em;
    transition: background-color 0.15s, color 0.15s;
}

.btn-upload:active:not(:disabled) {
    background-color: #0b5ed7;
}

.btn-upload:disabled {
    background-color: #e0e0e0;
    color: #999;
    cursor: not-allowed;
}

/* 写真グリッド：2列 */
.photo-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.photo-box {
    display: flex;
    flex-direction: column;
}

.photo-label {
    font-size: 0.8rem;
    font-weight: 700;
    color: #212529;
    margin-bottom: 6px;
    text-align: center;
}

/* 写真フレーム：アスペクト比固定 */
.photo-frame {
    background: #f3f3f3;
    border: 1.5px solid #ccc;
    border-radius: 8px 8px 0 0;
    aspect-ratio: 3 / 4;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    position: relative;
 overflow: hidden;
 -webkit-tap-highlight-color: rgba(0,0,0,0.08);
    transition: background 0.15s;
}

.photo-frame:active {
    background: #e0e0e0;
}

.photo-preview {
    display: none;
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    top: 0;
    left: 0;
}

.camera-icon {
    font-size: 2.2rem;
    margin-bottom: 6px;
    line-height: 1;
    color: #888;
}

.take-photo {
    font-size: 0.78rem;
  color: #666;
    font-weight: 600;
}

/* Retakeエリア */
.retake-area {
    border: 1.5px solid #ccc;
    border-top: none;
    border-radius: 0 0 8px 8px;
    background: #f9f9f9;
    padding: 6px;
}

.btn-retake {
    display: block;
    width: 100%;
    padding: 8px 0;
    font-size: 0.8rem;
    font-weight: 600;
    background: #e0e0e0;
    color: #999;
 border: none;
    border-radius: 5px;
    cursor: not-allowed;
    transition: background 0.15s, color 0.15s;
    -webkit-tap-highlight-color: transparent;
}

.btn-retake--active {
  background: #fff3cd;
    color: #856404;
    cursor: pointer;
}

.btn-retake--active:active {
    background: #ffe69c;
}

/* Uploadボタン（送信） */
.btn-submit {
display: block;
    width: 100%;
    margin-top: 20px;
    padding: 14px;
    font-size: 1rem;
    font-weight: 700;
    background-color: #0d6efd;
    color: #fff;
  border: none;
    border-radius: 10px;
    cursor: pointer;
    letter-spacing: 0.03em;
    -webkit-tap-highlight-color: transparent;
}

.btn-submit:disabled {
    background-color: #a0b4d6;
    cursor: not-allowed;
}

.btn-submit:not(:disabled):active {
    background-color: #0b5ed7;
}

/* =============================================
   撮影画面（TakePhoto）固有
   ============================================= */

/* プレビューエリア */
.take-preview-area {
    margin: 14px 0;
    border-radius: 8px;
    overflow: hidden;
    border: 1.5px solid #ccc;
    background: #000;
    aspect-ratio: 4 / 3;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

.take-preview-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    top: 0;
    left: 0;
}

/* 待機中プレースホルダー */
.take-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    color: #888;
    gap: 10px;
  padding: 24px 16px;
    text-align: center;
}

.take-placeholder-icon {
    font-size: 3.5rem;
  line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.take-placeholder p {
    font-size: 0.9rem;
  margin: 0;
  line-height: 1.5;
}

/* カメラ権限エラープレースホルダー */
.take-placeholder--error {
    color: #444;
}

.take-placeholder--error .take-placeholder-icon {
    color: #dc3545;
}

.take-placeholder-error-msg {
    font-size: 0.95rem;
    font-weight: 600;
    color: #dc3545;
    line-height: 1.6;
}

.take-placeholder-error-hint {
    font-size: 0.8rem;
    color: #6c757d;
    line-height: 1.6;
}

/* アクションボタンエリア */
.take-actions {
    padding: 4px 0 0;
    display: flex;
    justify-content: center;
 align-items: center;
    gap: 8px;
}

/* 左スペーサー（OKボタンを中央固定するため） */
.take-actions-spacer {
    flex: 1;
}

/* 右エリア（カメラ切り替えボタンを右端に配置） */
.take-actions-right {
    flex: 1;
    display: flex;
    justify-content: flex-end;
    align-items: center;
}

/* OKボタン */
.btn-use {
    display: block;
    width: 33%;
    padding: 12px;
    font-size: 1rem;
    font-weight: 700;
    background: #6ea8d8;
    color: #fff;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    margin: 0;
}

.btn-use:active {
    background: #5592c2;
}

.btn-use:disabled {
    background: #b8cfe6;
    color: #e8f0f8;
    cursor: not-allowed;
}

/* カメラ切り替えボタン */
.btn-camera-switch {
    width: 44px;
    height: 44px;
    font-size: 1.3rem;
    background: #f0f0f0;
    color: #444;
    border: 1.5px solid #ccc;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    -webkit-tap-highlight-color: transparent;
    line-height: 1;
    padding: 0;
}

.btn-camera-switch:active {
    background: #ddd;
}

.btn-camera-switch:disabled {
    background: #e8e8e8;
    color: #bbb;
    border-color: #ddd;
    cursor: not-allowed;
}

/* ── 初回通知オーバーレイ ── */
.notice-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 16px;
    box-sizing: border-box;
}

.notice-card {
    background: #fff;
    border-radius: 12px;
    padding: 1.5rem 1.5rem 1.25rem;
    max-width: 520px;
    width: 100%;
    max-height: 90dvh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.22);
    box-sizing: border-box;
}

/* タイトル：中央揃え */
.notice-title {
    margin: 0 0 0.85rem;
    font-size: 1rem;
    font-weight: 700;
    color: #1a1a2e;
    text-align: center;
    flex-shrink: 0;
}

/* スクロール可能な本文エリア */
.notice-body {
    flex: 1 1 auto;
    overflow-y: auto;
    font-size: 0.82rem;
    line-height: 1.65;
    color: #333;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    padding: 0.75rem 0.9rem;
    margin-bottom: 0.85rem;
}

.notice-body p {
    margin: 0 0 0.6rem;
}

.notice-body p:last-child {
    margin-bottom: 0;
}

.notice-body ul {
    padding-left: 1.25rem;
    margin: 0.2rem 0 0.6rem;
}

.notice-body li {
    margin-bottom: 0.2rem;
}

/* プライバシーポリシーリンク：左寄せ */
.notice-policy-links {
    font-size: 0.8rem;
    color: #555;
    margin-bottom: 0.85rem;
    flex-shrink: 0;
}

.notice-policy-links a {
    color: #0d6efd;
    text-decoration: underline;
}

.notice-policy-links a:hover {
    color: #0b5ed7;
}

/* チェックボックス行：上余白 */
.notice-checkbox-row {
    margin-top: 0.25rem;
    margin-bottom: 1rem;
    flex-shrink: 0;
    display: flex;
    justify-content: center;
}

.notice-checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.88rem;
    color: #212529;
    cursor: pointer;
    user-select: none;
}

.notice-checkbox-label input[type="checkbox"] {
    width: 1.1rem;
    height: 1.1rem;
    cursor: pointer;
    flex-shrink: 0;
    accent-color: #0d6efd;
}

/* アクションボタン：横並び */
.notice-actions {
    display: flex;
    gap: 0.75rem;
    flex-shrink: 0;
}

.btn-notice-send,
.btn-notice-cancel {
    flex: 1;
    padding: 0.65rem;
    font-size: 0.95rem;
    font-weight: 600;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.15s;
}

.btn-notice-send {
    background: #0d6efd;
    color: #fff;
}

.btn-notice-send:hover:not(:disabled) {
    background: #0b5ed7;
}

.btn-notice-send:disabled {
    background: #a0b4d6;
    color: #e8f0f8;
    cursor: not-allowed;
}

.btn-notice-cancel {
    background: #f0f0f0;
    color: #444;
}

.btn-notice-cancel:hover:not(:disabled) {
    background: #ddd;
}

.btn-notice-cancel:disabled {
    background: #f0f0f0;
    color: #bbb;
    cursor: not-allowed;
}