
/* メインタイトルセクション */
.main-title-section {
  text-align: center;
  margin-bottom: 0px;
  background-color: #F2F2F2;
  padding: 40px 0;
}

.main-title {
  font-size: 24px;
  font-weight: 600;
  color: #333333;
  margin-bottom: 20px;
  line-height: 1.4;
}

.sub-title {
  font-size: 18px;
  font-weight: 400;
  color: #333333;
  line-height: 1.4;
  margin-bottom: 20px;
}

/* フィルターコンテナ */
.filter-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 20px;
}

/* 全体フィルターボックス */
.filter-box {
  background-color: #FFFFFF;
  border: 3px solid #000000;
  width: 100%;
}

/* フィルターセクション */
.filter-section {
  display: flex;
  align-items: flex-start;
  padding: 16px 0px;
  border-bottom: 1px solid #000000;
  margin: 0 20px;
}

.filter-section:last-child {
  border-bottom: none;
}

/* セクションタイトル部分（左側） */
.section-header {
  width: 150px;
  flex-shrink: 0;
  position: relative;
  margin-right: 30px;
  padding-right: 34px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.section-title h3 {
  font-size: 16px;
  font-weight: 600;
  color: #333333;
  line-height: 1.3;
}

/* セクションコンテンツ部分（右側） */
.section-content {
  flex: 1;
}

/* チェックボックスグリッド */
.checkbox-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px 16px;
  width: 100%;
}

.checkbox-item {
  display: flex;
  align-items: center;
  white-space: nowrap;
  min-width: 0;
}

.checkbox-label {
  display: flex;
  align-items: center;
  font-size: 14px;
  font-weight: 400;
  color: #333333;
  cursor: pointer;
  line-height: 1.2;
  width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}

.checkbox-label input[type="checkbox"] {
  width: 16px;
  height: 16px;
  border: 1px solid #CCCCCC;
  border-radius: 2px;
  margin-right: 8px;
  appearance: none;
  background-color: #FFFFFF;
  cursor: pointer;
  position: relative;
  flex-shrink: 0;
}

.checkbox-label input[type="checkbox"]:checked {
  background-color: #6782AE;
  border-color: #6782AE;
}

.checkbox-label input[type="checkbox"]:checked::after {
  content: '✓';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: #FFFFFF;
  font-size: 12px;
  font-weight: bold;
}

/* カレンダー追加スタイル */
.calendar-wrapper {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: 20px;
}

.calendar-container {
  width: 100%;
  max-width: 380px;
}

.calendar-top {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 15px;
  gap: 20px;
}

.calendar-arrow {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1px solid #ddd;
  background: #fff;
  font-size: 16px;
  cursor: pointer;
  color: #666;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.calendar-arrow:hover {
  background: #f0f0f0;
  border-color: #999;
}

.month-container {
  display: flex;
  align-items: baseline;
  gap: 4px;
}

.month-label {
  font-size: 12px;
  color: #666;
}

.year-label {
  font-size: 24px;
  font-weight: 700;
  color: #333;
}

.month-container span:last-child {
  font-size: 14px;
  color: #666;
}

.calendar {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  border: 1px solid #ddd;
  table-layout: fixed;
}

.calendar th,
.calendar td {
  width: 14.28%;
  height: 48px;
  text-align: center;
  vertical-align: top;
  border: 1px solid #e0e0e0;
  padding: 2px;
  position: relative;
}

.calendar th {
  background: #888;
  color: #fff;
  font-size: 12px;
  font-weight: normal;
  height: 30px;
}

.calendar th.sun {
  background: #e57373;
}

.calendar th.sat {
  background: #3b96dd;
}

.empty-cell {
  background: #f5f5f5;
}

.sunday-bg {
  background: #ffeaea !important;
}

.saturday-bg {
  background: #eaf3ff !important;
}

.date {
  display: block;
  font-weight: 600;
  font-size: 13px;
  margin-bottom: 1px;
  color: #1a73e8;
  text-decoration: underline;
}

.date-weekend {
  color: #e74c3c;
}

.price {
  display: inline-block;
  font-size: 9px;
  background: #ededed;
  padding: 0px 4px;
  border-radius: 2px;
  border: 1px solid #d0d0d0;
  color: #424031;
  font-weight: 600;
  line-height: 1.2;
}

.ken {
  font-size: 7px;
  vertical-align: baseline;
}

.today {
  background-color: #ff7c00 !important;
}

.today .date {
  color: white !important;
}

.today .price {
  background: white;
  color: #333;
}

/* flexユーティリティクラス（旧構造との互換性） */
.flex {
  display: flex;
}

.col {
  flex-direction: column;
}

.a-c {
  align-items: center;
}

.a-b {
  align-items: baseline;
}

.j-c {
  justify-content: center;
}

.j-b {
  justify-content: space-between;
}

/* ボタンセクション */
.button-section {
  display: flex;
  flex-direction: column;
  gap: 15px;
  padding: 20px 0 0;
  width: 400px;
  margin: 0 auto;
}

/* 下部固定検索ボタン */
.fixed-search-button {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background-color: rgba(0, 0, 0, 0.2);
  padding: 15px 20px;
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
  z-index: 1000;
  transform: translateY(100%);
  transition: transform 0.3s ease-in-out;
  display: none;
  justify-content: center;
}

.fixed-search-button.show {
  transform: translateY(0);
  display: flex;
}

.fixed-search-button .search-button {
  width: 400px;
  max-width: calc(100vw - 40px);
  margin: 0;
  background-color: #FF7C00;
  border: 1px solid #FF7C00;
  border-radius: 4px;
  color: #FFFFFF;
  font-size: 16px;
  font-weight: 600;
  padding: 15px;
  text-align: center;
  cursor: pointer;
  letter-spacing: 0.02em;
  box-shadow: 0 2px 8px rgba(255, 124, 0, 0.3);
}

.fixed-search-button .search-button:hover {
  background-color: #e66a00;
  border-color: #e66a00;
  box-shadow: 0 4px 12px rgba(255, 124, 0, 0.4);
}

.search-button {
  background-color: #FF7C00;
  border: 1px solid #FF7C00;
  border-radius: 4px;
  color: #FFFFFF;
  font-size: 16px;
  font-weight: 600;
  padding: 15px;
  text-align: center;
  cursor: pointer;
  letter-spacing: 0.02em;
}

.search-button:hover {
  background-color: #e66a00;
  border-color: #e66a00;
}

.nav-button {
  background-color: #FFFFFF;
  border: 1px solid #CCCCCC;
  border-radius: 4px;
  color: #333333;
  font-size: 16px;
  font-weight: 400;
  padding: 15px;
  text-align: center;
  cursor: pointer;
  letter-spacing: 0.02em;
}

.nav-button:hover {
  background-color: #f8f9fa;
}

/* 検索ボタンエリア */
.search-button-area {
  margin-top: 40px;
  text-align: center;
}

.search-btn {
  display: inline-block;
  background-color: #FF7C00;
  color: #FFFFFF;
  padding: 15px 60px;
  font-size: 16px;
  font-weight: 600;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  text-decoration: none;
  letter-spacing: 0.05em;
  transition: background-color 0.3s;
}

.search-btn:hover {
  background-color: #e66a00;
}

.navigation-links {
  margin-top: 20px;
  display: flex;
  justify-content: center;
  gap: 30px;
}

.back-link,
.top-link {
  color: #6782AE;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  padding: 10px 20px;
  border: 1px solid #6782AE;
  border-radius: 4px;
  transition: all 0.3s;
}

.back-link:hover,
.top-link:hover {
  background-color: #6782AE;
  color: white;
}

/* iPad・タブレット最適化 */
@media (min-width: 769px) and (max-width: 1024px) {
  .filter-section {
    padding: 20px;
  }
  
  .section-header {
    margin-bottom: 0px;
  }
  
  .checkbox-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px 12px;
  }
  
  .checkbox-item {
    display: flex;
    align-items: center;
    white-space: nowrap;
    min-width: 0;
  }
  
  .calendar-wrapper {
    flex-direction: column;
    align-items: center;
    gap: 20px;
  }
  
  .calendar-container {
    width: 100%;
    max-width: 500px;
  }
  
  #calendar2Container {
    display: none;
  }
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
  .filter-box {
    width: 100%;
    margin: 0 10px;
  }
  
  .filter-section {
    flex-direction: column;
    gap: 20px;
    margin: 0;
    padding: 20px;
  }
  
  .section-header {
    min-width: auto;
    margin-right: 0;
    margin-bottom: 0px;
    padding-right: 0;
  }
  
  .button-section {
    width: 100%;
    max-width: 400px;
  }
}

@media (max-width: 768px) {
  /* レスポンシブ表示制御 */
  .pc-only {
    display: none !important;
  }
  
  .mobile-only {
    display: flex !important;
  }
  
  .checkbox-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px 10px;
  }
  
  .checkbox-item {
    display: flex;
    align-items: center;
    white-space: nowrap;
    min-width: 0;
  }
  
  .main-title-section {
    text-align: center;
    margin-bottom: 0px;
    background-color: #F2F2F2;
    padding: 14px 0;
  }
  
  .main-title {
    font-size: 20px;
  }
  
  .sub-title {
    font-size: 16px;
  }
  
  .section-header {
    width: 100%;
  }
  
  .button-section {
    width: 100%;
    max-width: 400px;
  }
  
  .filter-section {
    padding: 20px;
  }
  
  /* カレンダー関連 */
  .calendar-wrapper {
    flex-direction: column;
    width: 100%;
    padding: 15px;
    background: white;
  }
  
  .calendar-container {
    width: 100%;
    max-width: 100%;
  }
  
  #calendar2Container {
    display: none;
  }
  
  .calendar-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
    width: 100%;
    padding: 0 5px;
  }
  

  
  .month-container {
    flex: 1;
    text-align: center;
    justify-content: center;
  }
  
  .year-label {
    font-size: 18px;
  }
  
  .month-label {
    font-size: 12px;
  }
  
  .calendar {
    width: 100%;
    margin: 0 auto;
  }
  
  .calendar th {
    font-size: 11px;
    padding: 5px;
    height: 25px;
  }
  
  .calendar td {
    height: 45px;
    padding: 3px;
    font-size: 12px;
  }
  
  .date {
    font-size: 13px;
  }
  
  .price {
    font-size: 10px;
    padding: 1px 4px;
  }
  
  /* 検索ボタンエリア */
  .search-button-area {
    padding: 20px 15px;
    margin-top: 20px;
  }
  
  .search-btn {
    width: 100%;
    padding: 12px 30px;
    font-size: 15px;
  }
  
  .navigation-links {
    flex-direction: column;
    gap: 10px;
    margin-top: 15px;
  }
  
  .back-link,
  .top-link {
    width: 100%;
    text-align: center;
    padding: 10px;
  }
}

@media (max-width: 480px) {
  .checkbox-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 6px 8px;
  }
  
  .checkbox-item {
    display: flex;
    align-items: center;
    white-space: nowrap;
    min-width: 0;
  }
  
  .checkbox-label {
    font-size: 13px;
  }
  
  .page-container {
    padding: 20px 10px;
  }
  
  .filter-box {
    margin: 0;
  }
  
  .filter-section {
    padding: 15px;
    margin: 0;
  }
  
  .section-header {
    margin-bottom: 0px;
  }
}

/* 320px以下での1列レイアウト（施工可能エリア・会社所在地以外） */
@media (max-width: 320px) {
  .checkbox-grid {
    grid-template-columns: 1fr;
  }
  
  /* 施工可能エリアと会社所在地は2列を維持 */
  .filter-section:nth-child(1) .checkbox-grid,
  .filter-section:nth-child(2) .checkbox-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}