/**
 * Customer Bottom Bar - ภูกระแต v3.1
 * ใช้ร่วมกันทุกหน้าลูกค้า
 */

/* Bottom Bar */
.customer-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: white;
  padding: 8px 15px;
  box-shadow: 0 -2px 15px rgba(0,0,0,0.1);
  display: flex;
  gap: 10px;
  z-index: 100;
}

.customer-bar .bar-btn {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 10px 5px;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  font-family: 'Prompt', sans-serif;
  font-size: 0.75rem;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.2s;
}

.customer-bar .bar-btn:active {
  transform: scale(0.95);
}

.customer-bar .bar-btn .icon {
  font-size: 1.3rem;
}

/* ปุ่ม กางเต็นท์ / เสียงดัง */
.customer-bar .bar-btn.camp {
  background: linear-gradient(135deg, #E8F5E9, #C8E6C9);
  color: #2E7D32;
}

.customer-bar .bar-btn.noise {
  background: linear-gradient(135deg, #FFF3E0, #FFE0B2);
  color: #E65100;
}

.customer-bar .bar-btn.noise.quiet-hours {
  background: linear-gradient(135deg, #FFEBEE, #FFCDD2);
  color: #C62828;
  animation: pulse-warning 2s infinite;
}

@keyframes pulse-warning {
  0%, 100% { box-shadow: 0 0 0 0 rgba(198, 40, 40, 0.3); }
  50% { box-shadow: 0 0 0 8px rgba(198, 40, 40, 0); }
}

/* ปุ่ม สถานะ */
.customer-bar .bar-btn.status {
  background: linear-gradient(135deg, #E3F2FD, #BBDEFB);
  color: #1565C0;
}

/* ปุ่ม SOS */
.customer-bar .bar-btn.sos {
  background: linear-gradient(135deg, #FFEBEE, #FFCDD2);
  color: #C62828;
}

/* Modal */
.cb-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.5);
  z-index: 200;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 15px;
}

.cb-modal.show {
  display: flex;
}

.cb-modal-content {
  background: white;
  border-radius: 15px;
  width: 100%;
  max-width: 420px;
  max-height: 90vh;
  overflow-y: auto;
}

.cb-modal-header {
  padding: 15px 20px;
  border-radius: 15px 15px 0 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.cb-modal-header.sos {
  background: #FFEBEE;
  color: #C62828;
}

.cb-modal-header.noise {
  background: #FFF3E0;
  color: #E65100;
}

.cb-modal-header.noise.quiet-hours {
  background: #FFEBEE;
  color: #C62828;
}

.cb-modal-title {
  font-size: 1.1rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
}

.cb-modal-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: #999;
  line-height: 1;
}

.cb-modal-body {
  padding: 20px;
}

/* Form Elements */
.cb-form-group {
  margin-bottom: 12px;
}

.cb-form-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 500;
  margin-bottom: 6px;
  color: #333;
}

.cb-form-input {
  width: 100%;
  padding: 10px 12px;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  font-size: 0.95rem;
  font-family: inherit;
}

.cb-form-input:focus {
  outline: none;
  border-color: #4CAF50;
}

/* Option Grid */
.cb-option-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-bottom: 15px;
}

.cb-option {
  border: 2px solid #e0e0e0;
  border-radius: 10px;
  padding: 12px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
}

.cb-option:hover {
  border-color: #4CAF50;
}

.cb-option.selected {
  border-color: #4CAF50;
  background: #E8F5E9;
}

.cb-option.sos:hover,
.cb-option.sos.selected {
  border-color: #f44336;
  background: #FFEBEE;
}

.cb-option.noise:hover,
.cb-option.noise.selected {
  border-color: #FF9800;
  background: #FFF3E0;
}

.cb-option .icon {
  font-size: 1.5rem;
  margin-bottom: 5px;
}

.cb-option .label {
  font-size: 0.8rem;
}

/* Severity Buttons */
.cb-severity-btns {
  display: flex;
  gap: 8px;
  margin-bottom: 15px;
}

.cb-severity-btn {
  flex: 1;
  padding: 10px;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  text-align: center;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.85rem;
  background: white;
  transition: all 0.2s;
}

.cb-severity-btn.selected {
  border-color: #FF9800;
  background: #FFF3E0;
}

/* Checkbox Group */
.cb-checkbox-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 12px 0;
}

.cb-checkbox-label {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  padding: 10px;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  font-size: 0.9rem;
}

.cb-checkbox-label input {
  width: 18px;
  height: 18px;
}

/* Submit Buttons */
.cb-submit-btn {
  width: 100%;
  padding: 14px;
  border: none;
  border-radius: 10px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  margin-top: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.cb-submit-btn.sos {
  background: linear-gradient(135deg, #f44336, #d32f2f);
  color: white;
}

.cb-submit-btn.noise {
  background: linear-gradient(135deg, #FF9800, #F57C00);
  color: white;
}

/* Guest Info Box */
.cb-guest-info {
  margin-bottom: 15px;
  padding: 15px;
  background: #FFF3E0;
  border-radius: 10px;
}

.cb-guest-info .hint {
  font-size: 0.85rem;
  color: #E65100;
  margin-bottom: 10px;
}

/* Quiet Hours Warning */
.cb-quiet-warning {
  background: #FFEBEE;
  color: #C62828;
  padding: 10px 15px;
  border-radius: 8px;
  font-size: 0.85rem;
  margin-bottom: 15px;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Toast */
.cb-toast {
  position: fixed;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%);
  background: #333;
  color: white;
  padding: 12px 24px;
  border-radius: 25px;
  z-index: 300;
  display: none;
  font-size: 0.9rem;
}

.cb-toast.show {
  display: block;
}

/* Adjust body padding for bottom bar */
body.has-customer-bar {
  padding-bottom: 80px;
}
