/* ============================================
   Chat Widget Styling
   ============================================ */

/* --- Side Panel --- */
.vfrc-side-panel {
  position: fixed;
  display: none;
  flex-direction: column;
  gap: 0;
  z-index: 10000;
  background: #fff;
  border-radius: 12px 0 0 12px;
  overflow: hidden;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

.vfrc-side-panel.visible {
  display: flex;
}

.vfrc-side-panel-btn {
  width: 68px;
  height: 48px;
  border-radius: 0;
  border: none;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
  box-shadow: none;
  border-bottom: 1px solid #eee;
  padding-right: 20px;
}

.vfrc-side-panel-btn:first-child {
  height: 56px;
}

.vfrc-side-panel-btn:last-child {
  border-bottom: none;
}

.vfrc-side-panel-btn:hover {
  background: #f5f7fa;
  box-shadow: none;
  transform: none;
}

.vfrc-side-panel-btn svg {
  width: 22px;
  height: 22px;
  color: #6b7280;
  transition: color 0.15s ease;
}

.vfrc-side-panel-btn:hover svg {
  color: #374151;
}

.vfrc-side-panel-btn.active {
  background: #397dff;
  box-shadow: none;
}

.vfrc-side-panel-btn.active:hover {
  background: #2563eb;
}

.vfrc-side-panel-btn.active + .vfrc-side-panel-btn {
  border-top: none;
}

.vfrc-side-panel-btn.active svg {
  color: #fff;
}

/* --- Tab Panels --- */
.vfrc-tab-panel {
  position: fixed;
  display: none;
  flex-direction: column;
  background: #fff;
  border-radius: 12px;
  box-shadow: none;
  z-index: 2147483647;
  overflow: hidden;
}

.vfrc-tab-panel.visible {
  display: flex;
  flex-direction: column;
}

/* --- Notepad --- */
.vfrc-notepad {
  padding: 0 !important;
  display: flex;
  flex-direction: column;
}

.vfrc-notepad-textarea {
  width: 100%;
  flex: 1;
  min-height: 0;
  border: none;
  resize: none;
  padding: 16px;
  font-family: 'UCity Pro', 'Open Sans', Arial, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  color: #333;
  outline: none;
  box-sizing: border-box;
}

.vfrc-notepad-textarea::placeholder {
  color: #9ca3af;
}

.vfrc-notepad-actions {
  flex-shrink: 0;
  padding: 16px;
  border-top: 1px solid #e5e7eb;
  background: #fff;
}

.vfrc-notepad-submit {
  width: 100%;
  padding: 12px 16px;
  background: #397dff;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  font-family: 'UCity Pro', 'Open Sans', Arial, sans-serif;
  cursor: pointer;
  transition: background 0.15s ease;
}

.vfrc-notepad-submit:hover {
  background: #2563eb;
}

.vfrc-tab-panel-header {
  background: #397dff;
  color: #fff;
  padding: 16px 20px;
  font-size: 16px;
  font-weight: 600;
  font-family: 'UCity Pro', 'Open Sans', Arial, sans-serif;
}

.vfrc-tab-panel-content {
  padding: 20px;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  font-family: 'UCity Pro', 'Open Sans', Arial, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  color: #333;
}

.vfrc-tab-panel-content p {
  margin: 0 0 12px 0;
}

.vfrc-tab-panel-content ul {
  margin: 0;
  padding-left: 20px;
}

.vfrc-tab-panel-content li {
  margin-bottom: 8px;
}

/* --- Customer Information Tab --- */
.vfrc-customer-info {
  padding: 0 !important;
}

.vfrc-customer-placeholder {
  padding: 20px;
  color: #6b7280;
  text-align: center;
}

.vfrc-info-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  margin: 12px;
  overflow: hidden;
}

.vfrc-info-card-header {
  background: #f9fafb;
  padding: 12px 16px;
  font-weight: 600;
  font-size: 14px;
  color: #374151;
  border-bottom: 1px solid #e5e7eb;
}

.vfrc-info-section {
  padding: 16px;
  border-bottom: 1px solid #e5e7eb;
}

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

.vfrc-info-section-title {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.vfrc-info-avatar {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.vfrc-info-icon {
  width: 36px;
  height: 36px;
  background: #eff6ff;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}

.vfrc-info-section-label {
  font-weight: 600;
  font-size: 13px;
  color: #374151;
}

.vfrc-info-section-name {
  font-size: 12px;
  color: #6b7280;
}

.vfrc-info-grid {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.vfrc-info-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  font-size: 13px;
  line-height: 1.4;
}

.vfrc-info-label {
  color: #6b7280;
  flex-shrink: 0;
  width: 140px;
}

.vfrc-info-value {
  color: #374151;
  text-align: right;
  flex: 1;
  white-space: pre-line;
}

.vfrc-info-value-blue {
  color: #2563eb;
}

/* Tab panel header with refresh button */
.vfrc-tab-panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.vfrc-tab-panel-refresh {
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.8);
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  transition: all 0.15s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.vfrc-tab-panel-refresh:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
}

/* --- Agent Actions Tab --- */
.vfrc-agent-actions {
  padding: 0 !important;
  background: #f5f7fa;
}

.vfrc-actions-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  margin: 12px;
  overflow: hidden;
}

.vfrc-actions-card-header {
  padding: 14px 16px;
  font-weight: 600;
  font-size: 14px;
  color: #374151;
  border-bottom: 1px solid #e5e7eb;
}

.vfrc-actions-section {
  padding: 16px;
  border-bottom: 1px solid #e5e7eb;
}

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

.vfrc-actions-section-title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.vfrc-actions-icon {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.vfrc-actions-icon-phone {
  background: #fef3c7;
  color: #d97706;
}

.vfrc-actions-icon-notes {
  background: #dbeafe;
  color: #2563eb;
}

.vfrc-actions-icon-chat {
  background: #fed7aa;
  color: #ea580c;
}

.vfrc-actions-icon-payment {
  background: #d1fae5;
  color: #059669;
}

.vfrc-actions-section-label {
  font-weight: 600;
  font-size: 14px;
  color: #374151;
}

.vfrc-actions-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.vfrc-pill-btn {
  padding: 6px 12px;
  background: #fff;
  color: #6b7280;
  border: 1px solid #d1d5db;
  border-radius: 16px;
  font-size: 11px;
  font-weight: 500;
  font-family: 'UCity Pro', 'Open Sans', Arial, sans-serif;
  cursor: pointer;
  transition: all 0.15s ease;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.vfrc-pill-btn:hover:not(:disabled) {
  background: #f3f4f6;
  border-color: #9ca3af;
}

.vfrc-pill-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.vfrc-notes-btn {
  width: 100%;
  padding: 10px 16px;
  background: #eff6ff;
  color: #2563eb;
  border: none;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  font-family: 'UCity Pro', 'Open Sans', Arial, sans-serif;
  cursor: pointer;
  transition: all 0.15s ease;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.vfrc-notes-btn:hover {
  background: #dbeafe;
}

/* --- Mock Info Panel --- */
.mock-info-panel {
  position: fixed;
  top: 20px;
  left: 20px;
  width: 420px;
  background: #e8f4fc;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  font-size: 14px;
  z-index: 100;
}

.mock-info-header {
  background: #0066b3;
  color: #fff;
  padding: 14px 20px;
  font-weight: 600;
  font-size: 16px;
  border-radius: 12px 12px 0 0;
}

.mock-info-content {
  padding: 20px;
}

.mock-field {
  display: flex;
  align-items: center;
  margin-bottom: 14px;
}

.mock-field:last-child {
  margin-bottom: 0;
}

.mock-field label {
  width: 200px;
  flex-shrink: 0;
  color: #333;
  font-size: 14px;
  font-weight: 500;
}

.mock-field input,
.mock-field select {
  flex: 1;
  padding: 8px 12px;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 14px;
  background: #fff;
}

.mock-field input:focus,
.mock-field select:focus {
  outline: none;
  border-color: #0066b3;
}

/* ============================================
   Voiceflow Chat Widget Overrides
   ============================================ */

/* Make the chat widget wider */
.vfrc-chat__container {
  width: 520px !important;
}

/* ============================================
   Dynamic Form Extension Styles
   ============================================ */

.vfrc-tabbed-form-container {
  background: #fff;
  border-radius: 12px;
  box-shadow: none;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  font-family:
    -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

/* Header with title and close button */
.vfrc-dform-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 20px;
  background: #397dff;
  flex-shrink: 0;
}

.vfrc-dform-title {
  font-size: 16px;
  font-weight: 600;
  color: #fff;
}

.vfrc-dform-close {
  background: transparent;
  border: none;
  font-size: 24px;
  color: rgba(255, 255, 255, 0.8);
  cursor: pointer;
  padding: 4px;
  line-height: 1;
  border-radius: 4px;
  transition: all 0.15s ease;
}

.vfrc-dform-close:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
}

/* Description/Info box */
.vfrc-dform-desc {
  background: #eff6ff;
  color: #1e40af;
  padding: 10px 14px;
  margin: 16px 16px 0 16px;
  border-radius: 6px;
  font-size: 13px;
  line-height: 1.4;
  flex-shrink: 0;
}

/* Form styling */
.vfrc-tabbed-form-container form {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 16px;
}

.vfrc-form-group {
  margin-bottom: 16px;
}

.vfrc-form-group:last-of-type {
  margin-bottom: 0;
}

.vfrc-tabbed-form-container .vfrc-label {
  display: block;
  font-size: 13px;
  font-weight: 400;
  color: #374151;
  margin-bottom: 4px;
}

.vfrc-tabbed-form-container .vfrc-label span {
  color: #ef4444;
}

.vfrc-tabbed-form-container .vfrc-input {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 13px;
  font-family: inherit;
  color: #1f2937;
  background: #fff;
  box-sizing: border-box;
  transition:
    border-color 0.15s ease,
    box-shadow 0.15s ease;
}

.vfrc-tabbed-form-container .vfrc-input:focus {
  outline: none;
  border-color: #397dff;
  box-shadow: 0 0 0 3px rgba(57, 125, 255, 0.1);
}

.vfrc-tabbed-form-container .vfrc-input:disabled,
.vfrc-tabbed-form-container .vfrc-input[readonly] {
  background: #f9fafb;
  color: #6b7280;
  cursor: not-allowed;
}

.vfrc-tabbed-form-container .vfrc-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236b7280' d='M3 4.5L6 7.5L9 4.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 32px;
}

.vfrc-tabbed-form-container .vfrc-textarea {
  min-height: 80px;
  resize: vertical;
}

/* Error messages */
.vfrc-tabbed-form-container .vfrc-error {
  color: #ef4444;
  font-size: 12px;
  margin-top: 4px;
}

.vfrc-tabbed-form-container .vfrc-error:empty {
  display: none;
}

/* Hint text */
.vfrc-tabbed-form-container .vfrc-hint {
  color: #6b7280;
  font-size: 12px;
  margin-top: 4px;
}

/* Checkbox styling */
.vfrc-tabbed-form-container .vfrc-checkbox-row {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 13px;
  color: #374151;
}

.vfrc-tabbed-form-container .vfrc-checkbox {
  width: 16px;
  height: 16px;
  cursor: pointer;
}

/* Radio styling */
.vfrc-tabbed-form-container .vfrc-radio-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.vfrc-tabbed-form-container .vfrc-radio-row {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 13px;
  color: #374151;
}

.vfrc-tabbed-form-container .vfrc-radio {
  width: 16px;
  height: 16px;
  cursor: pointer;
}

/* Toggle switch styling */
.vfrc-tabbed-form-container .vfrc-toggle-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}

.vfrc-tabbed-form-container .vfrc-toggle {
  position: relative;
  display: inline-block;
  width: 40px;
  height: 22px;
  cursor: pointer;
}

.vfrc-tabbed-form-container .vfrc-toggle-input {
  opacity: 0;
  width: 0;
  height: 0;
}

.vfrc-tabbed-form-container .vfrc-toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #d1d5db;
  transition: 0.3s;
  border-radius: 22px;
}

.vfrc-tabbed-form-container .vfrc-toggle-slider:before {
  position: absolute;
  content: '';
  height: 16px;
  width: 16px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: 0.3s;
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.vfrc-tabbed-form-container .vfrc-toggle-input:checked + .vfrc-toggle-slider {
  background-color: #397dff;
}

.vfrc-tabbed-form-container .vfrc-toggle-input:checked + .vfrc-toggle-slider:before {
  transform: translateX(18px);
}

.vfrc-tabbed-form-container .vfrc-toggle-status {
  font-size: 13px;
  color: #6b7280;
}

/* Form actions */
.vfrc-tabbed-form-container .vfrc-dform-actions {
  display: flex;
  gap: 12px;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid #e5e7eb;
}

.vfrc-tabbed-form-container .vfrc-button {
  width: 100%;
  padding: 10px 16px;
  background: #eff6ff;
  color: #2563eb;
  border: none;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.15s ease;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.vfrc-tabbed-form-container .vfrc-button:hover {
  background: #dbeafe;
}

.vfrc-tabbed-form-container .vfrc-button:disabled {
  background: #f3f4f6;
  color: #9ca3af;
  cursor: not-allowed;
}

/* ============================================
   Multi-Step Form Styles
   ============================================ */

/* Step Tracker */
.vfrc-step-tracker {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px 24px 16px;
  flex-shrink: 0;
}

.vfrc-step-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  flex: 0 0 auto;
}

.vfrc-step-circle {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 600;
  border: 2px solid #d1d5db;
  background: #fff;
  color: #9ca3af;
  transition: all 0.25s ease;
  position: relative;
  z-index: 1;
}

.vfrc-step-item.active .vfrc-step-circle {
  background: #397dff;
  border-color: #397dff;
  color: #fff;
  box-shadow: 0 0 0 4px rgba(57, 125, 255, 0.15);
}

.vfrc-step-item.completed .vfrc-step-circle {
  background: #397dff;
  border-color: #397dff;
  color: #fff;
}

.vfrc-step-label {
  font-size: 11px;
  color: #9ca3af;
  margin-top: 6px;
  text-align: center;
  max-width: 80px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: color 0.25s ease;
}

.vfrc-step-item.active .vfrc-step-label {
  color: #397dff;
  font-weight: 600;
}

.vfrc-step-item.completed .vfrc-step-label {
  color: #374151;
}

.vfrc-step-line {
  flex: 1;
  height: 2px;
  background: #d1d5db;
  margin: 0 8px;
  margin-bottom: 20px;
  transition: background 0.25s ease;
  min-width: 24px;
}

.vfrc-step-line.completed {
  background: #397dff;
}

/* Step Panels */
.vfrc-step-panel {
  display: none;
}

.vfrc-step-panel.active {
  display: block;
}

.vfrc-step-description {
  background: #eff6ff;
  color: #1e40af;
  padding: 10px 14px;
  margin: 0 0 16px 0;
  border-radius: 6px;
  font-size: 13px;
  line-height: 1.4;
}

/* Multi-step Navigation */
.vfrc-dform-actions .vfrc-button-back {
  background: #fff;
  color: #6b7280;
  border: 1px solid #d1d5db;
}

.vfrc-dform-actions .vfrc-button-back:hover {
  background: #f9fafb;
  border-color: #9ca3af;
}

.vfrc-dform-actions .vfrc-button-next {
  background: #397dff;
  color: #fff;
}

.vfrc-dform-actions .vfrc-button-next:hover {
  background: #2563eb;
}

.vfrc-dform-actions .vfrc-button-next:disabled {
  background: #93b4ff;
  color: rgba(255, 255, 255, 0.7);
  cursor: not-allowed;
}
