/* touch_friendly.css — EARS look, authored at 1280x800 */

window {
    background-image: url("back.png");
    background-size: cover;
    background-position: center;
}

notebook, notebook > stack, notebook header,
grid, box, viewport, scrolledwindow, frame {
    background-color: transparent;
    background-image: none;
}
scrolledwindow, #SoundScroller { border: none; box-shadow: none; }

/* NOTE: scoped to standalone labels only — a bare `label {}` rule would
   repaint every button's text and override the button colors below. */
#StatusLabel, #ComPortLabel, #LogLabel, #LanguageLabel,
checkbutton, radiobutton, combobox {
    font-family: 'Noto Sans JP', 'IPAPGothic', 'Noto Sans', sans-serif;
    color: #1e1e1e;
    font-size: 14px;
}

/* ---------- shared button look ---------- */
button, button label {
    font-family: 'Noto Sans JP', 'IPAPGothic', 'Noto Sans', sans-serif;
    font-weight: 700;
    color: #ffffff;
}
button {
    border-radius: 0;
    border: 2px solid rgba(0,0,0,0.45);
    background-image: none;
    box-shadow: none;
    text-shadow: none;
    padding: 0;
    min-height: 0;
    min-width: 0;
}

/* #ConditionNameLabel is styled in the SOUND PAGE section below. */

/* ---------- splash / main menu ---------- */
#Option1Button, #Option2Button, #Option3Button {
    min-height: 95px;
    background-color: #6A991A;
}
#Option1Button label, #Option2Button label, #Option3Button label { font-size: 50px; }
#Option1Button:hover, #Option2Button:hover, #Option3Button:hover  { background-color: #7BAE22; }
#Option1Button:active, #Option2Button:active, #Option3Button:active { background-color: #5A8315; }

#SettingButton        { min-height: 95px;min-width: 200px; background-color: #F97F00; }
#SettingButton label  { font-size: 34px; }
#SettingButton:hover  { background-color: #FF9020; }
#SettingButton:active { background-color: #D96C00; }

#CloseButton          { min-height: 95px;min-width: 200px; background-color: #808080; }
#CloseButton label    { font-size: 34px; color: #ffffff; }
#CloseButton:hover    { background-color: #909090; }
#CloseButton:active   { background-color: #6E6E6E; }

#LanguageToggle          { min-height: 46px; min-width: 80px; background-color: #ffffff; }
#LanguageToggle label    { font-size: 20px; color: #1e1e1e; }
#LanguageToggle:checked  { background-color: #0B3B6B; }
#LanguageToggle:checked label { color: #ffffff; }

/* ---------- back buttons ---------- */
/* MapBackButton and SoundBackButton are styled in their page sections
   (red, bottom-right). */
#SettingBackButton {
    min-width: 100px;
    min-height: 58px;
    background-color: #F0F0F0;
    border: 2px solid #B5B5B5;
}
#SettingBackButton label { font-size: 20px; color: #111111; }
#SettingBackButton:hover { background-color: #E2E2E2; }

/* ══════════════════════════════════════════════════════════════════
   SOUND PAGE — design "Mix" (icon tiles → tile tabs + 3-column grid)
   Classes come from SoundWindow.cs: type-tile, type-tab, active,
   lung, heart, sound-clip, compact, clip-main, clip-sub,
   tile-title, tile-sub, page-title, page-hint.
   ══════════════════════════════════════════════════════════════════ */

#SoundBox {
    background-color: rgba(239, 234, 224, 0.92);
    padding: 22px 40px 20px 40px;
}

/* title on level 0, quiet hint on the list levels */
#ConditionNameLabel {
    font-family: 'Noto Sans JP', 'IPAPGothic', sans-serif;
    font-size: 40px;
    font-weight: 900;
    color: #1E2430;
    background-color: transparent;
    padding: 0;
    margin: 0;
}
#ConditionNameLabel.page-hint {
    font-size: 17px;
    font-weight: 400;
    color: #5E636D;
}
#SoundSubtitleLabel {
    font-family: 'Noto Sans JP', 'IPAPGothic', sans-serif;
    font-size: 18px;
    color: #5E636D;
}

/* ── level 0: big icon tiles ── */
button.type-tile {
    background-color: #FFFFFF;
    background-image: none;
    border: 1px solid #E2DDD2;
    border-radius: 20px;
    box-shadow: 0 2px 8px rgba(30, 36, 48, 0.08);
    outline-style: none;
}
button.type-tile:hover  { background-color: #FAF8F4; }
button.type-tile:active { background-color: #F1EEE8; }
button.type-tile label.tile-title { font-size: 48px; font-weight: 900; color: #1E2430; }
button.type-tile label.tile-sub   { font-size: 18px; font-weight: 400; color: #5E636D; }

/* ── level 1+: the same tiles, small, as tabs ── */
button.type-tab {
    min-height: 80px;
    min-width: 300px;
    padding: 0 18px 0 12px;
    background-color: #FFFFFF;
    background-image: none;
    border: 1.5px solid #E2DDD2;
    border-radius: 16px;
    box-shadow: none;
    outline-style: none;
}
button.type-tab:hover { background-color: #FAF8F4; }
button.type-tab label.tile-title { font-size: 26px; font-weight: 700; color: #1E2430; }
button.type-tab label.tile-sub   { font-size: 14px; font-weight: 400; color: #6B6F78; }

button.type-tab.active.lung  { background-color: #F2F7FC; border: 2.5px solid #1F6FB2; }
button.type-tab.active.heart { background-color: #FDF3F3; border: 2.5px solid #C0392B; }
button.type-tab.active.lung  label.tile-title { color: #0F4C85; font-weight: 900; }
button.type-tab.active.heart label.tile-title { color: #9B2A20; font-weight: 900; }

/* ── sound buttons: white cards, Japanese name bold, English below ── */
.sound-clip {
    min-height: 72px;
    padding: 0 18px;
    background-color: #FFFFFF;
    background-image: none;
    border: 1px solid #E2DDD2;
    border-radius: 12px;
    box-shadow: none;
    outline-style: none;
}
.sound-clip:hover  { background-color: #F7F5F1; }
.sound-clip:active { background-color: #EDE9E1; }
.sound-clip.lung:active  { border-color: #1F6FB2; }
.sound-clip.heart:active { border-color: #C0392B; }
.sound-clip label.clip-main { font-size: 20px; font-weight: 700; color: #1E2430; }
.sound-clip label.clip-sub  { font-size: 14px; font-weight: 400; color: #6B6F78; }

.sound-clip.compact                 { min-height: 56px; }
.sound-clip.compact label.clip-main { font-size: 18px; }
.sound-clip.compact label.clip-sub  { font-size: 13px; }

/* 戻る — red, bottom-right (matches the map page) */
#SoundBackButton {
    min-height: 60px;
    min-width: 130px;
    padding: 0 26px 0 18px;
    background-color: #C62828;
    background-image: none;
    border-width: 0;
    border-radius: 12px;
    outline-style: none;
}
#SoundBackButton label { color: #FFFFFF; font-size: 21px; font-weight: 700; }
#SoundBackButton image { color: #FFFFFF; margin-right: 6px; }
#SoundBackButton:hover  { background-color: #D33A3A; }
#SoundBackButton:active { background-color: #A61F1F; }

/* ---------- settings page ---------- */
#ConnectButton, #AutoConnectButton, #RefreshButton {
    min-height: 46px; min-width: 150px; background-color: #0B3B6B;
}
#ConnectButton label, #AutoConnectButton label, #RefreshButton label { font-size: 19px; }
#ComPortComboBox { min-height: 40px; font-size: 17px; }
#StatusLabel.status-on  { color: #2e7d32; font-weight: bold; font-size: 17px; }
#StatusLabel.status-off { color: #c62828; font-weight: bold; font-size: 17px; }

/* ══════════════════════════════════════════════════════════════════
   MAP PAGE — design A "grouped side panel"

   Rule of the page: a LABEL never has a fill or border; anything you
   can press always has one. One filled primary button (解説を見る).

   Selector sources:
     #Name   — set either by MapWindow.SetName()/Language.Register()
               or by the <property name="name"> in the glade.
     .class  — added in MapWindow via AddClass() (map-title,
               contact-chip, panel-header, nav-button).

   Sizes target the `label` node directly because _scaleCssProvider
   emits a plain `label {}` rule that beats any inherited value.
   ══════════════════════════════════════════════════════════════════ */

/* flat warm ground so the white cards read clearly over back.png */
#MapBox {
    background-color: rgba(239, 234, 224, 0.92);
    padding: 16px 20px 20px 20px;
}

/* ── cards ── */
#MapControlBox, #MapPointCard, #HeartWaveCard, #BreathWaveCard {
    background-color: #FFFFFF;
    border: 1px solid #E2DDD2;
    border-radius: 14px;
}
#MapControlBox { padding: 18px; }
#MapPointCard, #HeartWaveCard, #BreathWaveCard { padding: 14px 16px; }

/* ── header ── */
label.map-title {
    font-family: 'Noto Sans JP', 'IPAPGothic', sans-serif;
    font-size: 30px;
    font-weight: 900;
    color: #1E2430;
    background-color: transparent;
    padding: 0 4px;
}

/* status pill — soft tint + dark text, clearly not a button */
label.contact-chip {
    font-family: 'Noto Sans JP', 'IPAPGothic', sans-serif;
    font-size: 17px;
    font-weight: 700;
    color: #A3201B;
    background-color: #FCE8E6;
    border: 1px solid #F2B8B5;
    border-radius: 22px;
    padding: 8px 20px;
}
label.contact-chip.contact-ok {
    color: #1E6B32;
    background-color: #E6F4EA;
    border-color: #A8D5B5;
}

/* ── section labels (plain grey text) ── */
#MapSectionLabel, #JacketSizeLabel {
    font-family: 'Noto Sans JP', 'IPAPGothic', sans-serif;
    font-size: 15px;
    font-weight: 700;
    color: #6B6F78;
    background-color: transparent;
}

/* panel titles: 聴診点 / 心音波形 / 呼吸音波形 */
label.panel-header {
    font-family: 'Noto Sans JP', 'IPAPGothic', sans-serif;
    font-size: 20px;
    font-weight: 700;
    color: #1E2430;
    background-color: transparent;
    padding: 0;
}
#HeartSwatch  { background-color: #C62828; border-radius: 3px; }
#BreathSwatch { background-color: #1F6FB2; border-radius: 3px; }

#MapDivider { background-color: #E4E6EA; min-height: 1px; }

/* ── segmented controls: grey track, buttons inside ── */
#MapSegment {
    background-color: #ECEEF1;
    border-radius: 10px;
    padding: 4px;
}

/* GtkRadioButton with draw-indicator=False — `#Id button` kept as well,
   in case the theme puts the button node one level down. */
#BodySkeletonRadio, #BodyJacketRadio, #SizeLRadio, #SizeXLRadio,
#ViewFrontRadio, #ViewBackRadio, #ViewRightRadio, #ViewLeftRadio,
#BodySkeletonRadio button, #BodyJacketRadio button,
#SizeLRadio button, #SizeXLRadio button,
#ViewFrontRadio button, #ViewBackRadio button,
#ViewRightRadio button, #ViewLeftRadio button {
    min-height: 46px;
    background-color: transparent;
    background-image: none;
    border-width: 0;
    border-radius: 7px;
    box-shadow: none;
    outline-style: none;
}
#BodySkeletonRadio label, #BodyJacketRadio label,
#SizeLRadio label, #SizeXLRadio label,
#ViewFrontRadio label, #ViewBackRadio label,
#ViewRightRadio label, #ViewLeftRadio label {
    font-size: 18px;
    font-weight: 500;
    color: #4A505B;
}
#BodySkeletonRadio:hover, #BodyJacketRadio:hover, #SizeLRadio:hover, #SizeXLRadio:hover,
#ViewFrontRadio:hover, #ViewBackRadio:hover, #ViewRightRadio:hover, #ViewLeftRadio:hover {
    background-color: rgba(255, 255, 255, 0.55);
}

/* body + size: selected = raised white chip, navy text */
#BodySkeletonRadio:checked, #BodyJacketRadio:checked,
#SizeLRadio:checked, #SizeXLRadio:checked,
#BodySkeletonRadio button:checked, #BodyJacketRadio button:checked,
#SizeLRadio button:checked, #SizeXLRadio button:checked {
    background-color: #FFFFFF;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.18);
}
#BodySkeletonRadio:checked label, #BodyJacketRadio:checked label,
#SizeLRadio:checked label, #SizeXLRadio:checked label {
    color: #0B3B6B;
    font-weight: 700;
}

/* 視点: selected = solid navy (it changes what you are looking at) */
#ViewFrontRadio:checked, #ViewBackRadio:checked,
#ViewRightRadio:checked, #ViewLeftRadio:checked,
#ViewFrontRadio button:checked, #ViewBackRadio button:checked,
#ViewRightRadio button:checked, #ViewLeftRadio button:checked {
    background-color: #0B3B6B;
}
#ViewFrontRadio:checked label, #ViewBackRadio:checked label,
#ViewRightRadio:checked label, #ViewLeftRadio:checked label {
    color: #FFFFFF;
    font-weight: 700;
}

/* ── 表示 rows: label left, sliding switch right ── */
#MapToggleRow { min-height: 48px; }
#MapToggleLabel {
    font-family: 'Noto Sans JP', 'IPAPGothic', sans-serif;
    font-size: 18px;
    font-weight: 400;
    color: #1E2430;
}

/* GtkSwitch: the `switch` node is the track, `slider` is the knob */
#ShowNumbersSwitch, #ShowVolumeMapSwitch, #ShowPointListSwitch, #BlackAudioSwitch {
    min-width: 56px;
    min-height: 30px;
    padding: 0;
    border: none;
    border-radius: 17px;
    background-color: #C4C8CF;
    background-image: none;
    box-shadow: none;
    outline-style: none;
    color: transparent;              /* hide the theme's I / O glyphs */
    font-size: 0;
}
#ShowNumbersSwitch:checked, #ShowVolumeMapSwitch:checked,
#ShowPointListSwitch:checked, #BlackAudioSwitch:checked {
    background-color: #2E7D32;
}
#ShowNumbersSwitch image, #ShowVolumeMapSwitch image,
#ShowPointListSwitch image, #BlackAudioSwitch image {
    color: transparent;
    -gtk-icon-source: none;
}
#ShowNumbersSwitch slider, #ShowVolumeMapSwitch slider,
#ShowPointListSwitch slider, #BlackAudioSwitch slider {
    min-width: 26px;
    min-height: 26px;
    margin: 2px;
    border: none;
    border-radius: 50%;
    background-color: #FFFFFF;
    background-image: none;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.35);
}

/* ── buttons ── */

/* 再生テスト — secondary: outline */
#SoundTestButton {
    min-height: 54px;
    background-color: #FFFFFF;
    background-image: none;
    border: 2px solid #0B3B6B;
    border-radius: 10px;
    outline-style: none;
}
#SoundTestButton label { color: #0B3B6B; font-size: 20px; font-weight: 700; }
#SoundTestButton image { color: #0B3B6B; margin-right: 6px; }
#SoundTestButton:hover  { background-color: #EEF3F9; }
#SoundTestButton:active { background-color: #DCE6F2; }

/* 解説を見る — the one primary action: solid navy */
#MapExplainButton {
    min-height: 60px;
    background-color: #0B3B6B;
    background-image: none;
    border-width: 0;
    border-radius: 12px;
    outline-style: none;
}
#MapExplainButton label { color: #FFFFFF; font-size: 22px; font-weight: 700; }
#MapExplainButton:hover  { background-color: #14538F; }
#MapExplainButton:active { background-color: #082C51; }

/* 戻る — red, below 解説を見る, bottom-right like every other page */
#MapBackButton {
    min-height: 56px;
    padding: 0 16px;
    background-color: #C62828;
    background-image: none;
    border-width: 0;
    border-radius: 12px;
    outline-style: none;
}
#MapBackButton label { color: #FFFFFF; font-size: 20px; font-weight: 700; }
#MapBackButton image { color: #FFFFFF; margin-right: 6px; }
#MapBackButton:hover  { background-color: #D33A3A; }
#MapBackButton:active { background-color: #A61F1F; }

/* the popup of any combo is a separate toplevel — keep it readable */
window.popup list row label { color: #111111; }

/* ---------- disabled states ---------- */
/* splash: modes unavailable until the device connects */
#Option1Button:disabled, #Option2Button:disabled, #Option3Button:disabled {
    background-color: #A8AFA0;
    border-color: rgba(0,0,0,0.25);
}
#Option1Button:disabled label,
#Option2Button:disabled label,
#Option3Button:disabled label { color: #EFEFEF; }

#ConnectionAlertLabel {
    font-family: 'Noto Sans JP', 'IPAPGothic', sans-serif;
    font-size: 22px;
    font-weight: 700;
    color: #ffffff;
    background-color: #C62828;
    padding: 10px 24px;
    margin: 8px 40px;
}
/* #BatteryLabel            { margin-left: 4px; } */
#BatteryLabel.battery-low { color: #c62828; font-weight: bold; }

/* ---------- power-off confirmation ---------- */
/* Own toplevel, so the generic `window` and `button` rules at the top of
   this file apply to it. Undo both, then restyle from scratch. */
#PowerOffDialog {
    background-image: none;
    background-color: #FFFFFF;
    border: 4px solid #0B3B6B;
}
#PowerOffDialog box,
#PowerOffDialog .dialog-vbox,
#PowerOffDialog .dialog-action-area {
    background-color: transparent;
    background-image: none;
}

#PowerOffMessage {
    font-family: 'Noto Sans JP', 'IPAPGothic', 'Noto Sans', sans-serif;
    font-size: 40px;
    font-weight: 700;
    color: #1e1e1e;
    margin: 36px 40px 24px 40px;
}

#PowerOffDialog button {
    min-height: 90px;
    min-width: 280px;
    margin: 0 20px 30px 20px;
    border: 2px solid rgba(0,0,0,0.45);
    border-radius: 0;
}
#PowerOffDialog button label { font-size: 34px; color: #ffffff; }

#PowerOffCancel        { background-color: #808080; }
#PowerOffCancel:hover  { background-color: #909090; }
#PowerOffCancel:active { background-color: #6E6E6E; }

#PowerOffConfirm        { background-color: #C62828; }
#PowerOffConfirm:hover  { background-color: #D33A3A; }
#PowerOffConfirm:active { background-color: #A61F1F; }