/* TicketDesk Contact Widget - Simple Form Design */

/* Reset - Only apply box-sizing and font to all elements */
#ticketdesk-widget-button,
#ticketdesk-widget-window,
#ticketdesk-widget-button *,
#ticketdesk-widget-window * {
  box-sizing: border-box;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ==================== WIDGET BUTTON ==================== */

.widget-button {
  position: fixed;
  bottom: 30px;
  right: 30px;
  height: 56px;
  padding: 0 24px 0 20px;
  border-radius: 28px;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  border: none;
  z-index: 999998;
  background: var(--ticketdesk-primary-color, #7c3aed);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
  color: white;
  font-size: 15px;
  font-weight: 600;
  transition: all 0.3s ease;
}

.widget-button:hover {
  transform: translateY(-2px);
  background: var(--ticketdesk-primary-hover, #6d28d9);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.4);
}

.widget-button:active {
  transform: translateY(0);
}

.widget-button.hidden {
  transform: scale(0);
  opacity: 0;
}

.widget-button svg {
  fill: white;
  stroke: none;
  margin: 0;
  padding: 0;
  display: block;
}

.widget-button span {
  margin: 0;
  padding: 0;
  line-height: 1;
}

/* ==================== WIDGET WINDOW ==================== */

.widget-window {
  position: fixed;
  bottom: 20px;
  right: 30px;
  width: 420px;
  height: 640px;
  background: white;
  border-radius: 20px;
  display: flex;
  flex-direction: column;
  z-index: 999999;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
  overflow: hidden;
  transform: scale(0.9);
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s ease;
}

.widget-window.open {
  transform: scale(1);
  opacity: 1;
  pointer-events: all;
}

/* ==================== HEADER ==================== */

.widget-header {
  background: var(--ticketdesk-primary-color, #7c3aed);
  color: white;
  padding: 20px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.header-profile {
  display: flex;
  align-items: center;
  gap: 12px;
}

.header-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid rgba(255, 255, 255, 0.3);
}

.header-avatar svg {
  stroke: none;
  fill: white;
}

.header-info h3 {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 2px;
}

.header-info p {
  font-size: 13px;
  opacity: 0.9;
}

.close-button {
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: white;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
}

.close-button:hover {
  background: rgba(255, 255, 255, 0.3);
}

.close-button svg {
  stroke: white;
}

/* ==================== CONTENT ==================== */

.widget-content {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 24px;
  background: white;
}

.widget-content::-webkit-scrollbar {
  width: 6px;
}

.widget-content::-webkit-scrollbar-track {
  background: transparent;
}

.widget-content::-webkit-scrollbar-thumb {
  background: #e2e8f0;
  border-radius: 3px;
}

.widget-content::-webkit-scrollbar-thumb:hover {
  background: #cbd5e1;
}

/* ==================== GREETING VIEW ==================== */

.greeting-view {
  text-align: center;
  padding: 30px 16px;
}

.greeting-icon {
  margin-bottom: 20px;
  padding: 18px;
  background: var(--ticketdesk-primary-color, #7c3aed);
  border-radius: 20px;
  display: inline-block;
}

.greeting-icon svg {
  fill: white;
  stroke: none;
}

.greeting-title {
  font-size: 24px;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 12px;
}

.greeting-message {
  font-size: 15px;
  color: #64748b;
  line-height: 1.6;
  margin-bottom: 24px;
}

/* ==================== FORM VIEW ==================== */

.form-view {
  padding: 0;
}

.form-header {
  text-align: center;
  margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid #f1f5f9;
}

.form-header h3 {
  font-size: 20px;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 8px;
}

.form-header p {
  font-size: 14px;
  color: #64748b;
}

.form-group {
  margin-bottom: 18px;
}

.form-group label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: #1e293b;
  margin-bottom: 8px;
}

.required {
  color: #ef4444;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 12px 14px;
  border: 2px solid #cbd5e1;
  border-radius: 10px;
  font-size: 15px;
  color: #0f172a;
  background: white;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
  transition: all 0.2s;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: #94a3b8;
}

.form-group input:hover,
.form-group textarea:hover {
  border-color: #94a3b8;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--ticketdesk-primary-color, #7c3aed);
  box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.1);
}

.form-group textarea {
  min-height: 100px;
  resize: vertical;
  line-height: 1.5;
}

/* ==================== BUTTONS ==================== */

.primary-button {
  width: 100%;
  padding: 14px 24px;
  border: none;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 600;
  color: white;
  background: var(--ticketdesk-primary-color, #7c3aed);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
  cursor: pointer;
  transition: all 0.2s;
  margin-top: 8px;
}

.primary-button:hover {
  transform: translateY(-2px);
  background: var(--ticketdesk-primary-hover, #6d28d9);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.35);
}

.primary-button:active {
  transform: translateY(0);
}

.primary-button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* ==================== CONFIRMATION VIEW ==================== */

.confirmation-view {
  text-align: center;
  padding: 30px 16px;
}

.confirmation-icon {
  margin-bottom: 20px;
  padding: 20px;
  background: rgba(16, 185, 129, 0.1);
  border-radius: 24px;
  display: inline-block;
}

.confirmation-title {
  font-size: 24px;
  font-weight: 700;
  color: #10b981;
  margin-bottom: 12px;
}

.confirmation-message {
  font-size: 15px;
  color: #64748b;
  line-height: 1.6;
  margin-bottom: 16px;
}

.ticket-id {
  display: inline-block;
  padding: 12px 24px;
  background: #f8fafc;
  border: 2px solid #e2e8f0;
  border-radius: 10px;
  font-size: 14px;
  color: #1e293b;
  margin-bottom: 20px;
  font-weight: 600;
}

.ticket-id strong {
  color: var(--ticketdesk-primary-color, #7c3aed);
  font-size: 16px;
  font-weight: 700;
}

.confirmation-note {
  font-size: 14px;
  color: #94a3b8;
  line-height: 1.6;
  margin-bottom: 24px;
}

/* ==================== ERROR VIEW ==================== */

.error-view {
  text-align: center;
  padding: 30px 16px;
}

.error-icon {
  margin-bottom: 20px;
  padding: 20px;
  background: rgba(239, 68, 68, 0.1);
  border-radius: 20px;
  display: inline-block;
}

.error-title {
  font-size: 22px;
  font-weight: 700;
  color: #ef4444;
  margin-bottom: 12px;
}

.error-message {
  font-size: 15px;
  color: #64748b;
  line-height: 1.6;
  margin-bottom: 24px;
}

/* ==================== BRANDING ==================== */

.widget-branding {
  padding: 14px 24px;
  background: #fafbfc;
  border-top: 1px solid #f1f5f9;
  text-align: center;
  font-size: 12px;
  color: #94a3b8;
}

.widget-branding a {
  color: #64748b;
  text-decoration: none;
  font-weight: 600;
  transition: color 0.2s;
}

.widget-branding a:hover {
  color: var(--ticketdesk-primary-color, #7c3aed);
}

@media (max-width: 480px) {
  .widget-window {
    width: 100vw;
    height: 100vh;
    bottom: 0;
    right: 0;
    border-radius: 0;
  }

  .widget-button {
    bottom: 20px;
    right: 20px;
  }

  .widget-content {
    padding: 20px;
  }
}
