/* 
  Support Widget Styles
  - Floating Action Button (FAB)
  - Dialog box
*/

#support-wrapper {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 1050; /* High z-index to float above other content */
}

#support-fab {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background-color: #0d6efd; /* Bootstrap primary blue */
  color: white;
  border: none;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease-in-out;
}

#support-fab:hover {
  transform: scale(1.05);
}

#support-fab svg {
  width: 24px;
  height: 24px;
}

#support-dialog {
  position: absolute;
  bottom: 70px; /* Position above the FAB */
  right: 0;
  width: 320px;
  background-color: #fff;
  border-radius: 12px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  transition: opacity 0.2s ease, transform 0.2s ease;
  transform-origin: bottom right;
}

#support-dialog.hidden {
  opacity: 0;
  transform: scale(0.95);
  pointer-events: none;
}

#support-dialog.visible {
  opacity: 1;
  transform: scale(1);
}

.sd-header {
  padding: 16px 20px;
  border-bottom: 1px solid #eee;
}

.sd-header p {
  font-size: 18px;
  font-weight: 600;
  margin: 0;
  color: #212529;
}

.sd-header span {
  font-size: 14px;
  color: #6c757d;
}

#sd-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  padding: 16px;
}

.sd-split-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 16px 8px;
  border: 1px solid #dee2e6;
  border-radius: 8px;
  background: #f8f9fa;
  cursor: pointer;
  text-align: center;
  transition: background-color 0.2s, border-color 0.2s;
}

.sd-split-btn:hover {
  background-color: #e9ecef;
  border-color: #ced4da;
}

.sd-icon-circle {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 8px;
}

.sd-icon-call { background-color: #e8f5e9; }
.sd-icon-call svg { color: #2e7d32; }
.sd-icon-msg { background-color: #e8eaf6; }
.sd-icon-msg svg { color: #3949ab; }

.sd-btn-label {
  font-weight: 600;
  font-size: 14px;
  color: #343a40;
}

.sd-btn-sub {
  font-size: 12px;
  color: #6c757d;
}

#sd-phone, #sd-form, #sd-success {
  display: none; /* Hidden by default */
  padding: 20px;
  flex-direction: column;
}

#sd-phone.open, #sd-form.open {
  display: flex;
}

.sd-back-btn {
  display: flex;
  align-items: center;
  gap: 4px;
  background: none;
  border: none;
  font-size: 14px;
  color: #6c757d;
  cursor: pointer;
  margin-bottom: 16px;
  padding: 0;
}

.sd-phone-number {
  font-size: 20px;
  font-weight: 600;
  color: #212529;
  text-align: center;
  margin-bottom: 8px;
}

.sd-call-link {
  font-size: 14px;
  color: #0d6efd;
  text-align: center;
  text-decoration: none;
}

#sd-hours {
  padding: 12px;
  text-align: center;
  font-size: 12px;
  color: #6c757d;
  background-color: #f8f9fa;
  border-top: 1px solid #eee;
  border-bottom-left-radius: 12px;
  border-bottom-right-radius: 12px;
}

/* Success state */
#sd-success {
  align-items: center;
  text-align: center;
}
#sd-success p {
  font-size: 18px;
  font-weight: 600;
  margin: 12px 0 4px;
}
#sd-success span {
  font-size: 14px;
  color: #6c757d;
}
.sd-check-circle {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: #e8f5e9;
  display: flex;
  align-items: center;
  justify-content: center;
}
