/* Cookie consent banner — PDPA (phayaotcl.com) */
#phayao-cookie-banner,
#phayao-cookie-modal {
  font-family: "Mitr", "Sarabun", sans-serif;
  font-size: 15px;
  line-height: 1.5;
  box-sizing: border-box;
}

#phayao-cookie-banner *,
#phayao-cookie-modal * {
  box-sizing: border-box;
}

#phayao-cookie-banner {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 99990;
  background: #fff;
  border-top: 3px solid #003366;
  box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.15);
  padding: 18px 20px;
  transform: translateY(110%);
  transition: transform 0.35s ease;
}

#phayao-cookie-banner.phayao-cookie-banner--show {
  transform: translateY(0);
}

.phayao-cookie-banner__inner {
  max-width: 1140px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
}

.phayao-cookie-banner__text {
  flex: 1 1 280px;
  color: #333;
  margin: 0;
}

.phayao-cookie-banner__text a {
  color: #0056b3;
  text-decoration: underline;
}

.phayao-cookie-banner__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  flex: 0 0 auto;
}

.phayao-cookie-btn {
  display: inline-block;
  padding: 10px 18px;
  border-radius: 8px;
  border: 2px solid #003366;
  background: #fff;
  color: #003366;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
  min-width: 120px;
  transition: background 0.2s, color 0.2s;
}

.phayao-cookie-btn:hover {
  background: #f0f4f8;
}

.phayao-cookie-btn--accept {
  background: #003366;
  color: #fff;
}

.phayao-cookie-btn--accept:hover {
  background: #0056b3;
  color: #fff;
}

.phayao-cookie-btn--reject {
  border-color: #666;
  color: #444;
}

.phayao-cookie-btn--settings {
  border-color: #003366;
  color: #003366;
}

/* Modal */
#phayao-cookie-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: rgba(0, 0, 0, 0.45);
  align-items: center;
  justify-content: center;
  padding: 16px;
}

#phayao-cookie-modal.phayao-cookie-modal--open {
  display: flex;
}

.phayao-cookie-modal__panel {
  background: #fff;
  border-radius: 14px;
  max-width: 520px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  padding: 24px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2);
}

.phayao-cookie-modal__panel h3 {
  margin: 0 0 8px;
  color: #003366;
  font-size: 1.25rem;
}

.phayao-cookie-modal__panel > p {
  margin: 0 0 18px;
  color: #555;
  font-size: 14px;
}

.phayao-cookie-category {
  border: 1px solid #e8e8e8;
  border-radius: 10px;
  padding: 14px 16px;
  margin-bottom: 12px;
}

.phayao-cookie-category__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.phayao-cookie-category__head strong {
  color: #003366;
}

.phayao-cookie-category p {
  margin: 8px 0 0;
  font-size: 13px;
  color: #666;
}

.phayao-cookie-toggle {
  position: relative;
  width: 48px;
  height: 26px;
  flex-shrink: 0;
}

.phayao-cookie-toggle input {
  opacity: 0;
  width: 0;
  height: 0;
}

.phayao-cookie-toggle__slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background: #ccc;
  border-radius: 26px;
  transition: 0.25s;
}

.phayao-cookie-toggle__slider:before {
  position: absolute;
  content: "";
  height: 20px;
  width: 20px;
  left: 3px;
  bottom: 3px;
  background: #fff;
  border-radius: 50%;
  transition: 0.25s;
}

.phayao-cookie-toggle input:checked + .phayao-cookie-toggle__slider {
  background: #003366;
}

.phayao-cookie-toggle input:checked + .phayao-cookie-toggle__slider:before {
  transform: translateX(22px);
}

.phayao-cookie-toggle--locked .phayao-cookie-toggle__slider {
  background: #003366;
  opacity: 0.55;
  cursor: not-allowed;
}

.phayao-cookie-modal__footer {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
  justify-content: flex-end;
}

.phayao-cookie-footer-link {
  color: #003366;
  font-size: 13px;
  margin: 0 8px;
  text-decoration: underline;
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
  font-weight: 600;
}

.phayao-cookie-footer-link:hover {
  color: #0056b3;
}

/* Contact map placeholder */
.contact-map-placeholder {
  min-height: 280px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 32px 20px;
  background: #f4f7fb;
  color: #333;
}

.contact-map-placeholder p {
  margin: 0 0 8px;
}

.btn-cookie-maps-load {
  margin-top: 14px;
  padding: 10px 22px;
  background: #003366;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
}

.btn-cookie-maps-load:hover {
  background: #0056b3;
}

.btn-map-external {
  margin-top: 10px;
  color: #0056b3;
  font-size: 14px;
}

.complaint-pdpa-label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 14px;
  color: #444;
  cursor: pointer;
  text-align: left;
}

.complaint-pdpa-label input {
  margin-top: 4px;
  flex-shrink: 0;
}

.complaint-pdpa-label a {
  color: #0056b3;
  text-decoration: underline;
}

@media (max-width: 576px) {
  .phayao-cookie-banner__actions {
    width: 100%;
  }

  .phayao-cookie-btn {
    flex: 1 1 100%;
  }
}
