/* Universal Action Layer (Command Center) Stylesheet */

.ual-fab-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

.ual-fab-btn {
  width: 56px;
  height: 56px;
  border-radius: 28px;
  background: linear-gradient(135deg, #25D366, #128C7E);
  border: none;
  color: #ffffff;
  font-size: 24px;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(37, 211, 102, 0.4);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.2s ease;
}

.ual-fab-btn:hover {
  transform: scale(1.08);
  box-shadow: 0 12px 32px rgba(37, 211, 102, 0.5);
}

.ual-fab-btn.ual-active {
  transform: rotate(45deg);
  background: #33394b;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.ual-fab-btn.ual-has-badge::after {
  content: '';
  position: absolute;
  top: -2px;
  right: -2px;
  width: 14px;
  height: 14px;
  background: #ef4444;
  border-radius: 50%;
  border: 2px solid #ffffff;
  animation: ual-pulse 2s infinite;
}

.ual-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  background: #ef4444;
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  width: 20px;
  height: 20px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #111827;
}

@keyframes ual-pulse {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 8px rgba(239, 68, 68, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

.ual-speed-dial {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 12px;
  margin-bottom: 16px;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.ual-speed-dial.ual-hidden {
  opacity: 0;
  pointer-events: none;
  transform: translateY(16px) scale(0.95);
}

.ual-dial-item {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(17, 24, 39, 0.85);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  padding: 8px 16px;
  border-radius: 24px;
  color: #f9fafb;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
  transition: all 0.2s ease;
}

.ual-dial-item:hover {
  background: rgba(31, 41, 55, 0.95);
  border-color: rgba(37, 211, 102, 0.5);
  transform: translateX(-4px);
}

.ual-dial-primary {
  border-color: #25D366;
  background: rgba(37, 211, 102, 0.15);
}

.ual-dial-badge {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  background: rgba(255, 255, 255, 0.1);
  padding: 2px 6px;
  border-radius: 4px;
  color: #9ca3af;
}

.ual-dial-title {
  font-size: 14px;
  font-weight: 500;
}

.ual-dial-icon {
  display: flex;
  align-items: center;
  color: #25D366;
}

/* Modal Overlay & Panel */
.ual-panel-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(6px);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  opacity: 1;
  transition: opacity 0.2s ease;
}

.ual-panel-overlay.ual-hidden {
  opacity: 0;
  pointer-events: none;
}

.ual-panel-modal {
  background: #111827;
  color: #f9fafb;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  width: 100%;
  max-width: 480px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.6);
  position: relative;
  overflow: hidden;
}

.ual-panel-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: transparent;
  border: none;
  color: #9ca3af;
  font-size: 24px;
  cursor: pointer;
  line-height: 1;
  padding: 4px 8px;
  border-radius: 6px;
}

.ual-panel-close:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
}

.ual-panel-body {
  padding: 24px;
}

.ual-panel-header h3 {
  margin: 0 0 6px 0;
  font-size: 18px;
  font-weight: 600;
  color: #ffffff;
}

.ual-subtext {
  margin: 0 0 20px 0;
  font-size: 13px;
  color: #9ca3af;
}

.ual-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.ual-form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.ual-form-group label {
  font-size: 13px;
  font-weight: 500;
  color: #d1d5db;
}

.ual-input {
  background: #1f2937;
  border: 1px solid #374151;
  border-radius: 8px;
  padding: 10px 14px;
  color: #ffffff;
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s ease;
}

.ual-input:focus {
  border-color: #25D366;
}

.ual-code-input {
  letter-spacing: 4px;
  font-size: 18px;
  font-weight: bold;
  text-align: center;
}

.ual-help-text {
  font-size: 12px;
  color: #6b7280;
}

.ual-btn {
  padding: 10px 18px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: background 0.2s ease;
}

.ual-btn-primary {
  background: #25D366;
  color: #052e16;
}

.ual-btn-primary:hover {
  background: #22c55e;
}

.ual-btn-secondary {
  background: #374151;
  color: #f3f4f6;
}

.ual-btn-secondary:hover {
  background: #4b5563;
}

.ual-btn-link {
  background: transparent;
  color: #9ca3af;
  text-decoration: underline;
}

.ual-error-banner {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.4);
  color: #fca5a5;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 13px;
  margin-bottom: 16px;
}

.ual-action-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 16px;
}

.ual-panel-footer {
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid #1f2937;
  text-align: center;
}

.ual-link-btn {
  background: transparent;
  border: none;
  color: #60a5fa;
  font-size: 13px;
  cursor: pointer;
}

.ual-link-btn:hover {
  text-decoration: underline;
}

.ual-loading {
  text-align: center;
  padding: 40px 20px;
}

.ual-spinner {
  width: 32px;
  height: 32px;
  border: 3px solid rgba(255, 255, 255, 0.1);
  border-top-color: #25D366;
  border-radius: 50%;
  animation: ual-spin 0.8s linear infinite;
  margin: 0 auto 16px auto;
}

@keyframes ual-spin {
  to { transform: rotate(360deg); }
}

.ual-success-state {
  text-align: center;
  padding: 20px 10px;
}

.ual-success-icon {
  width: 56px;
  height: 56px;
  background: rgba(37, 211, 102, 0.2);
  color: #25D366;
  border-radius: 50%;
  font-size: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px auto;
}

/* Contact search items */
.ual-results-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 260px;
  overflow-y: auto;
  margin-top: 12px;
}

.ual-contact-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 8px;
  background: #1f2937;
  cursor: pointer;
  transition: background 0.2s ease;
}

.ual-contact-item:hover {
  background: #374151;
}

.ual-contact-avatar {
  font-size: 20px;
}

.ual-contact-info {
  display: flex;
  flex-direction: column;
}

.ual-contact-name {
  font-size: 14px;
  font-weight: 500;
  color: #ffffff;
}

.ual-contact-phone {
  font-size: 12px;
  color: #9ca3af;
}

.ual-empty-hint {
  font-size: 13px;
  color: #6b7280;
  text-align: center;
  padding: 20px;
}

.ual-support-links {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.ual-support-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border-radius: 12px;
  background: #1f2937;
  border: 1px solid #374151;
  color: #ffffff;
  text-decoration: none;
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.ual-support-card:hover {
  border-color: #25D366;
  transform: translateY(-2px);
}

.ual-support-icon {
  font-size: 24px;
}

.ual-support-title {
  font-size: 14px;
  font-weight: 600;
}

.ual-support-sub {
  font-size: 12px;
  color: #9ca3af;
}

@media (max-width: 480px) {
  .ual-fab-container {
    bottom: 16px;
    right: 16px;
  }
  .ual-panel-modal {
    max-width: 100%;
    margin: 10px;
  }
}
