/* ============================================
   MOCHA.CSS - Elementos de cross-promotion
   Todas as classes usam prefixo mocha- para evitar conflitos
   ============================================ */

/* Reset básico para elementos Mocha */
.mocha-popup *,
.mocha-floating *,
.mocha-banner *,
.mocha-footer * {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* ============================================
   POPUP
   ============================================ */
.mocha-popup-overlay {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  opacity: 0;
  visibility: hidden;
  transition: all 0.2s ease;
}

.mocha-popup-overlay.mocha-active {
  opacity: 1;
  visibility: visible;
}

.mocha-popup-container {
  position: relative;
  width: 100%;
  max-width: 640px;
  max-height: 90vh;
  overflow: hidden;
  background: linear-gradient(to bottom, #f8fafc, #ffffff);
  border-radius: 16px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  transform: scale(0.95);
  opacity: 0;
  transition: all 0.2s ease;
}

.mocha-popup-overlay.mocha-active .mocha-popup-container {
  transform: scale(1);
  opacity: 1;
}

.mocha-popup-header {
  position: relative;
  overflow: hidden;
  background: linear-gradient(to right, #1e3a5f, #2d5a87);
  padding: 24px 24px 32px;
  color: white;
}

.mocha-popup-header-bg {
  position: absolute;
  inset: 0;
  opacity: 0.1;
  pointer-events: none;
}

.mocha-popup-header-circle-1 {
  position: absolute;
  top: 0;
  right: 0;
  width: 200px;
  height: 200px;
  background: white;
  border-radius: 50%;
  transform: translate(50%, -50%);
}

.mocha-popup-header-circle-2 {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 150px;
  height: 150px;
  background: white;
  border-radius: 50%;
  transform: translate(-50%, 50%);
}

.mocha-popup-close {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 10;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.1);
  border: none;
  border-radius: 50%;
  color: white;
  cursor: pointer;
  transition: background 0.2s;
}

.mocha-popup-close:hover {
  background: rgba(255, 255, 255, 0.2);
}

.mocha-popup-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 8px;
  font-size: 12px;
  font-weight: 500;
  color: #fde047;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.mocha-popup-title {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 8px;
}

.mocha-popup-subtitle {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.8);
  line-height: 1.5;
}

.mocha-popup-apps {
  padding: 24px;
  overflow-y: auto;
  max-height: 50vh;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.mocha-popup-app {
  position: relative;
  display: flex;
  gap: 16px;
  padding: 16px;
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  text-decoration: none;
  transition: all 0.2s;
}

.mocha-popup-app:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.mocha-popup-app-featured {
  position: absolute;
  top: -8px;
  right: -8px;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  background: linear-gradient(to right, #fbbf24, #eab308);
  color: white;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-radius: 9999px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.mocha-popup-app-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.mocha-popup-app-icon svg {
  width: 24px;
  height: 24px;
}

.mocha-popup-app-content {
  flex: 1;
  min-width: 0;
}

.mocha-popup-app-name {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}

.mocha-popup-app-name span {
  font-weight: 600;
  font-size: 15px;
  color: #1e293b;
}

.mocha-popup-app-name svg {
  width: 14px;
  height: 14px;
  color: #94a3b8;
  opacity: 0;
  transition: opacity 0.2s;
}

.mocha-popup-app:hover .mocha-popup-app-name svg {
  opacity: 1;
}

.mocha-popup-app-tagline {
  font-size: 13px;
  color: #475569;
  line-height: 1.4;
}

.mocha-popup-app-features {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.mocha-popup-app-feature {
  font-size: 11px;
  padding: 2px 8px;
  background: #f1f5f9;
  color: #475569;
  border-radius: 9999px;
}

.mocha-popup-app-feature-more {
  background: #e2e8f0;
  color: #64748b;
}

.mocha-popup-footer {
  padding: 16px 24px;
  background: #f8fafc;
  border-top: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.mocha-popup-footer-text {
  font-size: 13px;
  color: #64748b;
}

.mocha-popup-footer-close {
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 500;
  color: #475569;
  background: none;
  border: none;
  cursor: pointer;
  transition: color 0.2s;
}

.mocha-popup-footer-close:hover {
  color: #1e293b;
}

/* ============================================
   FLOATING BUTTONS
   ============================================ */
.mocha-floating {
  position: fixed;
  bottom: 24px;
  right: 16px;
  z-index: 9998;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
}

.mocha-floating-panel {
  position: absolute;
  bottom: 160px;
  right: 0;
  width: 320px;
  background: white;
  border-radius: 16px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  border: 1px solid #e2e8f0;
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  transform: translateY(16px);
  transition: all 0.3s ease;
}

.mocha-floating-panel.mocha-active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.mocha-floating-panel-arrow {
  position: absolute;
  bottom: -8px;
  right: 24px;
  width: 16px;
  height: 16px;
  background: white;
  border-right: 1px solid #e2e8f0;
  border-bottom: 1px solid #e2e8f0;
  transform: rotate(45deg);
}

.mocha-floating-panel-header {
  background: linear-gradient(to right, #1e3a5f, #2d5a87);
  padding: 12px 16px;
  color: white;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.mocha-floating-panel-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  font-size: 14px;
}

.mocha-floating-panel-title svg {
  color: #fcd34d;
}

.mocha-floating-panel-close {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  border-radius: 50%;
  color: white;
  cursor: pointer;
  transition: background 0.2s;
}

.mocha-floating-panel-close:hover {
  background: rgba(255, 255, 255, 0.2);
}

.mocha-floating-panel-apps {
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 320px;
  overflow-y: auto;
}

.mocha-floating-panel-app {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  text-decoration: none;
  transition: all 0.2s;
}

.mocha-floating-panel-app:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.mocha-floating-panel-app-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.mocha-floating-panel-app-icon svg {
  width: 18px;
  height: 18px;
}

.mocha-floating-panel-app-content {
  flex: 1;
  min-width: 0;
}

.mocha-floating-panel-app-name {
  display: flex;
  align-items: center;
  gap: 6px;
}

.mocha-floating-panel-app-name span {
  font-weight: 500;
  font-size: 13px;
  color: #1e293b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mocha-fp-novo-tag {
  flex-shrink: 0;
  padding: 1px 5px;
  background: #fef3c7;
  color: #b45309;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  border-radius: 3px;
  line-height: 1.2;
}

.mocha-floating-panel-app-tagline {
  font-size: 11px;
  color: #64748b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mocha-floating-panel-app-external {
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  color: #94a3b8;
  opacity: 0;
  transition: opacity 0.2s;
}

.mocha-floating-panel-app:hover .mocha-floating-panel-app-external {
  opacity: 1;
}

.mocha-floating-panel-footer {
  padding: 12px 16px;
  background: #f8fafc;
  border-top: 1px solid #f1f5f9;
}

.mocha-floating-panel-footer-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 500;
  color: #475569;
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 9999px;
  cursor: pointer;
  transition: all 0.2s;
}

.mocha-floating-panel-footer-btn:hover {
  color: #1e293b;
  background: #f1f5f9;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.mocha-floating-btn {
  position: relative;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  transition: all 0.3s;
}

.mocha-floating-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

.mocha-floating-btn-apps {
  background: linear-gradient(to right, #1e3a5f, #2d5a87);
}

.mocha-floating-btn-apps.mocha-active {
  background: #475569;
  transform: rotate(180deg);
}

.mocha-floating-btn-apps svg {
  width: 24px;
  height: 24px;
  color: white;
}

/* Icon switching: grid visible by default, X hidden */
.mocha-floating-btn-icon-grid {
  display: flex;
}

.mocha-floating-btn-icon-close {
  display: none;
}

/* When active: hide grid, show X, hide badge and pulse */
.mocha-floating-btn-apps.mocha-active .mocha-floating-btn-icon-grid {
  display: none;
}

.mocha-floating-btn-apps.mocha-active .mocha-floating-btn-icon-close {
  display: flex;
}

.mocha-floating-btn-apps.mocha-active .mocha-floating-btn-badge {
  display: none;
}

.mocha-floating-btn-apps.mocha-active .mocha-floating-btn-pulse {
  display: none;
}

.mocha-floating-btn-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  width: 20px;
  height: 20px;
  background: #f59e0b;
  color: white;
  font-size: 10px;
  font-weight: 700;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.mocha-floating-btn-pulse {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: #1e3a5f;
  opacity: 0.15;
  animation: mocha-ping 2.5s cubic-bezier(0, 0, 0.2, 1) infinite;
}

@keyframes mocha-ping {
  75%, 100% {
    transform: scale(1.5);
    opacity: 0;
  }
}

.mocha-floating-btn-whatsapp {
  background: #25D366;
}

.mocha-floating-btn-whatsapp:hover {
  background: #20BD5A;
}

.mocha-floating-btn-whatsapp svg {
  width: 28px;
  height: 28px;
  color: white;
}

/* ============================================
   BANNER
   ============================================ */
.mocha-banner {
  max-width: 1200px;
  margin: 32px auto;
  padding: 0 16px;
}

.mocha-banner-container {
  position: relative;
  overflow: hidden;
  background: linear-gradient(to right, #1e3a5f, #2d5a87, #1e3a5f);
  border-radius: 16px;
  padding: 24px 32px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.mocha-banner-container:hover {
  box-shadow: 0 25px 50px -12px rgba(30, 58, 95, 0.3);
  transform: translateY(-4px);
}

.mocha-banner-bg {
  position: absolute;
  inset: 0;
  opacity: 0.1;
  pointer-events: none;
}

.mocha-banner-circle-1 {
  position: absolute;
  top: -80px;
  right: -80px;
  width: 256px;
  height: 256px;
  background: white;
  border-radius: 50%;
}

.mocha-banner-circle-2 {
  position: absolute;
  bottom: -64px;
  left: -64px;
  width: 192px;
  height: 192px;
  background: white;
  border-radius: 50%;
}

.mocha-banner-circle-3 {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 384px;
  height: 384px;
  background: white;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  opacity: 0.5;
}

.mocha-banner-content {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
}

@media (min-width: 768px) {
  .mocha-banner-content {
    flex-direction: row;
  }
}

.mocha-banner-apps {
  display: flex;
  flex-shrink: 0;
}

.mocha-banner-app {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s;
  cursor: pointer;
  margin-left: -12px;
  border: 2px solid rgba(255, 255, 255, 0.2);
}

.mocha-banner-app:first-child {
  margin-left: 0;
}

@media (min-width: 768px) {
  .mocha-banner-app {
    width: 56px;
    height: 56px;
  }
}

.mocha-banner-app:nth-child(1) { transform: rotate(-7.5deg); }
.mocha-banner-app:nth-child(2) { transform: rotate(-2.5deg); }
.mocha-banner-app:nth-child(3) { transform: rotate(2.5deg); }
.mocha-banner-app:nth-child(4) { transform: rotate(7.5deg); }

.mocha-banner-app:hover {
  transform: scale(1.1) rotate(0deg);
  z-index: 10;
}

.mocha-banner-app svg {
  width: 24px;
  height: 24px;
}

@media (min-width: 768px) {
  .mocha-banner-app svg {
    width: 28px;
    height: 28px;
  }
}

.mocha-banner-text {
  flex: 1;
  text-align: center;
}

@media (min-width: 768px) {
  .mocha-banner-text {
    text-align: left;
  }
}

.mocha-banner-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-bottom: 8px;
  font-size: 12px;
  font-weight: 600;
  color: #fde047;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

@media (min-width: 768px) {
  .mocha-banner-badge {
    justify-content: flex-start;
  }
}

.mocha-banner-badge svg {
  width: 16px;
  height: 16px;
}

.mocha-banner-title {
  font-size: 20px;
  font-weight: 700;
  color: white;
  margin-bottom: 4px;
  line-height: 1.3;
}

@media (min-width: 768px) {
  .mocha-banner-title {
    font-size: 24px;
  }
}

.mocha-banner-subtitle {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.7);
}

@media (min-width: 768px) {
  .mocha-banner-subtitle {
    font-size: 16px;
  }
}

  transform: scale(1.1);
}

.mocha-banner-app svg {
  width: 22px;
  height: 22px;
}

.mocha-banner-btn {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  background: white;
  color: #1e3a5f;
  font-size: 14px;
  font-weight: 600;
  border: none;
  border-radius: 9999px;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  transition: all 0.2s;
}

.mocha-banner-btn:hover,
.mocha-banner-container:hover .mocha-banner-btn {
  background: #f0f4f8;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

.mocha-banner-btn svg {
  width: 16px;
  height: 16px;
  transition: transform 0.2s;
}

.mocha-banner-container:hover .mocha-banner-btn svg {
  transform: translateX(4px);
}

/* ============================================
   FOOTER SECTION
   ============================================ */
.mocha-footer {
  border-bottom: 1px solid #e2e8f0;
  background: linear-gradient(180deg, #f8fafc 0%, #ffffff 100%);
}

.mocha-footer-container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 40px 16px;
}

@media (min-width: 1024px) {
  .mocha-footer-container {
    padding: 48px 32px;
  }
}

.mocha-footer-title {
  text-align: center;
  margin-bottom: 24px;
}

.mocha-footer-title h3 {
  font-size: 12px;
  font-weight: 600;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin: 0;
}

.mocha-footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

@media (min-width: 480px) {
  .mocha-footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .mocha-footer-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 32px;
  }
}

.mocha-footer-app {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-radius: 12px;
  text-decoration: none;
  transition: all 0.2s ease;
}

.mocha-footer-app:hover {
  background: #ffffff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.mocha-footer-app-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.mocha-footer-app-icon svg {
  width: 20px;
  height: 20px;
}

.mocha-footer-app-info {
  flex: 1;
  min-width: 0;
}

.mocha-footer-app-name {
  display: flex;
  align-items: center;
  gap: 6px;
}

.mocha-footer-app-name span {
  font-weight: 500;
  font-size: 14px;
  color: #334155;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mocha-footer-app:hover .mocha-footer-app-name span {
  color: #1e293b;
}

.mocha-footer-app-name svg {
  width: 12px;
  height: 12px;
  color: #94a3b8;
  opacity: 0;
  transition: opacity 0.2s;
  flex-shrink: 0;
}

.mocha-footer-app:hover .mocha-footer-app-name svg {
  opacity: 1;
}

.mocha-footer-app-tagline {
  font-size: 12px;
  color: #64748b;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-top: 2px;
}

.mocha-footer-btn-container {
  text-align: center;
  margin-top: 24px;
}

.mocha-footer-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 24px;
  font-size: 14px;
  font-weight: 500;
  color: #475569;
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 9999px;
  cursor: pointer;
  transition: all 0.2s;
}

.mocha-footer-btn:hover {
  color: #1e293b;
  background: #f1f5f9;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.mocha-footer-btn svg {
  width: 16px;
  height: 16px;
}

/* ============================================
   UTILITIES
   ============================================ */
.mocha-hidden {
  display: none !important;
}

/* Responsive adjustments */
@media (max-width: 640px) {
  .mocha-popup-header {
    padding: 20px 20px 24px;
  }
  
  .mocha-popup-title {
    font-size: 20px;
  }
  
  .mocha-popup-apps {
    padding: 16px;
  }
  
  .mocha-popup-app {
    padding: 12px;
  }
  
  .mocha-popup-app-icon {
    width: 40px;
    height: 40px;
  }
}