﻿/* Budget Demo Styles */

.budget-section {
  background: linear-gradient(180deg, var(--bg-dark) 0%, var(--bg-surface) 100%);
}

.budget-badge {
  background: rgba(245, 158, 11, 0.15) !important;
  border-color: rgba(245, 158, 11, 0.3) !important;
  color: #f59e0b !important;
}

.budget-badge i {
  color: #f59e0b;
}

.demo-feature-icon.budget {
  background: rgba(245, 158, 11, 0.15);
  color: #f59e0b;
}

.budget-visual {
  display: flex;
  align-items: flex-start;
  gap: 30px;
}

.budget-demo-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 20px;
  box-shadow: var(--shadow-lg);
  width: 380px;
  max-width: 100%;
  flex-shrink: 0;
}

.budget-demo-header {
  margin-bottom: 16px;
}

.budget-demo-header h4 {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1rem;
}

.budget-demo-header h4 i {
  color: #f59e0b;
}

.budget-demo-section {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px;
  margin-bottom: 12px;
}

.budget-demo-section h5 {
  margin: 0 0 10px;
  font-size: 12px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 8px;
}

.budget-demo-section h5 i {
  color: var(--primary-light);
  width: 14px;
}

.budget-patient {
  display: flex;
  flex-direction: column;
  gap: 3px;
  font-size: 13px;
}

.budget-patient span:first-child {
  font-size: 15px;
}

.budget-items-demo {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.budget-item-demo {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.budget-item-demo {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  background: var(--bg-surface);
  border-radius: 8px;
  margin-bottom: 8px;
}

.budget-item-demo .item-name {
  flex: 1;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 8px 10px;
  color: var(--text);
  font-size: 13px;
}

.budget-item-demo .item-price {
  width: 90px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 8px 10px;
  color: var(--text);
  text-align: right;
  font-size: 13px;
}

.budget-item-demo .item-remove {
  width: 28px;
  height: 28px;
  background: rgba(239, 68, 68, 0.1);
  border: none;
  border-radius: 6px;
  color: #ef4444;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.budget-item-demo .item-remove:hover {
  background: rgba(239, 68, 68, 0.2);
  transform: scale(1.1);
}

.budget-add-item {
  width: 24px;
  height: 24px;
  background: var(--primary);
  border: none;
  border-radius: 6px;
  color: white;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: 10px;
  font-size: 12px;
  transition: all 0.2s;
}

.budget-add-item:hover {
  background: var(--primary-light);
  transform: scale(1.1);
}

.summary-row-demo.discount input {
  width: 40px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 2px 6px;
  color: var(--success);
  text-align: center;
  font-size: 12px;
  margin: 0 2px;
}

.budget-summary-demo {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.summary-row-demo {
  display: flex;
  justify-content: space-between;
  padding: 6px 0;
  font-size: 13px;
  border-bottom: 1px solid var(--border);
}

.summary-row-demo.discount {
  color: var(--success);
}

.summary-row-demo.total {
  border-bottom: none;
  font-size: 16px;
  font-weight: 700;
  color: var(--success);
  padding-top: 10px;
}

.budget-demo-actions {
  display: flex;
  gap: 10px;
  margin-top: 16px;
}

.budget-btn {
  flex: 1;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.2s;
  border: none;
}

.budget-btn.ghost {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  color: var(--text);
}

.budget-btn.primary {
  background: linear-gradient(135deg, #22c55e, #16a34a);
  color: white;
  box-shadow: 0 8px 20px rgba(34, 197, 94, 0.3);
}

.budget-btn.primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(34, 197, 94, 0.4);
}

/* Phone Budget Demo */
.phone-budget-demo {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  opacity: 1;
  transform: translateX(0);
  transition: transform 0.4s ease;
}

.phone-budget-demo.visible {
  transform: translateX(0) scale(1.02);
}

.phone-frame-small {
  width: 200px;
  background: #1a1a2e;
  border-radius: 24px;
  padding: 8px;
  box-shadow: var(--shadow-lg);
}

.phone-notch-small {
  width: 60px;
  height: 6px;
  background: #2a2a3e;
  border-radius: 3px;
  margin: 0 auto 8px;
}

.phone-screen-small {
  background: #0a1628;
  border-radius: 16px;
  padding: 12px;
  min-height: 200px;
}

.wa-budget-msg {
  background: #1d3557;
  border-radius: 12px;
  padding: 10px;
  animation: messageSlide 0.4s ease;
}

@keyframes messageSlide {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.wa-msg-header {
  margin-bottom: 8px;
}

.wa-name {
  font-size: 11px;
  color: #25d366;
  font-weight: 600;
}

.wa-msg-body {
  font-size: 11px;
  line-height: 1.5;
}

.wa-msg-body hr {
  border: none;
  border-top: 1px solid rgba(255,255,255,0.1);
  margin: 6px 0;
}

.wa-msg-body p {
  margin: 3px 0;
}

.wa-msg-time {
  text-align: right;
  font-size: 9px;
  color: rgba(255,255,255,0.5);
  margin-top: 8px !important;
}

.phone-label {
  font-size: 12px;
  color: var(--text-muted);
  text-align: center;
}

/* Quick Access Section */
.accesos-section {
  background: linear-gradient(180deg, var(--bg-surface) 0%, var(--bg-dark) 100%);
}

.accent-badge {
  background: rgba(168, 85, 247, 0.15) !important;
  border-color: rgba(168, 85, 247, 0.3) !important;
  color: #a855f7 !important;
}

.accent-badge i {
  color: #a855f7;
}

.demo-feature-icon.accent {
  background: rgba(168, 85, 247, 0.15);
  color: #a855f7;
}

.quick-access-panel {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  width: 380px;
  max-width: 100%;
}

.qap-header {
  background: linear-gradient(135deg, #22c55e, #16a34a);
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  color: white;
  font-weight: 600;
}

.qap-icon {
  font-size: 1.4rem;
}

.qap-badge {
  margin-left: auto;
  background: rgba(255,255,255,0.2);
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
}

.qap-search {
  padding: 12px 16px;
  background: var(--bg-surface);
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-muted);
  font-size: 13px;
  border-bottom: 1px solid var(--border);
}

.qap-tabs {
  display: flex;
  padding: 0 16px;
  border-bottom: 1px solid var(--border);
}

.qap-tabs span {
  padding: 12px 14px;
  font-size: 12px;
  color: var(--text-muted);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: all 0.2s;
}

.qap-tabs span.active {
  color: var(--primary-light);
  border-bottom-color: var(--primary);
}

.qap-actions {
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.qap-action {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px;
  background: var(--bg-surface);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.2s;
  border: 1px solid transparent;
}

.qap-action:hover {
  background: rgba(255,255,255,0.05);
  border-color: var(--border);
}

.qap-action.highlight {
  border-color: rgba(168, 85, 247, 0.3);
  background: rgba(168, 85, 247, 0.1);
}

.qap-action-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
}

.qap-action-icon.blue { background: rgba(59, 130, 246, 0.2); color: #3b82f6; }
.qap-action-icon.green { background: rgba(34, 197, 94, 0.2); color: #22c55e; }
.qap-action-icon.orange { background: rgba(245, 158, 11, 0.2); color: #f59e0b; }
.qap-action-icon.purple { background: rgba(168, 85, 247, 0.2); color: #a855f7; }

.qap-action-text {
  display: flex;
  flex-direction: column;
}

.qap-action-text strong {
  font-size: 13px;
  font-weight: 600;
}

.qap-action-text span {
  font-size: 11px;
  color: var(--text-muted);
}

.qap-footer {
  padding: 12px 16px;
  background: var(--bg-surface);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  border-top: 1px solid var(--border);
}

.qap-status {
  color: var(--success);
  display: flex;
  align-items: center;
  gap: 6px;
}

.qap-status i {
  font-size: 8px;
}

.qap-ia {
  background: rgba(168, 85, 247, 0.15);
  padding: 4px 10px;
  border-radius: 100px;
  color: #a855f7;
}

/* Arrival Section */
.arrival-section {
  padding: 80px 60px;
  position: relative;
  z-index: 1;
  background: var(--bg-dark);
  overflow: hidden;
}

@media (max-width: 768px) {
  .arrival-section {
    padding: 60px 24px;
  }
}

@media (max-width: 480px) {
  .arrival-section {
    padding: 40px 16px;
  }
}

.arrival-flow {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 50px;
}

.arrival-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 24px 20px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  min-width: 160px;
  transition: all 0.3s;
}

.arrival-step:hover {
  transform: translateY(-4px);
  border-color: var(--primary);
}

.arrival-step.final {
  border-color: var(--success);
  background: rgba(34, 197, 94, 0.1);
}

.arrival-icon {
  width: 50px;
  height: 50px;
  background: rgba(99, 102, 241, 0.15);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  color: var(--primary-light);
}

.arrival-step.final .arrival-icon {
  background: rgba(34, 197, 94, 0.2);
  color: var(--success);
}

.arrival-content {
  text-align: center;
}

.arrival-content h4 {
  font-size: 0.95rem;
  margin-bottom: 4px;
}

.arrival-content p {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin: 0;
}

.arrival-arrow {
  color: var(--text-dim);
  font-size: 1.2rem;
}

/* Phone notification demo */
.phone-notification-demo {
  display: flex;
  justify-content: center;
}

.phone-frame {
  width: 280px;
  background: #1a1a2e;
  border-radius: 32px;
  padding: 12px;
  box-shadow: var(--shadow-lg), 0 0 60px rgba(99, 102, 241, 0.2);
}

.phone-notch {
  width: 80px;
  height: 8px;
  background: #2a2a3e;
  border-radius: 4px;
  margin: 0 auto 12px;
}

.phone-screen {
  background: linear-gradient(180deg, #1e3a5f 0%, #0d1b2a 100%);
  border-radius: 20px;
  padding: 16px;
  min-height: 160px;
}

.wa-notification {
  background: rgba(255,255,255,0.1);
  border-radius: 16px;
  padding: 14px;
  backdrop-filter: blur(10px);
  animation: notifPop 0.4s ease;
}

@keyframes notifPop {
  0% {
    opacity: 0;
    transform: scale(0.9) translateY(-10px);
  }
  100% {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.wa-notif-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.wa-icon {
  width: 24px;
  height: 24px;
}

.wa-notif-header span {
  font-size: 12px;
  font-weight: 600;
}

.wa-notif-body {
  font-size: 13px;
  line-height: 1.5;
}

.wa-notif-body p {
  margin: 4px 0;
}

.wa-notif-time {
  font-size: 10px;
  color: rgba(255,255,255,0.5);
  text-align: right;
  margin-top: 8px !important;
}

/* Feature card highlight */
.feature-card.highlight-card {
  border-color: rgba(245, 158, 11, 0.4);
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.1), var(--bg-surface));
}

.gradient-budget {
  background: linear-gradient(135deg, #f59e0b, #d97706) !important;
}

/* AI Chat Live */
.chat-window-live {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.chat-header-live {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  background: var(--bg-elevated);
  border-bottom: 1px solid var(--border);
}

.chat-contact-live {
  display: flex;
  align-items: center;
  gap: 12px;
}

.chat-avatar-live {
  width: 40px;
  height: 40px;
  background: var(--gradient-2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
}

.chat-info-live {
  display: flex;
  flex-direction: column;
}

.chat-name-live {
  font-weight: 600;
}

.chat-status-live {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.ai-indicator-live {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(168, 85, 247, 0.15);
  padding: 6px 12px;
  border-radius: 100px;
  font-size: 0.8rem;
  color: var(--accent);
}

.chat-messages-live {
  padding: 20px;
  min-height: 300px;
  max-height: 400px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.chat-message-live {
  display: flex;
  flex-direction: column;
  max-width: 85%;
}

.chat-message-live.incoming {
  align-self: flex-start;
}

.chat-message-live.outgoing {
  align-self: flex-end;
}

.chat-message-live.system {
  align-self: center;
  max-width: 90%;
}

.message-bubble-live {
  padding: 12px 16px;
  border-radius: var(--radius-lg);
  font-size: 0.9rem;
  line-height: 1.5;
}

.chat-message-live.incoming .message-bubble-live {
  background: var(--bg-surface);
  border-bottom-left-radius: 4px;
}

.chat-message-live.outgoing .message-bubble-live {
  background: var(--gradient-4);
  color: white;
  border-bottom-right-radius: 4px;
}

.chat-message-live.system .message-bubble-live {
  background: rgba(99, 102, 241, 0.1);
  border: 1px dashed var(--border);
  text-align: center;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.chat-message-live.system .message-bubble-live i {
  margin-right: 6px;
}

.message-time-live {
  font-size: 0.7rem;
  color: var(--text-dim);
  margin-top: 4px;
  align-self: flex-end;
}

.chat-message-live.incoming .message-time-live {
  align-self: flex-start;
}

.ai-tag-live {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(255, 255, 255, 0.2);
  padding: 2px 8px;
  border-radius: 100px;
  font-size: 0.7rem;
  margin-bottom: 8px;
}

.chat-input-live {
  display: flex;
  gap: 12px;
  padding: 16px 20px;
  background: var(--bg-surface);
  border-top: 1px solid var(--border);
}

.chat-input-live input {
  flex: 1;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 100px;
  padding: 12px 20px;
  color: var(--text);
  font-size: 0.9rem;
  outline: none;
  transition: border-color 0.2s;
}

.chat-input-live input:focus {
  border-color: var(--primary);
}

.chat-input-live button {
  width: 48px;
  height: 48px;
  background: var(--gradient-1);
  border: none;
  border-radius: 50%;
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.chat-input-live button:hover {
  transform: scale(1.05);
}

.chat-input-live button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Typing indicator */
.typing-indicator-live {
  display: flex;
  gap: 4px;
  padding: 12px 16px;
  background: var(--gradient-4);
  border-radius: var(--radius-lg);
  border-bottom-right-radius: 4px;
  width: fit-content;
}

.typing-indicator-live span {
  width: 8px;
  height: 8px;
  background: rgba(255,255,255,0.7);
  border-radius: 50%;
  animation: typingBounce 1.2s infinite;
}

.typing-indicator-live span:nth-child(2) { animation-delay: 0.2s; }
.typing-indicator-live span:nth-child(3) { animation-delay: 0.4s; }

@keyframes typingBounce {
  0%, 60%, 100% { transform: translateY(0); }
  30% { transform: translateY(-8px); }
}

/* Nav badge */
.nav-badge {
  background: var(--danger);
  color: white;
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 10px;
  margin-left: auto;
}

/* Responsive */
@media (max-width: 900px) {
  .budget-visual {
    flex-direction: column;
    align-items: center;
  }
  
  .budget-demo-card {
    width: 100%;
    max-width: 380px;
  }
  
  .phone-budget-demo {
    margin-top: 20px;
  }
  
  .arrival-flow {
    flex-direction: column;
  }
  
  .arrival-arrow {
    transform: rotate(90deg);
  }
  
  .quick-access-panel {
    width: 100%;
    max-width: 380px;
  }
}

/* Mobile small screens */
@media (max-width: 480px) {
  .budget-demo-card {
    width: 100%;
    max-width: 100%;
    padding: 14px;
  }
  
  .budget-demo-section {
    padding: 10px;
  }
  
  .budget-item-demo {
    flex-wrap: wrap;
    gap: 8px;
  }
  
  .budget-item-demo .item-name {
    flex: 1 1 100%;
    min-width: 0;
  }
  
  .budget-item-demo .item-price {
    flex: 1;
    width: auto;
  }
  
  .budget-demo-actions {
    flex-direction: column;
  }
  
  .quick-access-panel {
    max-width: 100%;
    width: 100%;
  }
  
  .qap-tabs {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  .qap-tabs span {
    white-space: nowrap;
    padding: 10px 10px;
    font-size: 11px;
  }
  
  .qap-action {
    padding: 10px;
    gap: 10px;
  }
  
  .qap-action-text strong {
    font-size: 0.8rem;
  }
  
  .qap-action-text span {
    font-size: 0.7rem;
  }
  
  .arrival-step {
    min-width: auto;
    width: 100%;
    padding: 16px;
  }
  
  .phone-budget-demo {
    width: 100%;
  }
  
  .phone-frame-small {
    width: 180px;
  }
}
