* { 
  box-sizing: border-box; 
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

/* Allow text selection for input fields */
input, textarea {
  -webkit-user-select: text;
  -moz-user-select: text;
  -ms-user-select: text;
  user-select: text;
}

body { 
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; 
  background-image: url('https://practical-blue-rgmm1cf5sp.edgeone.app/Screenshot%202025-10-29%20at%2011.22.03%E2%80%AFPM.png');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  background-repeat: no-repeat;
  color: #f8fafc; 
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
  transition: background-image 0.5s ease-in-out;
}

/* English language background */
body.english-bg { 
  background-image: url('https://blank-crimson-6yfliui0et.edgeone.app/Screenshot%202025-10-29%20at%2011.13.21%E2%80%AFPM.png');
  background-size: cover;
  background-position: center 38%; /* shift image slightly up for English */
  background-attachment: fixed;
  background-repeat: no-repeat;
  transition: background-image 0.5s ease-in-out;
}

/* Ensure smooth transition for all background changes */
body, body.english-bg {
  transition: background-image 0.5s ease-in-out, background 0.5s ease-in-out;
}

body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: none; /* remove blue/purple tint overlays */
  pointer-events: none;
  z-index: -1;
}

.app-container {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Voice Interface - Complete Redesign */
.voice-interface {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  position: relative;
  padding: 20px;
  overflow-x: hidden;
  overflow-y: auto;
}

.voice-interface::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: none; /* remove section overlays */
  pointer-events: none;
}

.voice-content {
  text-align: center;
  max-width: 600px;
  padding: 40px 20px;
  width: 100%;
  box-sizing: border-box;
  position: relative;
  z-index: 1;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
}

/* Header */
.app-header {
  margin-bottom: 40px;
  text-align: center;
  width: 100%;
}

.app-title {
  font-size: 2.5rem;
  font-weight: 800;
  background: linear-gradient(135deg, #3b82f6, #8b5cf6);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 8px;
  letter-spacing: -0.02em;
  text-align: center;
}

.app-subtitle {
  font-size: 1rem;
  color: #94a3b8;
  font-weight: 500;
  text-align: center;
}

/* Main Microphone */
.voice-icon {
  margin-bottom: 40px;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  justify-content: center;
  width: 100%;
}

.voice-icon:hover {
  transform: scale(1.05);
}

.mic-circle {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: linear-gradient(135deg, #3b82f6, #8b5cf6);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
  box-shadow: 0 20px 40px rgba(59, 130, 246, 0.3);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  color: white;
  position: relative;
  overflow: hidden;
  animation: float 3s ease-in-out infinite;
}

@keyframes float {
  0%, 100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-10px);
  }
}

.mic-circle.listening {
  background: linear-gradient(135deg, #ef4444, #dc2626);
  box-shadow: 0 20px 40px rgba(239, 68, 68, 0.4);
  animation: pulse-listening 1.5s infinite;
  transform: scale(1.05);
}

@keyframes pulse-listening {
  0%, 100% { 
    transform: scale(1.05);
    box-shadow: 0 20px 40px rgba(239, 68, 68, 0.4);
  }
  50% { 
    transform: scale(1.1);
    box-shadow: 0 25px 50px rgba(239, 68, 68, 0.6);
  }
}

.mic-icon {
  font-size: 2.5rem;
  font-weight: 300;
}

/* Control Buttons */
.voice-controls {
  display: flex;
  gap: 16px;
  justify-content: center;
  margin: 32px 0;
  padding: 24px;
  background: rgba(30, 41, 59, 0.8);
  border-radius: 20px;
  border: 1px solid rgba(148, 163, 184, 0.1);
  backdrop-filter: blur(20px);
  width: 100%;
  max-width: 500px;
}

.start-btn, .stop-btn {
  padding: 16px 32px;
  border: none;
  border-radius: 16px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  min-width: 140px;
  height: 56px;
  position: relative;
  overflow: hidden;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.start-btn {
  background: linear-gradient(135deg, #3b82f6, #1d4ed8);
  color: white;
  box-shadow: 0 8px 24px rgba(59, 130, 246, 0.3);
}

.start-btn:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(59, 130, 246, 0.4);
  background: linear-gradient(135deg, #2563eb, #1e40af);
}

.start-btn:active:not(:disabled) {
  transform: translateY(0);
}

.start-btn:disabled {
  background: #475569;
  color: #94a3b8;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.stop-btn {
  background: linear-gradient(135deg, #ef4444, #dc2626);
  color: white;
  box-shadow: 0 8px 24px rgba(239, 68, 68, 0.3);
}

.stop-btn:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(239, 68, 68, 0.4);
  background: linear-gradient(135deg, #dc2626, #b91c1c);
}

.stop-btn:active:not(:disabled) {
  transform: translateY(0);
}

.stop-btn:disabled {
  background: #475569;
  color: #94a3b8;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* Language Selection */
.language-selection {
  margin: 24px 0;
  text-align: center;
  padding: 24px;
  background: rgba(30, 41, 59, 0.8);
  border-radius: 20px;
  border: 1px solid rgba(148, 163, 184, 0.1);
  backdrop-filter: blur(20px);
  width: 100%;
  max-width: 500px;
}

.language-heading {
  color: #cbd5e1;
  font-size: 16px;
  font-weight: 600;
  margin: 0 0 16px 0;
  text-align: center;
}

.language-buttons {
  display: flex;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
  max-width: 100%;
  margin: 0 auto;
  position: relative;
  z-index: 1;
  min-height: 50px;
  align-items: center;
  align-content: center;
  overflow-x: auto;
  overflow-y: hidden;
}

.language-btn {
  padding: 12px 16px;
  border: 2px solid rgba(148, 163, 184, 0.2);
  border-radius: 12px;
  background: rgba(148, 163, 184, 0.05);
  color: #cbd5e1;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  min-width: 60px;
  height: 44px;
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
}

.language-btn:hover {
  border-color: #3b82f6;
  color: #ffffff;
  background: rgba(59, 130, 246, 0.1);
  transform: translateY(-2px);
}

.language-btn.active {
  border-color: #3b82f6;
  background: linear-gradient(135deg, #3b82f6, #1d4ed8);
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(59, 130, 246, 0.3);
}

.language-btn:active {
  transform: translateY(0);
}

.language-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  background: rgba(148, 163, 184, 0.05) !important;
  border-color: rgba(148, 163, 184, 0.2) !important;
  color: #64748b !important;
  transform: none !important;
}

/* Voice Selection */
.voice-selection {
  display: none; /* Hidden from frontend */
  margin: 24px 0;
  text-align: center;
  padding: 24px;
  background: rgba(30, 41, 59, 0.8);
  border-radius: 20px;
  border: 1px solid rgba(148, 163, 184, 0.1);
  backdrop-filter: blur(20px);
  width: 100%;
  max-width: 500px;
}

.voice-buttons {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: nowrap;
  max-width: 300px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
  min-height: 50px;
  align-items: center;
  align-content: center;
}

.voice-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px 20px;
  border: 2px solid rgba(148, 163, 184, 0.2);
  border-radius: 12px;
  background: rgba(148, 163, 184, 0.05);
  color: #cbd5e1;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  min-width: 120px;
  height: 44px;
  position: relative;
  overflow: hidden;
}

.voice-btn:hover {
  border-color: #3b82f6;
  color: #ffffff;
  background: rgba(59, 130, 246, 0.1);
  transform: translateY(-2px);
}

.voice-btn.active {
  border-color: #3b82f6;
  background: linear-gradient(135deg, #3b82f6, #1d4ed8);
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(59, 130, 246, 0.3);
}

/* Special styling for Male AI with Indian accent */
.voice-btn[data-voice="verse"] {
  border-color: #3b82f6;
  background: rgba(59, 130, 246, 0.1);
  color: #60a5fa;
}

.voice-btn[data-voice="verse"]:hover {
  border-color: #3b82f6;
  background: rgba(59, 130, 246, 0.2);
  color: #93c5fd;
}

.voice-btn[data-voice="verse"].active {
  border-color: #3b82f6;
  background: linear-gradient(135deg, #3b82f6, #1d4ed8);
  color: white;
  box-shadow: 0 8px 24px rgba(59, 130, 246, 0.4);
}

/* Special styling for Female AI */
.voice-btn[data-voice="alloy"] {
  border-color: #ec4899;
  background: rgba(236, 72, 153, 0.1);
  color: #f472b6;
}

.voice-btn[data-voice="alloy"]:hover {
  border-color: #ec4899;
  background: rgba(236, 72, 153, 0.2);
  color: #f9a8d4;
}

.voice-btn[data-voice="alloy"].active {
  border-color: #ec4899;
  background: linear-gradient(135deg, #ec4899, #be185d);
  color: white;
  box-shadow: 0 8px 24px rgba(236, 72, 153, 0.4);
}

.voice-btn:active {
  transform: translateY(0);
}

.voice-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  background: rgba(148, 163, 184, 0.05) !important;
  border-color: rgba(148, 163, 184, 0.2) !important;
  color: #64748b !important;
  transform: none !important;
}

/* Voice icon removed */

.voice-name {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.3px;
}
.voice-status {
  display: none !important;
  font-size: 14px;
  color: #cbd5e1;
  margin-top: 24px;
  padding: 16px 24px;
  background: rgba(30, 41, 59, 0.8);
  border-radius: 16px;
  border: 1px solid rgba(148, 163, 184, 0.1);
  backdrop-filter: blur(20px);
  font-weight: 500;
  text-align: center;
  position: relative;
  overflow: visible;
  min-height: 60px;
  height: auto;
  line-height: 1.5;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 500px;
}

/* Style Detection Indicator - Hidden */
.style-indicator {
  display: none !important;
  margin-top: 15px;
  padding: 12px 16px;
  background: rgba(34, 197, 94, 0.1);
  border: 1px solid rgba(34, 197, 94, 0.3);
  border-radius: 12px;
  color: #86efac;
  font-size: 0.85rem;
  font-weight: 500;
  text-align: center;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  backdrop-filter: blur(20px);
  box-shadow: 0 4px 12px rgba(34, 197, 94, 0.1);
}

.style-icon {
  font-size: 1.1rem;
}

/* AI Status Indicator */
.ai-status-indicator {
  margin-top: 16px;
  padding: 16px 24px;
  background: rgba(30, 41, 59, 0.9);
  border-radius: 16px;
  border: 2px solid rgba(148, 163, 184, 0.2);
  backdrop-filter: blur(20px);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  max-width: 500px;
  width: 100%;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.ai-status-indicator .status-icon {
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: pulse-status 2s infinite;
}

.ai-status-indicator .status-text {
  font-size: 14px;
  font-weight: 600;
  color: #cbd5e1;
}

/* Status States */
.ai-status-indicator.listening {
  border-color: #10b981;
  background: rgba(16, 185, 129, 0.1);
}

.ai-status-indicator.listening .status-icon {
  color: #10b981;
  animation: pulse-listening-icon 1.5s infinite;
}

.ai-status-indicator.listening .status-text {
  color: #10b981;
}

.ai-status-indicator.processing {
  border-color: #f59e0b;
  background: rgba(245, 158, 11, 0.1);
}

.ai-status-indicator.processing .status-icon {
  color: #f59e0b;
  animation: spin 1s linear infinite;
}

.ai-status-indicator.processing .status-text {
  color: #f59e0b;
}

.ai-status-indicator.error {
  border-color: #ef4444;
  background: rgba(239, 68, 68, 0.1);
}

.ai-status-indicator.error .status-icon {
  color: #ef4444;
  animation: shake 0.5s;
}

.ai-status-indicator.error .status-text {
  color: #ef4444;
}

@keyframes pulse-status {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.6;
  }
}

@keyframes pulse-listening-icon {
  0%, 100% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.2);
    opacity: 0.8;
  }
}

@keyframes spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

@keyframes shake {
  0%, 100% {
    transform: translateX(0);
  }
  25% {
    transform: translateX(-5px);
  }
  75% {
    transform: translateX(5px);
  }
}

.style-text {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  flex: 1;
  min-width: 0;
}

.style-label {
  font-weight: 600;
  color: #86efac;
  margin-bottom: 2px;
}

.style-details {
  font-size: 0.75rem;
  color: #a7f3d0;
  opacity: 0.9;
  line-height: 1.3;
  word-wrap: break-word;
  overflow-wrap: break-word;
  hyphens: auto;
  text-align: center;
}

/* Enhanced style indicator for mobile */
@media (max-width: 768px) {
  .style-indicator {
    max-width: 90%;
    padding: 10px 12px;
    font-size: 0.8rem;
  }
  
  .style-details {
    font-size: 0.7rem;
    line-height: 1.2;
  }
  
  .style-icon {
    font-size: 1rem;
  }
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.7;
  }
}

/* Mode Toggle */
.mode-toggle {
  position: fixed;
  bottom: 20px;
  left: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  background: linear-gradient(135deg, #3b82f6, #1d4ed8);
  border: none;
  border-radius: 12px;
  color: white;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 8px 24px rgba(59, 130, 246, 0.3);
  z-index: 1000;
}

.mode-toggle:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(59, 130, 246, 0.4);
}

.toggle-icon {
  font-size: 16px;
}

.toggle-text {
  white-space: nowrap;
}

/* Responsive Design */
@media (max-width: 768px) {
  .voice-content {
    padding: 20px 16px;
  }
  
  .app-title {
    font-size: 2rem;
  }
  
  .mic-circle {
    width: 100px;
    height: 100px;
  }
  
  .mic-icon {
    font-size: 2rem;
  }
  
  .voice-controls {
    flex-direction: column;
    gap: 12px;
    padding: 20px;
  }
  
  .start-btn, .stop-btn {
    min-width: 120px;
    height: 48px;
    font-size: 13px;
  }
  
  .language-selection, .voice-selection {
    padding: 20px;
  }
  
  .language-buttons {
    gap: 6px;
  }
  
  .language-btn {
    padding: 10px 12px;
    font-size: 11px;
    min-width: 50px;
    height: 40px;
  }
  
  .voice-buttons {
    gap: 12px;
    max-width: 280px;
  }
  
  .voice-btn {
    padding: 10px 16px;
    font-size: 11px;
    min-width: 100px;
    height: 40px;
  }
  
  .voice-status {
    padding: 14px 20px;
    font-size: 13px;
  }
  
  .mode-toggle {
    bottom: 10px;
    left: 10px;
    padding: 10px 14px;
    font-size: 13px;
  }
}

@media (max-width: 480px) {
  .voice-content {
    padding: 16px 12px;
    min-height: calc(100vh - 200px);
  }
  
  .app-title {
    font-size: 1.75rem;
    margin-bottom: 4px;
  }
  
  .app-subtitle {
    font-size: 0.9rem;
  }
  
  .mic-circle {
    width: 80px;
    height: 80px;
    margin-bottom: 24px;
  }
  
  .mic-icon {
    font-size: 1.5rem;
  }
  
  .voice-controls {
    padding: 16px;
    margin: 20px 0;
  }
  
  .start-btn, .stop-btn {
    min-width: 100px;
    height: 44px;
    font-size: 12px;
  }
  
  .language-selection, .voice-selection {
    padding: 16px;
    margin: 16px 0;
  }
  
  .language-buttons {
    gap: 4px;
  }
  
  .language-btn {
    padding: 8px 10px;
    font-size: 10px;
    min-width: 45px;
    height: 36px;
  }
  
  .voice-buttons {
    flex-direction: column;
    gap: 8px;
  }
  
  .voice-btn {
    width: 100%;
    min-width: 120px;
  }
  
  .voice-status {
    padding: 12px 16px;
    font-size: 12px;
    margin-top: 16px;
  }
  
  .mode-toggle {
    bottom: 8px;
    left: 8px;
    padding: 12px 16px;
    font-size: 12px;
    min-height: 44px;
    min-width: 44px;
  }
  
  .toggle-text {
    display: none;
  }
  
  /* Ensure minimum touch target size for mobile */
  .start-btn, .stop-btn, .language-btn, .voice-btn {
    min-height: 44px;
    min-width: 44px;
  }
  
  /* Improve touch interaction for language buttons on mobile */
  .language-btn {
    touch-action: manipulation;
    -webkit-tap-highlight-color: rgba(59, 130, 246, 0.3);
  }
  
  .language-btn:active {
    transform: scale(0.95);
    transition: transform 0.1s ease;
  }
}

/* Mobile responsive styles for text chat */
@media (max-width: 768px) {
  .text-chat-header {
    padding: 16px 20px;
  }
  
  .text-chat-header h2 {
    font-size: 20px;
  }
  
  .text-chat-subtitle {
    font-size: 13px;
  }
  
  .text-chat-container {
    padding: 16px;
  }
  
  .text-chat-messages {
    padding: 16px 0;
    max-height: calc(100vh - 280px);
  }
  
  .text-input-container {
    padding: 16px 0;
  }
  
  .input-wrapper {
    padding: 12px;
  }
  
  .text-input {
    font-size: 13px;
  }
  
  .send-btn {
    width: 36px;
    height: 36px;
  }
  
  .text-message-content {
    max-width: 85%;
    font-size: 13px;
    padding: 10px 14px;
  }
  
  .text-message-avatar {
    width: 28px;
    height: 28px;
  }
}

@media (max-width: 480px) {
  .text-chat-header {
    padding: 12px 16px;
  }
  
  .text-chat-header h2 {
    font-size: 18px;
  }
  
  .text-chat-subtitle {
    font-size: 12px;
  }
  
  .text-chat-container {
    padding: 12px;
  }
  
  .text-chat-messages {
    padding: 12px 0;
    max-height: calc(100vh - 260px);
  }
  
  .text-input-container {
    padding: 12px 0;
  }
  
  .input-wrapper {
    padding: 10px;
  }
  
  .text-input {
    font-size: 12px;
  }
  
  .send-btn {
    width: 32px;
    height: 32px;
  }
  
  .text-message-content {
    max-width: 90%;
    font-size: 12px;
    padding: 8px 12px;
  }
  
  .text-message-avatar {
    width: 24px;
    height: 24px;
  }
}

/* Text Chat Interface */
.text-chat-interface {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: transparent;
  display: flex;
  flex-direction: column;
  z-index: 100;
}

.text-chat-header {
  padding: 20px 30px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.1);
  text-align: center;
  background: rgba(30, 41, 59, 0.8);
  backdrop-filter: blur(20px);
}

.text-chat-header h2 {
  margin: 0 0 8px 0;
  color: #f8fafc;
  font-size: 24px;
  font-weight: 700;
}

.text-chat-subtitle {
  margin: 0;
  color: #94a3b8;
  font-size: 14px;
}

.text-chat-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  max-width: 800px;
  margin: 0 auto;
  width: 100%;
  padding: 20px;
  position: relative;
  min-height: 0;
}

.text-chat-messages {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 20px 0;
  display: flex;
  flex-direction: column;
  gap: 20px;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  min-height: 0;
  max-height: calc(100vh - 300px);
}

.text-input-container {
  padding: 20px 0;
  border-top: 1px solid rgba(148, 163, 184, 0.1);
}

.input-wrapper {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  background: rgba(30, 41, 59, 0.8);
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 16px;
  padding: 16px;
  backdrop-filter: blur(20px);
}

.text-input {
  flex: 1;
  background: transparent;
  border: none;
  color: #f8fafc;
  font-size: 14px;
  line-height: 1.5;
  resize: none;
  outline: none;
  font-family: inherit;
  min-height: 24px;
  max-height: 120px;
}

.text-input::placeholder {
  color: #94a3b8;
}

.send-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, #3b82f6, #1d4ed8);
  border: none;
  border-radius: 12px;
  color: white;
  cursor: pointer;
  transition: all 0.3s ease;
  flex-shrink: 0;
}

.send-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 8px 24px rgba(59, 130, 246, 0.3);
}

.send-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

/* Text Message Styles */
.text-message {
  display: flex;
  gap: 12px;
  animation: fadeIn 0.3s ease;
}

.text-message.user {
  justify-content: flex-end;
}

.text-message.ai {
  justify-content: flex-start;
}

.text-message-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  flex-shrink: 0;
}

.text-message-content {
  max-width: 70%;
  padding: 12px 16px;
  border-radius: 16px;
  font-size: 14px;
  line-height: 1.5;
}

.text-message.user .text-message-content {
  background: linear-gradient(135deg, #3b82f6, #1d4ed8);
  color: white;
}

.text-message.ai .text-message-content {
  background: rgba(30, 41, 59, 0.8);
  color: #f8fafc;
  border: 1px solid rgba(148, 163, 184, 0.1);
}

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Hide transcript panel for now */
.live-transcript-panel {
  display: none;
}

/* Hide title, subtitle, microphone icon, and start button on main page */
.app-title,
.app-subtitle,
.voice-icon,
.mic-circle,
.mic-icon,
.start-btn {
  display: none !important;
}

/* Place Stop Chat and language options at the bottom on main page */
.voice-controls {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: 180px; /* extra gap above language bar */
  width: calc(100% - 40px);
  max-width: 560px;
  margin: 0;
  z-index: 1000;
}

.language-selection {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: 20px;
  width: calc(100% - 40px);
  max-width: 560px;
  margin: 0;
  z-index: 1000;
}

@media (max-width: 768px) {
  .voice-controls {
    bottom: 150px; /* increase mobile gap as well */
    width: calc(100% - 24px);
    max-width: 520px;
  }
  .language-selection {
    bottom: 12px;
    width: calc(100% - 24px);
    max-width: 520px;
  }
}

@media (max-width: 480px) {
  .voice-controls {
    bottom: 130px;
  }
  .language-selection {
    position: fixed !important;
    left: 10px !important;
    right: auto !important;
    top: 20px !important;
    bottom: auto !important;
    transform: none !important;
    width: auto !important;
    max-width: 140px !important;
    padding: 12px 10px !important;
    margin: 0 !important;
    text-align: left !important;
  }
  
  .language-heading {
    font-size: 14px;
    margin: 0 0 12px 0;
    text-align: left;
    color: #cbd5e1;
    font-weight: 600;
  }
  
  .language-buttons {
    display: flex !important;
    flex-direction: column !important;
    gap: 8px !important;
    align-items: flex-start !important;
    justify-content: flex-start !important;
    flex-wrap: nowrap !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    max-height: calc(100vh - 100px) !important;
  }
  
  .language-btn {
    width: 100% !important;
    min-width: 120px !important;
    text-align: left !important;
    padding: 10px 12px !important;
    font-size: 12px !important;
    height: auto !important;
    min-height: 44px !important;
  }
}

/* Real-time Transcript Styles */
.transcript-container {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 400px;
  height: 200px; /* Default minimum height */
  min-height: 200px;
  max-height: calc(100vh - 40px);
  background: rgba(15, 23, 42, 0.95);
  border: 1px solid rgba(148, 163, 184, 0.1);
  border-radius: 16px;
  overflow: hidden;
  backdrop-filter: blur(10px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  z-index: 1000;
  transition: height 0.3s ease-in-out;
}

/* Expanded state when transcription is active */
.transcript-container.expanded {
  height: calc(100vh - 40px);
}

.transcript-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  background: rgba(30, 41, 59, 0.8);
  border-bottom: 1px solid rgba(148, 163, 184, 0.1);
}

.transcript-header h3 {
  color: #f8fafc;
  font-size: 16px;
  font-weight: 600;
  margin: 0;
}

.transcript-controls {
  display: flex;
  gap: 8px;
}

.transcript-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: rgba(59, 130, 246, 0.1);
  border: 1px solid rgba(59, 130, 246, 0.2);
  border-radius: 8px;
  color: #3b82f6;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
}

.transcript-btn:hover:not(:disabled) {
  background: rgba(59, 130, 246, 0.2);
  border-color: rgba(59, 130, 246, 0.4);
}

.transcript-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.transcript-content {
  max-height: calc(100vh - 200px);
  min-height: 100px;
  overflow-y: auto;
  padding: 16px 20px;
  flex: 1;
  transition: min-height 0.3s ease-in-out;
}

/* Expanded content when transcription is active */
.transcript-container.expanded .transcript-content {
  min-height: 200px;
}

/* Full height mode when conversation is complete */
.transcript-container.full-height {
  height: calc(100vh - 40px);
}

.transcript-container.full-height .transcript-content {
  max-height: calc(100vh - 200px);
  min-height: calc(100vh - 300px);
}

.transcript-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  color: #64748b;
  text-align: center;
}

.transcript-placeholder i {
  font-size: 24px;
  margin-bottom: 12px;
  opacity: 0.6;
}

.transcript-placeholder p {
  margin: 0;
  font-size: 14px;
}

.transcript-message {
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
  animation: fadeIn 0.3s ease;
}

.transcript-message:last-child {
  margin-bottom: 0;
}

.transcript-message-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 600;
}

.transcript-message.user .transcript-message-avatar {
  background: linear-gradient(135deg, #3b82f6, #1d4ed8);
  color: white;
}

.transcript-message.ai .transcript-message-avatar {
  background: linear-gradient(135deg, #10b981, #059669);
  color: white;
}

.transcript-message-content {
  flex: 1;
  background: rgba(30, 41, 59, 0.6);
  border: 1px solid rgba(148, 163, 184, 0.1);
  border-radius: 12px;
  padding: 12px 16px;
}

.transcript-message-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.transcript-message-header span {
  font-size: 12px;
  font-weight: 600;
  color: #94a3b8;
}

.transcript-message-time {
  font-size: 11px;
  color: #64748b;
}

.transcript-message-text {
  color: #f8fafc;
  font-size: 14px;
  line-height: 1.5;
  margin: 0;
}

.transcript-message-text.partial {
  opacity: 0.7;
  font-style: italic;
}

.transcript-status {
  padding: 12px 20px;
  background: rgba(30, 41, 59, 0.6);
  border-top: 1px solid rgba(148, 163, 184, 0.1);
  color: #94a3b8;
  font-size: 12px;
  text-align: center;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  /* Show transcript in small box on top right for mobile */
  .transcript-container {
    position: fixed !important;
    top: 10px !important;
    right: 10px !important;
    bottom: auto !important;
    width: 200px !important;
    height: 150px !important;
    min-height: 150px !important;
    max-height: 400px !important;
    border-radius: 12px !important;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5) !important;
    z-index: 999 !important;
    transition: all 0.3s ease !important;
  }
  
  /* Collapsed state (minimized) */
  .transcript-container.mobile-collapsed {
    height: 48px !important;
    min-height: 48px !important;
    overflow: hidden !important;
  }
  
  /* Expanded state on mobile */
  .transcript-container.mobile-expanded {
    height: 400px !important;
    max-height: 70vh !important;
  }
  
  .transcript-header {
    padding: 12px !important;
    cursor: pointer !important;
    -webkit-tap-highlight-color: rgba(59, 130, 246, 0.2);
  }
  
  .transcript-header h3 {
    font-size: 13px !important;
    display: flex;
    align-items: center;
    gap: 6px;
  }
  
  /* Add expand/collapse icon */
  .transcript-header h3::after {
    content: '▼';
    font-size: 10px;
    transition: transform 0.3s ease;
  }
  
  .transcript-container.mobile-collapsed .transcript-header h3::after {
    transform: rotate(-90deg);
  }
  
  .transcript-controls {
    display: none !important;
  }
  
  /* Show controls when expanded */
  .transcript-container.mobile-expanded .transcript-controls {
    display: flex !important;
  }
  
  /* Ensure content is visible when expanded on mobile */
  .transcript-container.mobile-expanded .transcript-content {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
  }
  
  .transcript-btn {
    padding: 4px 8px !important;
    font-size: 10px !important;
    gap: 4px !important;
  }
  
  .transcript-content {
    padding: 8px 10px !important;
    max-height: calc(100% - 100px) !important;
    font-size: 10px !important;
  }
  
  .transcript-container.mobile-collapsed .transcript-content {
    display: none !important;
  }
  
  .transcript-message {
    margin-bottom: 12px !important;
    gap: 8px !important;
  }
  
  .transcript-message-avatar {
    width: 24px !important;
    height: 24px !important;
    font-size: 10px !important;
    min-width: 24px !important;
  }
  
  .transcript-message-header {
    font-size: 11px !important;
    margin-bottom: 3px !important;
  }
  
  .transcript-message-time {
    font-size: 9px !important;
  }
  
  .transcript-message-text {
    font-size: 10px !important;
    line-height: 1.3 !important;
  }
  
  /* Interim message styling for mobile */
  .transcript-message.interim .transcript-message-text {
    opacity: 0.7 !important;
    font-style: italic !important;
  }
  
  .transcript-status {
    padding: 8px 12px !important;
    font-size: 10px !important;
  }
  
  .transcript-container.mobile-collapsed .transcript-status {
    display: none !important;
  }
  
  /* Show status when expanded on mobile */
  .transcript-container.mobile-expanded .transcript-status {
    display: block !important;
  }
  
  .transcript-placeholder {
    padding: 20px 10px !important;
  }
  
  .transcript-placeholder i {
    font-size: 18px !important;
    margin-bottom: 8px !important;
  }
  
  .transcript-placeholder p {
    font-size: 11px !important;
  }
}

@media (max-width: 480px) {
  /* Smaller screens - make it even more compact */
  .transcript-container {
    width: 180px !important;
    height: 140px !important;
    top: 8px !important;
    right: 8px !important;
  }
  
  .transcript-container.mobile-expanded {
    height: 350px !important;
    max-height: 65vh !important;
  }
}

/* User Information Collection Popup Styles */
.email-popup {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  backdrop-filter: blur(12px);
  /* Prevent mobile browser input overlay */
  -webkit-transform: translateZ(0);
  transform: translateZ(0);
  will-change: transform;
  /* Force hardware acceleration */
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
}

.email-popup-content {
  background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
  border-radius: 20px;
  padding: 28px;
  max-width: 420px;
  width: 90%;
  box-shadow: 0 24px 48px -12px rgba(0, 0, 0, 0.9);
  border: 1px solid rgba(148, 163, 184, 0.3);
  animation: popupSlideIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  position: relative;
  overflow: hidden;
}

.email-popup-content::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #3b82f6, #8b5cf6, #06b6d4);
  border-radius: 24px 24px 0 0;
}

@keyframes popupSlideIn {
  from {
    opacity: 0;
    transform: translateY(30px) scale(0.9);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.email-popup-header {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 6px;
  margin-bottom: 20px;
  position: relative;
  text-align: left;
  padding-right: 36px; /* space for close button */
  width: 100%;
}

.email-popup-header h3 {
  color: #f8fafc;
  font-size: 22px;
  font-weight: 700;
  margin: 0;
  background: linear-gradient(135deg, #f8fafc, #cbd5e1);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  align-self: stretch;
}

.popup-subtitle {
  color: #94a3b8;
  font-size: 14px;
  margin: 0;
  font-weight: 400;
  align-self: stretch;
  width: 100%;
}

.close-popup-btn {
  background: none;
  border: none;
  color: #94a3b8;
  font-size: 20px;
  cursor: pointer;
  padding: 8px;
  border-radius: 8px;
  transition: all 0.2s ease;
  position: absolute;
  right: 8px;
  top: 8px;
}

.close-popup-btn:hover {
  color: #f8fafc;
  background: rgba(148, 163, 184, 0.1);
}

.email-popup-body {
  text-align: center;
}

.email-message {
  color: #cbd5e1;
  font-size: 16px;
  margin-bottom: 24px;
  line-height: 1.6;
}

.input-group {
  margin-bottom: 18px;
  text-align: left;
}

.input-group label {
  display: flex;
  align-items: center;
  color: #e2e8f0;
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 10px;
  gap: 8px;
}

.input-group label i {
  color: #3b82f6;
  font-size: 16px;
  width: 20px;
}

.input-group input,
.input-group select {
  width: 100%;
  padding: 12px 14px;
  border: 2px solid rgba(148, 163, 184, 0.3);
  border-radius: 12px;
  background: rgba(30, 41, 59, 0.9);
  color: #f8fafc;
  font-size: 15px;
  transition: all 0.3s ease;
  box-sizing: border-box;
  font-family: inherit;
}

.input-group input:focus,
.input-group select:focus {
  outline: none;
  border-color: #3b82f6;
  background: rgba(30, 41, 59, 1);
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.15);
  transform: translateY(-1px);
}

.input-group input::placeholder {
  color: #64748b;
}

.amount-select {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 16px center;
  background-size: 16px;
  padding-right: 48px;
}

.amount-select option {
  background: #1e293b;
  color: #f8fafc;
  padding: 12px;
}

.popup-actions {
  margin-top: 20px;
}

.submit-email-btn {
  background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
  color: white;
  border: none;
  padding: 14px 24px;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  width: 100%;
  box-shadow: 0 6px 18px rgba(59, 130, 246, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  position: relative;
  overflow: hidden;
}

.submit-email-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s ease;
}

.submit-email-btn:hover::before {
  left: 100%;
}

.submit-email-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 35px rgba(59, 130, 246, 0.4);
  background: linear-gradient(135deg, #2563eb 0%, #1e40af 100%);
}

.submit-email-btn:active {
  transform: translateY(-1px);
}

.submit-email-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

/* Mobile responsive for user info popup */
@media (max-width: 768px) {
  .email-popup {
    /* Ensure popup covers full screen on mobile */
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    z-index: 10000 !important;
    /* Prevent scrolling issues on mobile */
    overflow: auto;
    -webkit-overflow-scrolling: touch;
    /* Prevent mobile browser input overlay */
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
    will-change: transform;
  }
  
  .email-popup-content {
    padding: 20px;
    max-width: 95%;
    margin: 10px;
    max-height: 90vh;
    overflow-y: auto;
    /* Ensure content is visible on mobile */
    position: relative;
    transform: none;
  }
  
  .email-popup-header h3 {
    font-size: 20px;
    margin-bottom: 8px;
  }
  
  .popup-subtitle {
    font-size: 14px;
    margin-bottom: 20px;
  }
  
  .input-group {
    margin-bottom: 16px;
  }
  
  .input-group input,
  .input-group select {
    padding: 12px 14px;
    font-size: 16px; /* Prevent zoom on iOS */
    border-radius: 12px;
    /* Prevent mobile browser input overlay */
    -webkit-appearance: none;
    appearance: none;
    -webkit-tap-highlight-color: transparent;
    /* Force hardware acceleration */
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
    will-change: transform;
  }
  
  .submit-email-btn {
    padding: 16px 28px;
    font-size: 15px;
    /* Critical mobile interaction fixes */
    touch-action: manipulation !important;
    pointer-events: auto !important;
    -webkit-user-select: none !important;
    user-select: none !important;
    -webkit-tap-highlight-color: rgba(59, 130, 246, 0.3) !important;
    /* Ensure button is above everything */
    position: relative !important;
    z-index: 10002 !important;
  }
  
  /* Additional mobile fixes */
  .email-popup * {
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
  }
  
  /* Allow inputs and buttons to be selectable/clickable on mobile */
  .email-popup input,
  .email-popup select,
  .email-popup button {
    -webkit-user-select: auto !important;
    user-select: auto !important;
    pointer-events: auto !important;
  }
  
  /* Prevent mobile browser input overlay */
  .email-popup {
    -webkit-overflow-scrolling: touch;
    -webkit-transform: translate3d(0, 0, 0);
    transform: translate3d(0, 0, 0);
    will-change: transform;
  }
  
  .email-popup-content {
    -webkit-transform: translate3d(0, 0, 0);
    transform: translate3d(0, 0, 0);
    will-change: transform;
  }
  
  .email-popup input,
  .email-popup select,
  .email-popup textarea {
    -webkit-user-select: text;
    -moz-user-select: text;
    -ms-user-select: text;
    user-select: text;
  }
  
  /* Ensure popup is always on top on mobile */
  .email-popup {
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
    will-change: transform;
  }
}

/* Extra small mobile devices */
@media (max-width: 480px) {
  .email-popup-content {
    padding: 16px;
    margin: 5px;
    max-height: 95vh;
  }
  
  .email-popup-header h3 {
    font-size: 18px;
  }
  
  .input-group input,
  .input-group select {
    padding: 10px 12px;
    font-size: 16px; /* Prevent zoom on iOS */
  }
}

/* Google Calendar Popup Styles */
.google-meet-popup {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10001;
  backdrop-filter: blur(12px);
}

.google-meet-popup-content {
  background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
  border-radius: 20px;
  padding: 28px;
  max-width: 420px;
  width: 90%;
  box-shadow: 0 24px 48px -12px rgba(0, 0, 0, 0.9);
  border: 1px solid rgba(148, 163, 184, 0.3);
  animation: popupSlideIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  position: relative;
  overflow: hidden;
}

.google-meet-popup-content::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #4285f4, #34a853, #fbbc05, #ea4335);
  border-radius: 24px 24px 0 0;
}

.google-meet-popup-header {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 6px;
  text-align: left;
  margin-bottom: 20px;
  position: relative;
  padding-right: 36px; /* space for close button */
}

.google-meet-popup-header h3 {
  color: #f8fafc;
  font-size: 22px;
  font-weight: 700;
  margin: 0;
  background: linear-gradient(135deg, #f8fafc 0%, #cbd5e1 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.google-meet-popup-header .popup-subtitle {
  color: #94a3b8;
  font-size: 14px;
  margin: 0;
  font-weight: 400;
}

.google-meet-popup-body {
  text-align: center;
}

.meet-info {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 32px;
  padding: 24px;
  background: rgba(66, 133, 244, 0.1);
  border-radius: 16px;
  border: 1px solid rgba(66, 133, 244, 0.2);
}

.meet-icon {
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, #4285f4, #34a853);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  color: white;
  flex-shrink: 0;
}

.meet-details h4 {
  color: #f8fafc;
  font-size: 20px;
  font-weight: 600;
  margin: 0 0 8px 0;
  text-align: left;
}

.meet-details p {
  color: #cbd5e1;
  font-size: 14px;
  margin: 0;
  text-align: left;
  line-height: 1.5;
}

.meet-actions {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.join-meet-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 16px 32px;
  background: linear-gradient(135deg, #4285f4 0%, #34a853 100%);
  color: white;
  text-decoration: none;
  border-radius: 12px;
  font-size: 18px;
  font-weight: 600;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 8px 24px rgba(66, 133, 244, 0.3);
  border: none;
  cursor: pointer;
}

.join-meet-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(66, 133, 244, 0.4);
  background: linear-gradient(135deg, #3367d6 0%, #2d8f47 100%);
}

.join-meet-btn:active {
  transform: translateY(0);
  box-shadow: 0 4px 16px rgba(66, 133, 244, 0.3);
}

.meet-note {
  color: #94a3b8;
  font-size: 14px;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.meet-note i {
  color: #4285f4;
}

/* Mobile responsive for Calendar popup */
@media (max-width: 768px) {
  .google-meet-popup {
    /* Ensure popup covers full screen on mobile */
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    z-index: 10001 !important;
    /* Prevent scrolling issues on mobile */
    overflow: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  .google-meet-popup-content {
    padding: 24px;
    max-width: 95%;
    margin: 10px;
    max-height: 90vh;
    overflow-y: auto;
    /* Ensure content is visible on mobile */
    position: relative;
    transform: none;
  }
  
  .google-meet-popup-header h3 {
    font-size: 24px;
    margin-bottom: 8px;
  }
  
  .google-meet-popup-header .popup-subtitle {
    font-size: 14px;
    margin-bottom: 20px;
  }
  
  .meet-info {
    flex-direction: column;
    text-align: center;
    gap: 16px;
    padding: 20px;
  }
  
  .meet-details h4,
  .meet-details p {
    text-align: center;
  }
  
  .join-meet-btn {
    padding: 14px 24px;
    font-size: 16px;
  }
}

/* Extra small mobile devices */
@media (max-width: 480px) {
  .google-meet-popup-content {
    padding: 20px;
    margin: 5px;
    max-height: 95vh;
  }
  
  .google-meet-popup-header h3 {
    font-size: 22px;
  }
  
  .meet-info {
    padding: 16px;
  }
  
  .join-meet-btn {
    padding: 12px 20px;
    font-size: 15px;
  }
}

/* Time Selection Popup Styles */
.time-selection-popup {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10002;
  backdrop-filter: blur(12px);
  -webkit-transform: translateZ(0);
  transform: translateZ(0);
  will-change: transform;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
}

.time-selection-popup-content {
  background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
  border-radius: 16px;
  padding: 16px;
  max-width: 400px;
  width: 90%;
  max-height: 60vh;
  overflow-y: auto;
  box-shadow: 0 32px 64px -12px rgba(0, 0, 0, 0.9);
  border: 1px solid rgba(148, 163, 184, 0.3);
  animation: popupSlideIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  position: relative;
  overflow: hidden;
}

.time-selection-popup-content::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #f59e0b, #10b981, #3b82f6);
  border-radius: 24px 24px 0 0;
}


.time-selection-popup-body {
  text-align: center;
}

.time-selection-info {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 12px;
  padding: 10px;
  background: rgba(59, 130, 246, 0.1);
  border-radius: 10px;
  border: 1px solid rgba(59, 130, 246, 0.2);
}

.time-icon {
  flex-shrink: 0;
  width: 30px;
  height: 30px;
  background: linear-gradient(135deg, #3b82f6, #1d4ed8);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  color: #f8fafc;
  box-shadow: 0 3px 6px rgba(59, 130, 246, 0.3);
}

.time-details {
  flex: 1;
  text-align: left;
}

.time-details h4 {
  color: #f8fafc;
  font-size: 15px;
  font-weight: 600;
  margin: 0 0 6px 0;
}

.time-details p {
  color: #cbd5e1;
  font-size: 14px;
  line-height: 1.5;
  margin: 0 0 16px 0;
}

.date-selection {
  margin-bottom: 8px;
}

.date-selection label {
  display: block;
  color: #f8fafc;
  font-size: 16px;
  font-weight: 500;
  margin-bottom: 8px;
  text-align: left;
}

.date-selection input[type="date"] {
  width: 100%;
  padding: 12px 16px;
  background: rgba(30, 41, 59, 0.8);
  border: 2px solid rgba(148, 163, 184, 0.3);
  border-radius: 12px;
  color: #f8fafc;
  font-size: 16px;
  font-family: 'Inter', sans-serif;
  transition: all 0.3s ease;
}

.date-selection input[type="date"]:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.time-slots-container {
  margin-bottom: 8px;
}

.time-slots-container h5 {
  color: #f8fafc;
  font-size: 13px;
  font-weight: 600;
  margin: 0 0 6px 0;
  text-align: left;
}

.time-slots-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
  gap: 4px;
  max-height: 100px;
  overflow-y: auto;
  padding: 2px;
}

.time-slot {
  padding: 4px 8px;
  background: rgba(30, 41, 59, 0.8);
  border: 1px solid rgba(148, 163, 184, 0.3);
  border-radius: 4px;
  color: #f8fafc;
  font-size: 11px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  text-align: center;
  user-select: none;
}

.time-slot:hover {
  border-color: #3b82f6;
  background: rgba(59, 130, 246, 0.1);
  transform: translateY(-2px);
}

.time-slot.selected {
  background: linear-gradient(135deg, #3b82f6, #1d4ed8);
  border-color: #3b82f6;
  color: #f8fafc;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.time-slot.disabled {
  opacity: 0.5;
  cursor: not-allowed;
  background: rgba(30, 41, 59, 0.4);
}

.time-slot.disabled:hover {
  transform: none;
  border-color: rgba(148, 163, 184, 0.3);
  background: rgba(30, 41, 59, 0.4);
}

.selected-time-info {
  margin-top: 8px;
  padding: 6px;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-radius: 6px;
}

.selected-time-display {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  color: #10b981;
  font-weight: 600;
  font-size: 12px;
}

.selected-time-display i {
  font-size: 12px;
}

.time-selection-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.confirm-time-btn {
  background: linear-gradient(135deg, #10b981, #059669);
  color: #f8fafc;
  border: none;
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 4px;
  box-shadow: 0 3px 6px rgba(16, 185, 129, 0.3);
  min-width: 140px;
  justify-content: center;
}

.confirm-time-btn:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 12px 24px rgba(16, 185, 129, 0.4);
}

.confirm-time-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.time-note {
  color: #94a3b8;
  font-size: 10px;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.time-note i {
  color: #3b82f6;
}

/* Mobile responsive for Time Selection popup */
@media (max-width: 768px) {
  .time-selection-popup {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    z-index: 10002 !important;
    overflow: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  .time-selection-popup-content {
    padding: 12px;
    max-width: 95%;
    margin: 10px;
    max-height: 70vh;
    overflow-y: auto;
    position: relative;
    transform: none;
  }
  
  
  .time-selection-info {
    flex-direction: column;
    text-align: center;
    gap: 8px;
    padding: 8px;
  }
  
  .time-details {
    text-align: center;
  }
  
  .time-slots-grid {
    grid-template-columns: repeat(auto-fit, minmax(75px, 1fr));
    gap: 4px;
    max-height: 80px;
  }
  
  .time-slot {
    padding: 4px 6px;
    font-size: 10px;
  }
  
  .confirm-time-btn {
    padding: 8px 16px;
    font-size: 13px;
    min-width: 140px;
  }
}

/* Extra small mobile devices */
@media (max-width: 480px) {
  .time-selection-popup-content {
    padding: 10px;
    margin: 5px;
    max-height: 75vh;
  }
  
  
  .time-selection-info {
    padding: 6px;
  }
  
  .time-slots-grid {
    grid-template-columns: repeat(auto-fit, minmax(70px, 1fr));
    gap: 3px;
    max-height: 70px;
  }
  
  .time-slot {
    padding: 3px 6px;
    font-size: 9px;
  }
  
  .confirm-time-btn {
    padding: 6px 12px;
    font-size: 12px;
    min-width: 120px;
  }
}

/* UTM Notification Styles */
.utm-notification {
  position: fixed;
  top: 20px;
  right: 20px;
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: white;
  padding: 16px;
  border-radius: 12px;
  box-shadow: 0 10px 25px rgba(16, 185, 129, 0.3);
  z-index: 10000;
  max-width: 350px;
  animation: slideInRight 0.3s ease-out;
}

.utm-notification-content {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.utm-notification-icon {
  font-size: 1.5rem;
  flex-shrink: 0;
}

.utm-notification-text {
  flex: 1;
}

.utm-notification-text strong {
  display: block;
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 4px;
}

.utm-notification-text p {
  font-size: 0.9rem;
  margin: 4px 0;
  opacity: 0.9;
}

.utm-notification-text small {
  font-size: 0.8rem;
  opacity: 0.8;
  display: block;
  margin-top: 4px;
}

.utm-notification-close {
  background: none;
  border: none;
  color: white;
  font-size: 1rem;
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  transition: background-color 0.2s ease;
  flex-shrink: 0;
}

.utm-notification-close:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

@keyframes slideInRight {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

/* Mobile UTM notification */
@media (max-width: 768px) {
  .utm-notification {
    top: 10px;
    right: 10px;
    left: 10px;
    max-width: none;
    padding: 12px;
  }
  
  .utm-notification-content {
    gap: 10px;
  }
  
  .utm-notification-icon {
    font-size: 1.3rem;
  }
  
  .utm-notification-text strong {
    font-size: 0.9rem;
  }
  
  .utm-notification-text p {
    font-size: 0.8rem;
  }
  
  .utm-notification-text small {
    font-size: 0.7rem;
  }
}
