/* ======================
   帳票ダウンロードページ CSS
   画像デザインに基づくレイアウト
====================== */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Noto Sans JP", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  min-height: 100vh;
  color: #333;
}

/* メインコンテナ */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px 0 20px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ヘッダーセクション */
.header-section {
  /* コンテナ内に置きつつ背景を左右いっぱい（フルブリード）に */
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  background: #ffffff;
  border-bottom: 3px solid #f0f0f0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-content {
  max-width: 1000px;
  margin: 0 auto;
  /* display: flex; */
  padding: clamp(16px, 3vw, 12px) clamp(20px, 4vw, 40px);
  justify-content: flex-start;
  align-items: center;
  flex-wrap: wrap;
  gap: clamp(12px, 2vw, 20px);
}

.header-logo {
  flex: 0 0 auto;
  min-width: 200px;
}

.header-title {
  font-size: clamp(18px, 4vw, 28px);
  font-weight: 700;
  color: #2c3e50;
  margin: 0;
  letter-spacing: 0.5px;
  background: linear-gradient(135deg, #2c3e50 0%, #3498db 100%);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* ヘッダー情報 */
.header-info {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: clamp(4px, 1vw, 8px);
  flex: 0 0 auto;
}

.version-text,
.update-text {
  font-size: clamp(10px, 2.2vw, 13px);
  color: #000000;
  line-height: 1.4;
  white-space: nowrap;
}

/* メインバックグラウンドコンテナ */
.main-background-container {
  /* ヘッダーとフッターに合わせてフルブリード */
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  /* 上下はヘッダーとフッターに合わせる */
  flex: 1;
  /* バックグラウンド画像設定 */
  background-image: url("img/background.png");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
  /* フレキシブルなレイアウト */
  display: flex;
  align-items: center;
  justify-content: center;
  /* flex: 1により自動的に残りスペースを使用 */
}

/* メインセクション */
.main-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
  max-width: 1000px;
  margin: 0 auto;
  width: 100%;
  /* バックグラウンドコンテナ内でのレイアウト */
  padding: clamp(40px, 8vw, 80px) clamp(20px, 4vw, 40px);
}

/* コンテンツエリア */
.content-area {
  max-width: 400px;
}

.main-title {
  font-size: 42px;
  font-weight: 700;
  color: #2c3e50;
  margin-bottom: 30px;
  line-height: 1.2;
  letter-spacing: 0.5px;
}

.description-text {
  margin-bottom: 40px;
}

.description-text p {
  font-size: 16px;
  color: #5a6c7d;
  line-height: 1.6;
  margin-bottom: 8px;
}

/* フォームエリア */
.form-area {
  width: 100%;
}

.select-box {
  width: 100%;
  height: 50px;
  border: 2px solid #ddd;
  border-radius: 6px;
  padding: 0 20px;
  font-size: 16px;
  background: white;
  margin-bottom: 20px;
  outline: none;
  transition: border-color 0.3s ease;
  appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23666' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6,9 12,15 18,9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 15px center;
  background-size: 16px;
  cursor: pointer;
}

.select-box:focus {
  border-color: #4285f4;
  box-shadow: 0 0 0 3px rgba(66, 133, 244, 0.1);
}

.download-btn {
  width: auto;
  height: 40px;
  background: #4285f4;
  color: white;
  border: none;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(66, 133, 244, 0.3);
  padding: 0 24px;
  margin: 0;
  align-self: flex-start;
}

.download-btn:hover {
  background: #3367d6;
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(66, 133, 244, 0.4);
}

.download-btn:active {
  transform: translateY(0);
}

/* Excelイラストレーション */
.excel-illustration {
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  height: 400px;
  background: url("img/Excelイラスト@2x.png") no-repeat center;
  background-size: contain;
  opacity: 0.9;
}

/* フッターセクション */
.footer-section {
  /* コンテナ内に置きつつ背景を左右いっぱい（フルブリード）に */
  text-align: left;
  width: 100vw;
  /* 両端まで広げるフルブリード手法 */
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  /* 上下余白はフレキシブルに */
  padding: clamp(32px, 6vw, 64px) clamp(16px, 4vw, 32px);
  background: #ffffff;
  /* フレキシブルなレイアウト */
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  min-height: fit-content;
}

.company-name {
  font-size: clamp(12px, 2.5vw, 16px);
  color: #666;
  font-weight: 500;
  margin-top: clamp(12px, 3vw, 20px);
  text-align: center;
  width: 100%;
}

/* お問い合わせエリア */
.contact-area {
  background: transparent;
  border-radius: 0;
  padding: 0;
  width: 100%;
  max-width: 1000px;
  margin: 0 auto;
  padding-left: clamp(20px, 4vw, 40px);
  box-sizing: border-box;
  /* フレキシブルなレイアウト */
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: clamp(8px, 2vw, 16px);
}

.contact-area h3 {
  font-size: clamp(16px, 3.5vw, 20px);
  color: #2c3e50;
  margin-bottom: 0;
  font-weight: 600;
  text-align: center;
}

.contact-area p {
  color: #5a6c7d;
  font-size: clamp(12px, 2.8vw, 15px);
  margin-bottom: 0;
  line-height: 1.5;
  text-align: center;
}

.form-link-area {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(6px, 1.5vw, 10px);
  margin-top: clamp(4px, 1vw, 8px);
}

.link-icon {
  font-size: clamp(14px, 3vw, 18px);
  color: #4285f4;
}

.form-link {
  color: #4285f4;
  text-decoration: none;
  font-weight: 500;
  font-size: clamp(12px, 2.8vw, 15px);
}

.form-link:hover {
  text-decoration: underline;
}

/* ローディング表示 */
#loading {
  display: none;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: white;
  padding: 20px 30px;
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  text-align: center;
  z-index: 1000;
  font-weight: 500;
}

/* レスポンシブ対応 */
@media (max-width: 900px) {
  .main-section {
    grid-template-columns: 1fr;
    gap: 40px;
    text-align: center;
    padding: clamp(30px, 6vw, 60px) clamp(15px, 3vw, 30px);
  }
  
  .content-area {
    max-width: none;
  }
  
  .excel-illustration {
    height: 300px;
  }
  
  .header-content {
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
    /* gap: clamp(12px, 3vw, 20px); */
  }
  
  .header-info {
    align-items: flex-start;
  }
}

@media (max-width: 600px) {
  .container {
    padding: 0 15px;
  }
  
  .main-background-container {
    background-attachment: scroll; /* モバイルでfixedを無効化 */
  }
  
  .main-section {
    padding: clamp(20px, 5vw, 40px) clamp(10px, 2vw, 20px);
  }
  
  .main-title {
    font-size: 32px;
  }
  
  .excel-illustration {
    height: 250px;
  }
}

/* アプリ表示制御 */
#app {
  display: none !important;
}

#app[style*="flex"],
#app[style*="block"] {
  display: flex !important;
  flex-direction: column;
}