/* =========================
   全站共用變數
========================= */

:root {
  --background-blue: #98d3f3;
  --background-white: #ffffff;

  --home-header-blue: #c1e3f5;
  --page-header-blue: #98d3f3;

  --black: #000000;
  --white: #ffffff;

  --gray: #6d6d6d;
  --light-gray: #eeeeee;

  --error-red: #b3261e;
  --success-green: #207227;

  --corner-radius: 25px;
  --page-width: 1280px;
}

/* =========================
   全站基本設定
========================= */

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;

  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;

  color: var(--black);

  font-family:
    Inter,
    Arial,
    Helvetica,
    "Noto Sans TC",
    sans-serif;

  background:
    linear-gradient(
      180deg,
      var(--background-blue) 0%,
      var(--background-white) 100%
    );
}

button,
input,
textarea,
select {
  font: inherit;
}

button {
  margin: 0;
  padding: 0;

  color: inherit;

  border: none;
  background: none;

  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
}

img {
  display: block;

  max-width: 100%;
}

/* =========================
   共用頁面寬度
========================= */

.page-content {
  width: min(100%, var(--page-width));
  margin: 0 auto;
}

/* =========================
   共用 Header
========================= */

.page-header {
  position: relative;
  z-index: 100;

  width: 100%;
  height: 95px;

  background-color: var(--page-header-blue);
}

.home-header {
  background-color: var(--home-header-blue);
}

.header-container {
  display: flex;
  align-items: center;
  justify-content: space-between;

  width: min(100%, var(--page-width));
  height: 100%;
  margin: 0 auto;
  padding: 0 42px;
}

.header-placeholder {
  width: 60px;
  height: 60px;
}

/* =========================
   共用 Icon 按鈕
========================= */

.icon-button {
  display: flex;
  align-items: center;
  justify-content: center;

  width: 60px;
  height: 60px;

  border-radius: 50%;

  transition:
    transform 0.2s ease,
    background-color 0.2s ease;
}

.icon-button:hover {
  background-color: rgba(255, 255, 255, 0.45);

  transform: scale(1.08);
}

.icon-button:active {
  transform: scale(0.95);
}

.icon-button img {
  width: 100%;
  height: 100%;

  object-fit: contain;
}

/* =========================
   圖片圓角
========================= */

.rounded-image {
  border-radius: var(--corner-radius);
}

/* =========================
   共用主要按鈕
========================= */

.primary-button {
  display: flex;
  align-items: center;
  justify-content: center;

  min-height: 58px;
  padding: 10px 28px;

  color: var(--white);

  font-size: 22px;
  font-weight: 800;

  border: 2px solid var(--black);
  border-radius: var(--corner-radius);

  background-color: var(--black);

  transition:
    color 0.2s ease,
    background-color 0.2s ease,
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

.primary-button:hover {
  color: var(--black);
  background-color: var(--white);

  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.14);

  transform: translateY(-3px);
}

.primary-button:active {
  transform: translateY(0);
}

.primary-button:disabled {
  cursor: wait;

  opacity: 0.65;
  transform: none;
}

/* =========================
   共用文字輸入框
========================= */

.text-input {
  width: 100%;
  min-height: 64px;
  padding: 0 24px;

  color: var(--black);

  font-size: 19px;

  border: 2px solid var(--black);
  border-radius: var(--corner-radius);
  outline: none;

  background-color: var(--white);

  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}

.text-input::placeholder {
  color: #999999;
}

.text-input:focus {
  box-shadow:
    0 0 0 4px rgba(255, 255, 255, 0.75),
    0 0 0 7px var(--black);
}

/* =========================
   訊息文字
========================= */

.error-message {
  color: var(--error-red);
}

.success-message {
  color: var(--success-green);
}

/* =========================
   鍵盤焦點
========================= */

button:focus-visible,
[role="link"]:focus-visible {
  outline: 3px solid var(--black);
  outline-offset: 4px;
}

/* =========================
   平板
========================= */

@media (max-width: 900px) {
  .header-container {
    padding: 0 28px;
  }
}

/* =========================
   手機
========================= */

@media (max-width: 620px) {
  .page-header {
    height: 78px;
  }

  .header-container {
    padding: 0 16px;
  }

  .header-placeholder,
  .icon-button {
    width: 50px;
    height: 50px;
  }

  .primary-button {
    min-height: 56px;

    font-size: 20px;
  }

  .text-input {
    min-height: 60px;
    padding: 0 18px;

    font-size: 17px;
  }
}