/**
 * CDP Style Casino Card CSS
 * Modern light design with improved first row layout
 */

/* Container - Light Background with adaptive padding */
.cdp-casino-card {
  background: linear-gradient(135deg, 
    rgba(255, 255, 255, 0.98) 0%, 
    rgba(250, 250, 250, 0.98) 50%, 
    rgba(245, 245, 245, 0.98) 100%);
  border: none;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.12);
  position: relative;
  margin: 0 auto 30px;
  padding: 0;
  backdrop-filter: blur(10px);
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

/* Адаптивна ширина залежно від розміру екрану */
@media (max-width: 767px) {
  .cdp-casino-card {
    margin-left: 8px;
    margin-right: 8px;
  }
}

@media (min-width: 768px) {
  .cdp-casino-card {
    margin-left: 12px;
    margin-right: 12px;
  }
}

@media (min-width: 1024px) {
  .cdp-casino-card {
    margin-left: 16px;
    margin-right: 16px;
  }
}

/* Recommended Badge - Enhanced */
.cdp-recommended-badge {
  background: linear-gradient(135deg, #dc3545 0%, #c41e3a 100%);
  color: #fff;
  padding: 12px 28px;
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  box-shadow: 0 4px 15px rgba(220, 53, 69, 0.3);
  position: relative;
}

.cdp-recommended-badge::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(90deg, 
    transparent 0%, 
    rgba(255,255,255,0.1) 50%, 
    transparent 100%);
  animation: shine 3s infinite;
}

@keyframes shine {
  0%, 100% { transform: translateX(-100%); }
  50% { transform: translateX(100%); }
}

/* Header Section - New Layout */
/* ===================================
   HEADER - 2 ROW STRUCTURE (Lines 82-300)
=================================== */
.cdp-header {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 28px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.8) 0%, rgba(245, 245, 245, 0.5) 100%);
  border-bottom: 2px solid rgba(0, 0, 0, 0.06);
  position: relative;
}

/* Row 1: Logo + Description */
.cdp-top-row {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 20px;
  align-items: center;
}

/* Row 2: Bonus */
.cdp-bonus-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 24px;
  align-items: center;
  padding: 20px;
  background: #fff;
  border-radius: 10px;
  border: 1px solid rgba(0, 0, 0, 0.06);
}

@media (max-width: 1024px) {
  .cdp-header {
    padding: 20px;
  }
  
  .cdp-top-row,
  .cdp-bonus-row {
    grid-template-columns: 1fr;
    text-align: center;
  }
}

/* Logo Section */
.cdp-logo-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 16px;
  background: #fff;
  border-radius: 10px;
  border: 1px solid rgba(0, 0, 0, 0.06);
}

.cdp-logo {
  width: 100%;
  height: auto;
  max-width: 120px;
  border-radius: 8px;
  object-fit: contain;
  display: block;
  transition: transform 0.3s ease;
}

.cdp-logo:hover {
  transform: translateY(-2px);
}

.cdp-logo-placeholder {
  width: 100px;
  height: 100px;
  border-radius: 18px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 48px;
  font-weight: 900;
  color: #fff;
  text-transform: uppercase;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

/* Compact Badge */
.compact-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 12px;
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  border-radius: 20px;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.25);
}

.compact-badge svg {
  width: 12px;
  height: 12px;
  flex-shrink: 0;
}

/* Description Box */
.cdp-description-box {
  background: #fff;
  border-radius: 10px;
  padding: 18px;
  border: 1px solid rgba(0, 0, 0, 0.06);
}

.cdp-desc-title {
  display: flex;
  align-items: center;
  font-size: 16px;
  font-weight: 600;
  color: #1a1a1a;
  margin-bottom: 6px;
  line-height: 1.3;
}

.desc-icon {
  display: inline-flex;
  align-items: center;
  margin-right: 6px;
  color: #3b82f6;
}

.desc-icon svg {
  width: 18px;
  height: 18px;
  display: block;
}

.cdp-desc-text {
  font-size: 13px;
  color: #666;
  line-height: 1.6;
}

/* Bonus Section */
.cdp-bonus-section {
  flex: 1;
  text-align: left;
}

.cdp-bonus-amount {
  font-size: 20px;
  font-weight: 800;
  color: #dc2626;
  margin-bottom: 8px;
  line-height: 1.3;
  text-align: left;
}

.cdp-bonus-promo {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, #fef3c7, #fde68a);
  border: 2px dashed #f59e0b;
  border-radius: 8px;
  padding: 8px 12px;
  margin: 8px 0;
  font-weight: 700;
}

.promo-icon {
  font-size: 14px;
}

.promo-code {
  font-size: 13px;
  color: #78350f;
  letter-spacing: 1px;
}

.promo-copy-btn {
  background: #f59e0b;
  color: #fff;
  border: none;
  border-radius: 4px;
  padding: 4px 8px;
  cursor: pointer;
  font-size: 11px;
  font-weight: 700;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}

.promo-copy-btn:hover {
  background: #d97706;
  transform: scale(1.05);
}

.promo-copy-btn svg {
  width: 12px;
  height: 12px;
  flex-shrink: 0;
}

/* Button */
.cdp-btn-primary {
  display: inline-block;
  padding: 12px 28px;
  background: linear-gradient(135deg, #dc3545 0%, #b42828 100%);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  border-radius: 8px;
  text-decoration: none;
  text-align: center;
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
  white-space: nowrap;
  position: relative;
  box-shadow: 0 4px 12px rgba(220, 53, 69, 0.3);
}

.cdp-btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(220, 53, 69, 0.4);
  color: #fff;
}

.cdp-bonus-promo .promo-code {
  font-size: 15px;
  color: #78350f;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.cdp-btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  color: #fff;
  padding: 16px 32px;
  border-radius: 14px;
  font-weight: 700;
  font-size: 16px;
  text-decoration: none;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border: none;
  cursor: pointer;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.3),
              0 0 0 1px rgba(255, 255, 255, 0.1) inset;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  position: relative;
  overflow: hidden;
}

.cdp-btn-primary::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;
}

.cdp-btn-primary:hover::before {
  left: 100%;
}

.cdp-btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 15px 40px rgba(15, 23, 42, 0.45),
              0 0 0 1px rgba(255, 255, 255, 0.15) inset;
  color: #fff;
}

.cdp-btn-primary:active {
  transform: translateY(-1px);
}

/* Ratings Section - Light Design */
.cdp-ratings-section {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  padding: 28px 24px;
  background: linear-gradient(135deg, 
    rgba(255, 255, 255, 0.7) 0%, 
    rgba(248, 250, 252, 0.7) 100%);
  border-top: 2px solid rgba(0, 0, 0, 0.06);
  border-bottom: 2px solid rgba(0, 0, 0, 0.06);
}

@media (max-width: 992px) {
  .cdp-ratings-section {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    padding: 20px 16px;
  }
}

@media (max-width: 480px) {
  .cdp-ratings-section {
    grid-template-columns: 1fr;
    gap: 12px;
    padding: 16px 12px;
  }
}

.cdp-rating-item {
  text-align: center;
  background: #fff;
  border-radius: 16px;
  padding: 24px 18px;
  border: 2px solid rgba(0, 0, 0, 0.06);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  cursor: pointer;
  min-height: 180px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
}

.cdp-rating-item:hover {
  background: #fff;
  border-color: rgba(0, 0, 0, 0.12);
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12);
}

.cdp-rating-label {
  font-size: 13px;
  color: #475569;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.cdp-info-btn {
  width: 20px !important;
  height: 20px !important;
  min-width: 20px !important;
  max-width: 20px !important;
  min-height: 20px !important;
  max-height: 20px !important;
  padding: 0 !important;
  margin: 0 0 0 6px !important;
  background: rgba(15, 23, 42, 0.08) !important;
  color: #64748b !important;
  border-radius: 50% !important;
  font-size: 12px !important;
  font-weight: 700 !important;
  line-height: 20px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  border: 2px solid rgba(15, 23, 42, 0.12) !important;
  cursor: pointer !important;
  transition: all 0.2s ease !important;
  font-style: italic !important;
  flex-shrink: 0 !important;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06) !important;
  text-shadow: none !important;
  text-transform: none !important;
  text-decoration: none !important;
  outline: none !important;
  box-sizing: border-box !important;
  vertical-align: middle !important;
  -webkit-appearance: none !important;
  -moz-appearance: none !important;
  appearance: none !important;
}

.cdp-info-btn:hover,
.cdp-info-btn:focus,
.cdp-info-btn:active {
  background: rgba(15, 23, 42, 0.15) !important;
  color: #0f172a !important;
  border-color: rgba(15, 23, 42, 0.25) !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12) !important;
  outline: none !important;
  transform: scale(1.05) !important;
}

.cdp-info-btn::before,
.cdp-info-btn::after {
  display: none !important;
  content: none !important;
}

/* Index Circle - Redesigned */
.cdp-index-circle {
  width: 80px;
  height: 80px;
  margin: 0 auto 8px;
  position: relative;
}

.cdp-index-circle svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.cdp-circle-bg {
  fill: none;
  stroke: #e5e7eb;
  stroke-width: 6;
}

.cdp-circle-progress {
  fill: none;
  stroke-width: 6;
  stroke-linecap: round;
  transition: stroke-dasharray 1s ease;
}

.cdp-index-circle.green .cdp-circle-progress { stroke: #22c55e; }
.cdp-index-circle.yellow .cdp-circle-progress { stroke: #f59e0b; }
.cdp-index-circle.red .cdp-circle-progress { stroke: #ef4444; }

.cdp-circle-value {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 20px;
  font-weight: 700;
  color: #1e293b;
}

.cdp-circle-value small {
  font-size: 10px;
  color: #64748b;
  font-weight: 400;
}

.cdp-index-status {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.cdp-index-status.green { color: #16a34a; }
.cdp-index-status.yellow { color: #d97706; }
.cdp-index-status.red { color: #dc2626; }

/* PlayScore Badge - Redesigned */
.cdp-playscore-badge {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 72px;
  height: 72px;
  border-radius: 12px;
  margin: 0 auto 8px;
}

.cdp-playscore-badge.green {
  background: linear-gradient(135deg, #22c55e, #16a34a);
  box-shadow: 0 4px 15px rgba(34, 197, 94, 0.3);
}

.cdp-playscore-badge.yellow {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  box-shadow: 0 4px 15px rgba(245, 158, 11, 0.3);
}

.cdp-playscore-badge.red {
  background: linear-gradient(135deg, #ef4444, #dc2626);
  box-shadow: 0 4px 15px rgba(239, 68, 68, 0.3);
}

.cdp-playscore-number {
  font-size: 24px;
  font-weight: 800;
  color: #fff;
  line-height: 1;
}

.cdp-playscore-label {
  font-size: 10px;
  color: rgba(255,255,255,0.7);
  margin-top: 2px;
}

.cdp-playscore-status {
  font-size: 12px;
  font-weight: 600;
  color: #16a34a;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Expert Badge - Redesigned */
.cdp-expert-badge {
  background: #fef9c3;
  border: 2px solid #f59e0b;
  width: 72px;
  height: 72px;
  border-radius: 12px;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin: 0 auto 8px;
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.2);
}

.cdp-expert-number {
  font-size: 24px;
  font-weight: 800;
  color: #d97706;
  line-height: 1;
}

.cdp-expert-label {
  font-size: 10px;
  color: #92400e;
  margin-top: 2px;
}

.cdp-expert-status {
  font-size: 12px;
  font-weight: 600;
  color: #d97706;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* RTP Badge - Redesigned */
.cdp-rtp-badge {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.2), rgba(59, 130, 246, 0.1));
  border: 1px solid rgba(59, 130, 246, 0.3);
  width: 90px;
  height: 50px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin: 10px auto 8px;
}

.cdp-rtp-icon {
  font-size: 18px;
  color: #fbbf24;
}

.cdp-rtp-value {
  font-size: 20px;
  font-weight: 700;
  color: #1e40af;
}

.cdp-rtp-status {
  font-size: 12px;
  font-weight: 600;
  color: #1e40af;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Info Section */
.cdp-info-section {
  padding: 24px;
  border-bottom: 1px solid #e5e7eb;
}

.cdp-info-title {
  font-size: 16px;
  font-weight: 700;
  color: #1e293b;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.cdp-info-title::after {
  content: '';
  flex: 1;
  height: 1px;
  background: #e5e7eb;
}

.cdp-info-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

@media (max-width: 992px) {
  .cdp-info-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .cdp-info-grid {
    grid-template-columns: 1fr;
  }
}

.cdp-info-card {
  background: #f8fafc;
  border-radius: 12px;
  padding: 16px;
  display: flex;
  gap: 12px;
  align-items: center;
}

.cdp-info-icon {
  font-size: 24px;
  flex-shrink: 0;
}

.cdp-info-content {
  min-width: 0;
}

.cdp-info-label {
  font-size: 12px;
  color: #94a3b8;
  margin-bottom: 4px;
}

.cdp-info-value {
  font-size: 14px;
  font-weight: 600;
  color: #1e293b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cdp-info-value.cdp-link {
  color: #3b82f6;
}

/* Games Section */
.cdp-games-section {
  padding: 24px;
  border-bottom: 1px solid #e5e7eb;
}

.cdp-games-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 20px;
}

@media (max-width: 768px) {
  .cdp-games-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.cdp-game-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  background: #f8fafc;
  border-radius: 12px;
}

.cdp-game-icon {
  font-size: 28px;
}

.cdp-game-info {
  min-width: 0;
}

.cdp-game-name {
  font-size: 12px;
  color: #64748b;
  margin-bottom: 2px;
}

.cdp-game-count {
  font-size: 18px;
  font-weight: 700;
  color: #1e293b;
}

/* Tags */
.cdp-tags-section {
  margin-top: 16px;
}

.cdp-tags-title {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: #1e293b;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 2px solid #dc3545;
}

.cdp-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.cdp-tag {
  display: inline-block;
  padding: 6px 14px;
  background: #e9ecef;
  color: #495057;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
}

/* Metrics Section */
.cdp-metrics-section {
  padding: 30px 24px;
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
}

.cdp-metrics-title {
  font-size: 18px;
  font-weight: 700;
  color: #1e293b;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.cdp-metrics-title span {
  font-size: 22px;
}

.cdp-metrics-title::after {
  content: '';
  flex: 1;
  height: 1px;
  background: #e2e8f0;
}

.cdp-metrics-grid {
  display: grid !important;
  grid-template-columns: repeat(3, 1fr) !important;
  gap: 16px;
}

@media (max-width: 992px) {
  .cdp-metrics-grid {
    grid-template-columns: repeat(2, 1fr) !important;
  }
}

@media (max-width: 768px) {
  .cdp-metrics-grid {
    grid-template-columns: 1fr !important;
  }
}

.cdp-metric-item {
  background: #fff;
  border-radius: 16px;
  padding: 20px;
  padding-right: 48px;
  display: flex;
  gap: 16px;
  align-items: center;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  border: 1px solid #e2e8f0;
  transition: all 0.3s;
  position: relative;
}

/* Info button in metric items - top right corner */
.cdp-metric-item > .cdp-metric-content .cdp-info-btn,
.cdp-metric-item .cdp-metric-label .cdp-info-btn {
  position: absolute !important;
  top: 10px !important;
  right: 10px !important;
  margin: 0 !important;
}

.cdp-metric-item:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.1);
}

.cdp-metric-icon {
  width: 50px;
  height: 50px;
  background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  flex-shrink: 0;
}

.cdp-metric-circular {
  width: 70px;
  height: 70px;
  position: relative;
  flex-shrink: 0;
}

.cdp-metric-circular svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.cdp-metric-circular .cdp-circle-bg {
  fill: none;
  stroke: #e5e7eb;
  stroke-width: 8;
}

.cdp-metric-circular .cdp-circle-progress {
  fill: none;
  stroke-width: 8;
  stroke-linecap: round;
}

.cdp-metric-circular.green .cdp-circle-progress { stroke: #22c55e; }
.cdp-metric-circular.blue .cdp-circle-progress { stroke: #3b82f6; }
.cdp-metric-circular.purple .cdp-circle-progress { stroke: #8b5cf6; }
.cdp-metric-circular.orange .cdp-circle-progress { stroke: #f59e0b; }
.cdp-metric-circular.red .cdp-circle-progress { stroke: #ef4444; }
.cdp-metric-circular.cyan .cdp-circle-progress { stroke: #06b6d4; }
.cdp-metric-circular.teal .cdp-circle-progress { stroke: #14b8a6; }
.cdp-metric-circular.pink .cdp-circle-progress { stroke: #ec4899; }
.cdp-metric-circular.emerald .cdp-circle-progress { stroke: #10b981; }
.cdp-metric-circular.gold .cdp-circle-progress { stroke: #eab308; }

/* Metric Status */
.cdp-metric-status {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Tooltip Styles */
.cdp-has-tooltip {
  position: relative;
  cursor: pointer;
}

/* Hide inline tooltip always - portal system handles display */
.cdp-metric-tooltip {
  display: none !important;
}

/* Arrow indicator removed - portal handles this */
.cdp-metric-tooltip::after {
  display: none !important;
}

/* Remove old hover/active show rules */
.cdp-has-tooltip:hover .cdp-metric-tooltip,
.cdp-has-tooltip.active .cdp-metric-tooltip {
  display: none !important;
}

/* Tooltip DOWN for rating items - not needed with portal */
.cdp-rating-item.cdp-has-tooltip .cdp-metric-tooltip {
  display: none !important;
}

.cdp-rating-item.cdp-has-tooltip .cdp-metric-tooltip::after {
  display: none !important;
}

/* ==========================================
   PORTAL TOOLTIP (body-level)
   ========================================== */

/* Backdrop overlay */
.cdp-tooltip-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.3);
  z-index: 99998;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease;
}
.cdp-tooltip-overlay.active {
  opacity: 1;
  visibility: visible;
}

/* Portal container */
.cdp-tooltip-portal {
  position: fixed;
  z-index: 99999;
  background: #fff;
  color: #1e293b;
  border-radius: 16px;
  padding: 20px;
  width: 320px;
  max-width: calc(100vw - 40px);
  box-shadow: 0 10px 40px rgba(0,0,0,0.18), 0 2px 8px rgba(0,0,0,0.08);
  border: 1px solid #e2e8f0;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, transform 0.2s ease;
  transform: translateY(8px);
  max-height: calc(100vh - 40px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}
.cdp-tooltip-portal.active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* Portal arrow */
.cdp-tooltip-portal-arrow {
  position: absolute;
  width: 20px;
  height: 10px;
  overflow: hidden;
  pointer-events: none;
}
.cdp-tooltip-portal-arrow::after {
  content: '';
  position: absolute;
  width: 14px;
  height: 14px;
  background: #fff;
  border: 1px solid #e2e8f0;
  transform: rotate(45deg);
}
/* Arrow pointing down (tooltip above button) */
.cdp-tooltip-portal-arrow.arrow-down {
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
}
.cdp-tooltip-portal-arrow.arrow-down::after {
  top: -8px;
  left: 3px;
  border-top: none;
  border-left: none;
}
/* Arrow pointing up (tooltip below button) */
.cdp-tooltip-portal-arrow.arrow-up {
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
}
.cdp-tooltip-portal-arrow.arrow-up::after {
  bottom: -8px;
  left: 3px;
  border-bottom: none;
  border-right: none;
}

/* Mobile: bottom sheet style */
@media (max-width: 768px) {
  .cdp-tooltip-portal {
    width: auto;
    max-width: none;
    left: 12px !important;
    right: 12px !important;
    bottom: 12px !important;
    top: auto !important;
    border-radius: 16px;
    transform: translateY(20px);
    max-height: 70vh;
  }
  .cdp-tooltip-portal.active {
    transform: translateY(0);
  }
  .cdp-tooltip-portal-arrow {
    display: none;
  }
  
  /* Close button for mobile */
  .cdp-tooltip-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #f1f5f9;
    border: none;
    font-size: 18px;
    line-height: 28px;
    text-align: center;
    color: #64748b;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  .cdp-tooltip-close:hover {
    background: #e2e8f0;
  }
}

@media (min-width: 769px) {
  .cdp-tooltip-close {
    display: none;
  }
  .cdp-tooltip-overlay {
    display: none !important;
  }
}

.cdp-tooltip-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid #e2e8f0;
}

.cdp-tooltip-icon {
  font-size: 24px;
}

.cdp-tooltip-title {
  font-size: 16px;
  font-weight: 700;
  color: #1e293b;
}

.cdp-tooltip-desc {
  font-size: 14px;
  color: #64748b;
  line-height: 1.6;
  margin-bottom: 16px;
}

.cdp-tooltip-desc strong {
  color: #1e293b;
  font-weight: 600;
}

.cdp-tooltip-scale-title {
  font-size: 12px;
  font-weight: 700;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 10px;
}

.cdp-tooltip-scale {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.cdp-tooltip-scale-row {
  display: flex;
  align-items: center;
  padding: 10px 14px;
  border-radius: 8px;
  border: 1px solid;
}

.cdp-tooltip-scale-row.excellent {
  background: #dcfce7;
  border-color: #86efac;
}

.cdp-tooltip-scale-row.good {
  background: #fef9c3;
  border-color: #fde047;
}

.cdp-tooltip-scale-row.average {
  background: #fed7aa;
  border-color: #fdba74;
}

.cdp-tooltip-scale-row.low {
  background: #fecaca;
  border-color: #fca5a5;
}

.cdp-tooltip-scale-row.critical {
  background: #fecaca;
  border-color: #f87171;
}

.cdp-tooltip-scale-value {
  font-size: 14px;
  font-weight: 700;
  color: #1e293b;
  min-width: 70px;
}

.cdp-tooltip-scale-label {
  font-size: 14px;
  font-weight: 500;
  color: #374151;
  margin-left: auto;
}

.cdp-tooltip-current {
  margin-top: 14px;
  padding: 12px;
  background: #f1f5f9;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.cdp-tooltip-current-label {
  font-size: 13px;
  color: #64748b;
}

.cdp-tooltip-current-value {
  font-size: 16px;
  font-weight: 700;
}

.cdp-tooltip-footer {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid #e2e8f0;
  font-size: 12px;
  color: #94a3b8;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Mobile Tooltip - handled by portal system in JS */

.cdp-circular-value {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 14px;
  font-weight: 800;
  color: #1e293b;
}

.cdp-metric-content {
  flex: 1;
  min-width: 0;
  overflow: hidden;
}

.cdp-metric-label {
  font-size: 14px;
  font-weight: 600;
  color: #475569;
  margin-bottom: 6px;
  word-break: break-word;
  overflow-wrap: break-word;
}

.cdp-metric-values {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.cdp-metric-tag {
  display: inline-block;
  padding: 4px 10px;
  background: #f1f5f9;
  color: #475569;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
}

/* Dark Theme Support */
@media (prefers-color-scheme: dark) {
  .cdp-casino-card {
    background: #1e1e2e;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
  }
  
  .cdp-header,
  .cdp-info-section,
  .cdp-games-section {
    border-color: #374151;
  }
  
  .cdp-description-box,
  .cdp-info-card,
  .cdp-game-item {
    background: #2d2d44;
  }
  
  .cdp-desc-header,
  .cdp-info-value,
  .cdp-game-count,
  .cdp-circle-value,
  .cdp-circular-value {
    color: #f1f5f9;
  }
  
  .cdp-desc-text,
  .cdp-info-label,
  .cdp-game-name,
  .cdp-rating-label {
    color: #94a3b8;
  }
  
  .cdp-ratings-section,
  .cdp-metrics-section {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
  }
  
  .cdp-metric-item {
    background: #2d2d44;
    border-color: #374151;
  }
  
  .cdp-expert-badge {
    background: #2d2d44;
    border-color: #374151;
  }
  
  .cdp-rtp-badge {
    background: rgba(59, 130, 246, 0.1);
  }
  
  .cdp-tag {
    background: #374151;
    color: #e5e7eb;
  }
  
  .cdp-metric-tag {
    background: #374151;
    color: #e5e7eb;
  }
  
  .cdp-circle-bg {
    stroke: #374151;
  }
  
  .cdp-info-title,
  .cdp-metrics-title,
  .cdp-tags-title,
  .cdp-metric-label {
    color: #f1f5f9;
  }
}

/* Ratings Tooltip */
.cdp-rating-item .cdp-metric-tooltip {
  bottom: calc(100% + 15px);
}

/* Payment Methods Section - Redesigned */
.cdp-payments-section {
  padding: 20px 24px;
  border-bottom: 1px solid #e5e7eb;
}

.cdp-payments-title {
  font-size: 15px;
  font-weight: 700;
  color: #1e293b;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.cdp-payments-title span {
  font-size: 18px;
}

.cdp-payments-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.cdp-payment-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  background: #f8fafc;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  transition: all 0.2s;
}

.cdp-payment-item:hover {
  background: #f1f5f9;
  border-color: #cbd5e1;
  transform: translateY(-1px);
}

.cdp-payment-logo {
  width: 28px;
  height: 20px;
  object-fit: contain;
}

.cdp-payment-name {
  font-size: 13px;
  font-weight: 500;
  color: #475569;
}

/* Withdrawal Methods */
.cdp-withdrawals-section {
  padding: 20px 24px;
  border-bottom: 1px solid #e5e7eb;
}

.cdp-withdrawals-title {
  font-size: 15px;
  font-weight: 700;
  color: #1e293b;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.cdp-withdrawals-title span {
  font-size: 18px;
}

@media (max-width: 768px) {
  .cdp-payments-section,
  .cdp-withdrawals-section {
    padding: 16px;
  }
  
  .cdp-payment-item {
    padding: 6px 10px;
  }
  
  .cdp-payment-logo {
    width: 24px;
    height: 16px;
  }
  
  .cdp-payment-name {
    font-size: 12px;
  }
}
