/* ========================================
   Base Styles - CSS Variables & Fonts
   ======================================== */

/* === Global CSS Variables === */
:root {
    /* Color variables - All colors centralized */
    --text-dark: #000000;
    --text-white: #ffffff;
    --text-muted: #6c757d;
    
    /* Theme base - Pastel Light Blue */
    --theme-base: #b3d9f2;              /* パステルライトブルー（メインテーマ色） */
    --theme-base-rgb: 179, 217, 242;
    --theme-light: #e6f3f9;             /* 非常に薄いブルー（背景用） */
    --theme-lighter: #f0f8fc;           /* さらに薄いブルー */
    --theme-soft: #c7e2f5;              /* ソフトなブルー */
    --theme-muted: #5d9cbe;             /* くすんだブルー（アクセント用） */
    --theme-dark: #4a7c9a;              /* 濃いブルー */
    
    /* Semantic colors */
    --theme-success: #0d9488;           /* ティール系：ブルーと相性の良い緑 */
    --theme-success-rgb: 13, 148, 136;
    --theme-danger: #e63946;            /* やや暗めの赤：ブルー背景で目立つ */
    --theme-danger-rgb: 230, 57, 70;
    --theme-warning: #f59e0b;           /* アンバー：ライトブルーと補色関係 */
    --theme-warning-rgb: 245, 158, 11;
    --theme-info: #3b82f6;              /* ブライトブルー：メインテーマより濃い */
    --theme-info-rgb: 59, 130, 246;
    
    /* Component colors */
    --card-bg: #ffffff;
    --card-border: #e9ecef;
    --navbar-bg: var(--theme-base);
    --footer-bg: var(--theme-light);
    --body-bg: #fefefe;
    --input-border: #e2e8f0;
    --input-focus-border: var(--theme-muted);
    
    /* Shadows */
    --card-shadow: 0 4px 12px rgba(93, 156, 190, 0.12);
    --card-hover-shadow: 0 6px 20px rgba(93, 156, 190, 0.18);
    --button-shadow: 0 2px 8px rgba(93, 156, 190, 0.15);
    
    /* Gradients */
    --primary-gradient: var(--theme-base);
    --accent-gradient: var(--theme-light);
    --success-gradient: var(--theme-success);

    /* Bootstrap overrides */
    --bs-primary: var(--theme-base);
    --bs-primary-rgb: var(--theme-base-rgb);
    --bs-secondary: #6c757d;
    --bs-secondary-rgb: 108, 117, 125;
    --bs-success: var(--theme-success);
    --bs-success-rgb: var(--theme-success-rgb);
    --bs-info: var(--theme-info);
    --bs-info-rgb: var(--theme-info-rgb);
    --bs-warning: var(--theme-warning);
    --bs-warning-rgb: var(--theme-warning-rgb);
    --bs-danger: var(--theme-danger);
    --bs-danger-rgb: var(--theme-danger-rgb);
    --bs-light: #f8f9fa;
    --bs-light-rgb: 248, 249, 250;
    --bs-dark: #343a40;
    --bs-dark-rgb: 52, 58, 64;
    
    /* Accessible variants for use on dark backgrounds */
    --theme-base-on-dark: #93c5fd;
    --theme-info-on-dark: #93c5fd;
    --theme-success-on-dark: #7dd3c1;
    --theme-danger-on-dark: #fb7185;
    --theme-warning-on-dark: #fbbf24;
}
 
/* === Custom Font: LINE SEED === */
@font-face {
    font-family: 'LINESEEDJP';
    src: url('/assets/fonts/LINESeedJP_OTF_Th.woff2') format('woff2');
    font-weight: 100;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'LINESEEDJP';
    src: url('/assets/fonts/LINESeedJP_OTF_Rg.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'LINESEEDJP';
    src: url('/assets/fonts/LINESeedJP_OTF_Bd.woff2') format('woff2');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'LINESEEDJP';
    src: url('/assets/fonts/LINESeedJP_OTF_Eb.woff2') format('woff2');
    font-weight: 800;
    font-style: normal;
    font-display: swap;
}

/* === Base HTML & Body Styles === */
html, body {
    height: 100%;
}

body { 
    display: flex;
    flex-direction: column;
    padding-top: 70px;
    background: var(--body-bg);
    color: var(--text-dark);
    min-height: 100vh;
    min-width: 300px;
    overflow-x: auto;
    font-family: 'LINESEEDJP', 'Noto Sans JP', 'Yu Gothic', 'Meiryo', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

/* === Font Rendering & Typography === */
body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    font-weight: 400;
}

/* Headings */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    letter-spacing: -0.01em;
    line-height: 1.3;
}

/* Small UI text */
small, .small, .text-sm {
    font-weight: 400;
    -webkit-font-smoothing: auto;
}

/* Buttons and badges */
.btn, .badge {
    font-weight: 600;
}

/* Compact labels */
.badge, .btn-sm, .form-label {
    letter-spacing: 0.01em;
}

/* Input fields */
input, textarea, select {
    font-weight: 400;
}

/* Fallback for Latin symbols */
.use-system-font {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif !important;
}

/* === Icon Font Fixes === */
.fa, .fas, .far, .fal, .fab {
    font-family: 'Font Awesome 6 Free', 'Font Awesome 6 Pro', 'Font Awesome 6 Brands' !important;
    font-weight: 900;
}

.far {
    font-weight: 400;
}

.fab {
    font-family: 'Font Awesome 6 Brands' !important;
}

/* Emoji/icon helper */
.emoji-icon {
    font-family: 'Apple Color Emoji', 'Segoe UI Emoji', 'Noto Color Emoji', sans-serif;
    font-style: normal;
}

/* === Color Utility Overrides === */
.bg-warning,
.badge-warning,
.btn-warning {
    background-color: var(--bs-warning) !important;
    color: var(--text-dark) !important;
}

.bg-warning .text-white,
.badge-warning .text-white,
.btn-warning .text-white {
    color: var(--text-dark) !important;
}

.text-warning {
    color: var(--theme-warning) !important;
}

.admin-header .badge-warning {
    background-color: var(--bs-warning) !important;
    color: #000 !important;
}
