/*
Theme Name: n-kaigo Map Test
Description: Test stylesheet for map feature (extracted from style.css)
Version: 1.0.0
*/

/* ========================================
   Service Page Styles (from style.css)
   ======================================== */

/* Service Container */
.service-single-container {
  max-width: 100%;
  margin: 0;
  padding: 0;
  border-radius: 0;
}

/* Service Section Base */
.service-section {
  position: relative;
  overflow: hidden;
  padding: 40px 20px;
  text-align: center;
  padding-bottom: 50px;
}
.service-section:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
}
.service-section .container {
  position: relative;
  z-index: 10;
}
.service-section h2 {
  padding: 10px 30px;
  display: inline-block;
  margin-bottom: 30px;
  text-align: center;
  z-index: 2;
}

/* Section Layout */
.section-layout {
  display: flex;
  gap: 30px;
  max-width: 1200px;
  margin: 0 auto;
}

.section-layout__image {
  flex-basis: 50%;
  text-align: left;
  position: relative;
}
.section-layout__image img {
  width: 100%;
  height: auto;
  border-radius: 8px;
}

.section-layout__text {
  flex-basis: 50%;
  text-align: left;
  position: relative;
}

/* Background Text */
.section-bg-text {
  position: absolute;
  top: 50%;
  font-family: "Bungee Outline", sans-serif;
  font-size: 120px;
  color: rgba(255, 255, 255, 0.5);
  z-index: 0;
  transform: translateY(-50%);
  user-select: none;
}
.section-bg-text span {
  display: block;
  line-height: 1.3;
}

/* Service Content Wrapper - Alternating Patterns */
.service-content-wrapper .service-section:nth-child(3n+1) {
  background-color: #3f9d00;
  padding: 40px;
  border-bottom: none;
}
.service-content-wrapper .service-section:nth-child(3n+1) h2 {
  color: #fff;
}
.service-content-wrapper .service-section:nth-child(3n+1) .section-layout {
  align-items: center;
  flex-direction: row;
}
.service-content-wrapper .service-section:nth-child(3n+1) .section-bg-text {
  left: 20px;
  right: auto;
  text-align: left;
}

.service-content-wrapper .service-section:nth-child(3n+2) {
  background-color: #96e884;
  padding: 40px;
  border-bottom: none;
}
.service-content-wrapper .service-section:nth-child(3n+2) .section-layout {
  align-items: center;
  flex-direction: row-reverse;
}
.service-content-wrapper .service-section:nth-child(3n+2) .section-bg-text {
  right: 20px;
  left: auto;
  text-align: right;
}

.service-content-wrapper .service-section:nth-child(3n+3) {
  background-color: transparent;
  padding: 40px 40px 30px;
}
.service-content-wrapper .service-section:nth-child(3n+3) .section-layout {
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 20px;
}
.service-content-wrapper .service-section:nth-child(3n+3) .section-bg-text {
  display: none;
}

/* Highlight Text */
.highlight-text {
  color: #000;
  width: 100%;
}

/* Service Body Content */
.service-body-content {
  max-width: 1000px;
  margin-left: auto;
  margin-right: auto;
  text-align: left;
  font-size: clamp(16px, 2vw, 20px);
}

.service-first-view .service-body-content,
.service-problem .service-body-content,
.service-section.service-detail .service-body-content {
  background-color: bisque !important;
  color: #000 !important;
  padding: 20px;
  border-radius: 8px;
}

.service-body-content h3 {
  font-family: "BIZ UDPGothic", sans-serif;
  font-size: clamp(18px, 2.5vw, 24px);
  font-weight: bold;
  color: #000;
  position: relative;
  display: inline-block;
  padding-bottom: 5px;
  margin-top: 40px;
  margin-bottom: 20px;
  z-index: 1;
}

.service-body-content ul {
  list-style: none;
  padding-left: 0;
  margin-left: 10px;
  background: #fffde8;
  box-shadow: 0px 0px 0px 10px #fffde8;
  border: dashed 2px #ffb03f;
  border-radius: 9px;
  margin-bottom: 30px;
  padding: 0.5em 0.5em 0.5em 2em;
}

.service-body-content ul li {
  position: relative;
  padding-left: 10px;
  margin-bottom: 0;
  font-size: clamp(16px, 2vw, 20px);
}

.service-body-content ol {
  background: #fffde8;
  box-shadow: 0px 0px 0px 10px #fffde8;
  border: dashed 2px #ffb03f;
  border-radius: 9px;
  margin-left: 10px;
  margin-right: 10px;
  margin-bottom: 30px;
  padding: 0.5em 0.5em 0.5em 2em;
}

.service-body-content ol li {
  font-size: clamp(16px, 2vw, 20px);
}

.service-body-content strong,
.service-body-content b {
  font-weight: bold;
  background: linear-gradient(transparent 60%, #ffd700 60%);
  position: relative;
  z-index: 1;
}

.service-body-content p {
  margin-bottom: 1.5em;
}

/* Service First View */
.service-first-view .section-layout {
  display: flex;
  align-items: center;
  gap: 40px;
  z-index: 2;
}
.service-first-view .section-layout__image {
  flex-basis: 40%;
  z-index: 2;
}
.service-first-view .section-layout__image img {
  width: 100%;
  height: auto;
  max-height: 500px;
  object-fit: cover;
  object-position: top;
  border-radius: 8px;
}
.service-first-view .highlight-text {
  margin-top: 30px;
  background-color: #f9f9f9;
  border-left: 5px solid #f39800;
  padding: 20px;
}

/* ========================================
   Map Test - Additional Styles
   ======================================== */

/* Area Map Section */
.area-map-section {
  position: relative;
  padding: 80px 20px;
  background: transparent;
  overflow: hidden;
}

.area-map-section .section-bg-text {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0.03;
  font-size: 100px;
  font-weight: 900;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  pointer-events: none;
  z-index: 1;
}

.area-map-section .section-title {
  position: relative;
  z-index: 10;
  font-size: clamp(28px, 4vw, 42px);
  text-align: center;
  margin-bottom: 50px;
  color: #fff;
  font-weight: 400;
}

.area-map-section .container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  gap: 40px;
  align-items: flex-start;
}

.area-map-wrapper {
  position: relative;
  z-index: 10;
  max-width: 525px;
  flex-shrink: 0;
  padding: 20px;
  border-radius: 8px;
}

.area-map-description {
  flex: 1;
  position: relative;
  z-index: 10;
  text-align: left;
}

.map-container {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  grid-template-rows: repeat(6, auto);
  gap: 8px;
  width: 100%;
}

/* Area Box */
.area-box {
  padding: 18px 10px;
  border-radius: 8px;
  font-weight: 700;
  font-size: clamp(14px, 1.8vw, 18px);
  text-align: center;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  min-height: 70px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.area-box:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

/* Grid Layout */
.area-box[data-area="fujisoka"] { grid-column: 3; grid-row: 1; }
.area-box[data-area="obara"] { grid-column: 4; grid-row: 1; }
.area-box[data-area="asahi"] { grid-column: 5; grid-row: 1; }
.area-box[data-area="inabu"] { grid-column: 6 / 8; grid-row: 1; }

.area-box[data-area="sanage"] { grid-column: 3 / 5; grid-row: 2; }
.area-box[data-area="asuke"] { grid-column: 5 / 7; grid-row: 2 / 4; }

.area-box[data-area="miyoshi"] { grid-column: 1 / 3; grid-row: 3; }
.area-box[data-area="koromo"] { grid-column: 3; grid-row: 3; }
.area-box[data-area="takahashi"] { grid-column: 4; grid-row: 3; }

.area-box[data-area="takaoka"] { grid-column: 2; grid-row: 4; }
.area-box[data-area="kamigo"] { grid-column: 3; grid-row: 4; }
.area-box[data-area="matsudaira"] { grid-column: 4; grid-row: 4; }
.area-box[data-area="shimoyama"] { grid-column: 5 / 7; grid-row: 4; }

.area-box[data-area="chiryu"] { grid-column: 1 / 3; grid-row: 5; }
.area-box[data-area="anjo"] { grid-column: 3 / 5; grid-row: 5; }
.area-box[data-area="okazaki"] { grid-column: 5 / 7; grid-row: 5; }

/* Status Colors */
.area-box.status-vacant {
  background-color: #28a745;
  color: #fff;
}

.area-box.status-busy {
  background-color: #ffc107;
  color: #333;
}

.area-box.status-full {
  background-color: #dc3545;
  color: #fff;
}

.area-box.status-unavailable {
  background-color: #999;
  color: #fff;
}

/* Map Legend */
.map-legend {
  max-width: 525px;
  margin: 0 auto;
  padding: 20px;
  background: transparent;
  border-radius: 8px;
  display: flex;
  justify-content: center;
  gap: 15px;
  flex-wrap: wrap;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 16px;
  font-weight: 400;
  color: #000;
}

.legend-color {
  width: 40px;
  height: 30px;
  border-radius: 4px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.legend-color.status-vacant {
  background-color: #28a745;
}

.legend-color.status-busy {
  background-color: #ffc107;
}

.legend-color.status-full {
  background-color: #dc3545;
}

.legend-color.status-unavailable {
  background-color: #999;
}

/* ========================================
   Booking Calendar Test Section
   ======================================== */

.booking-calendar-section {
  position: relative;
  padding: 80px 20px;
  background: #5fcf9f;
  overflow: hidden;
}

.booking-calendar-section .section-title {
  position: relative;
  z-index: 10;
  font-size: clamp(28px, 4vw, 42px);
  text-align: center;
  margin-bottom: 50px;
  color: #FFF;
  font-weight: 400;
}

.booking-calendar-wrapper {
  position: relative;
  z-index: 10;
  max-width: 700px;
  margin: 0 auto;
  background: #fff;
  padding: 40px;
  border-radius: 20px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Calendar Header */
.calendar-header {
  text-align: center;
  margin-bottom: 30px;
  padding-bottom: 20px;
  border-bottom: 3px solid #5fcf9f;
}

.calendar-header h3 {
  font-size: 24px;
  color: #333;
  font-weight: 700;
  margin: 0;
}

/* Month Navigation */
.calendar-month-nav {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
  margin-bottom: 30px;
}

.calendar-month-nav button {
  background: none;
  border: none;
  font-size: 24px;
  color: #5fcf9f;
  cursor: pointer;
  padding: 5px 15px;
  transition: color 0.3s;
}

.calendar-month-nav button:hover {
  color: #3fb080;
}

.current-month {
  font-size: 18px;
  font-weight: 700;
  color: #333;
  min-width: 150px;
  text-align: center;
}

/* Calendar Grid */
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 5px;
}

.calendar-day-header {
  text-align: center;
  padding: 10px;
  font-weight: 700;
  font-size: 14px;
  color: #333;
  background: #f5f5f5;
}

/* ここがポイント！ */
#calendarDays {
  display: contents;
}

.calendar-day-header.sunday {
  color: #e53935;
}

.calendar-day-header.saturday {
  color: #1e88e5;
}

.calendar-day {
  aspect-ratio: 1;
  border: 1px solid #ddd;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background-color 0.3s, transform 0.2s;
  font-size: 16px;
  font-weight: 700;
  position: relative;

}

.calendar-day:hover:not(.disabled):not(.past) {
  background-color: #e3f7ed;
  transform: scale(1.05);
}

.calendar-day.sunday {
  color: #e53935;
}

.calendar-day.saturday {
  color: #1e88e5;
}

.calendar-day.disabled,
.calendar-day.past {
  color: #ccc;
  cursor: not-allowed;
}

.calendar-day.disabled:hover,
.calendar-day.past:hover {
  background-color: transparent;
  transform: none;
}

.calendar-day-number {
  font-size: 18px;
  margin-bottom: 5px;
}

.calendar-day-status {
  font-size: 24px;
  color: #1e88e5;
}

.calendar-day-status.unavailable {
  color: #999;
}


.calendar-note {
  margin-top: 30px;
  padding: 15px;
  background: #fff9e6;
  border-left: 4px solid #ffa726;
  border-radius: 4px;
}

.calendar-note p {
  margin: 0;
  font-size: 14px;
  color: #666;
}

/* Time Modal */
.time-modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  overflow: auto;
}

.time-modal.show {
  display: block;
}

.time-modal-content {
  background-color: #fff;
  margin: 5% auto;
  max-width: 600px;
  border-radius: 20px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: translateY(-50px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.time-modal-header {
  padding: 30px;
  border-bottom: 3px solid #5fcf9f;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.time-modal-header h3 {
  margin: 0;
  font-size: 24px;
  font-weight: 700;
  color: #333;
}

.close-modal {
  background: none;
  border: none;
  font-size: 36px;
  color: #999;
  cursor: pointer;
  line-height: 1;
  padding: 0;
  width: 40px;
  height: 40px;
}

.close-modal:hover {
  color: #333;
}

.time-modal-body {
  padding: 30px;
  max-height: 60vh;
  overflow-y: auto;
}

.selected-date-display {
  text-align: center;
  margin-bottom: 20px;
}

.selected-date-display a {
  color: #1e88e5;
  text-decoration: underline;
  font-size: 14px;
}

.time-date-nav {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
  margin-bottom: 30px;
}

.time-date-nav button {
  background: none;
  border: none;
  font-size: 24px;
  color: #5fcf9f;
  cursor: pointer;
  padding: 5px 15px;
}

.time-date-nav button:hover {
  color: #3fb080;
}

.time-date-nav span {
  font-size: 18px;
  font-weight: 700;
  color: #333;
  min-width: 150px;
  text-align: center;
}

.time-section {
  margin-bottom: 30px;
}

.time-section h4 {
  text-align: center;
  font-size: 18px;
  font-weight: 700;
  padding: 10px;
  background: #f5f5f5;
  border-radius: 8px;
  margin-bottom: 15px;
}

.time-slots {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.time-slot {
  padding: 15px;
  border: 2px solid #ddd;
  border-radius: 8px;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s;
  font-size: 16px;
  font-weight: 600;
  background: #fff;
}

.time-slot:hover:not(.disabled) {
  background: #e3f7ed;
  border-color: #5fcf9f;
  transform: translateX(5px);
}

.time-slot.available {
  color: #1e88e5;
  border-color: #1e88e5;
}

.time-slot.disabled {
  background: #f5f5f5;
  color: #999;
  cursor: not-allowed;
  text-decoration: line-through;
}

.time-slot.selected {
  background: #1e88e5;
  color: #fff;
  border-color: #1e88e5;
}

.time-modal-footer {
  padding: 20px 30px;
  border-top: 1px solid #eee;
  text-align: center;
}

.btn-back {
  background: #fff;
  border: 2px solid #ffa726;
  color: #ffa726;
  padding: 12px 40px;
  border-radius: 25px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
}

.btn-back:hover {
  background: #ffa726;
  color: #fff;
}

/* Responsive */
@media (max-width: 768px) {
  .section-layout {
    flex-direction: column;
    gap: 30px;
  }

  .service-section {
    padding: 60px 15px;
  }

  .area-map-section .container {
    flex-direction: column;
    gap: 30px;
  }

  .area-map-wrapper {
    padding: 15px;
    max-width: 100%;
  }

  .map-legend {
    gap: 20px;
    padding: 20px;
  }

  .legend-item {
    font-size: 14px;
  }

  .booking-calendar-wrapper {
    padding: 20px;
  }
}
