/* ============================================
   SWIPEABLE CARDS - Premium Trading Card Design
   ============================================ */

/* Card Container - Fixed sizing matching Actions view */
.swipeable-card {
  position: relative;
  /* Width and height come from cards-unified.css canonical sizes */
  margin: 0 auto;
  user-select: none;
  -webkit-user-select: none;
  touch-action: none;
  cursor: grab;
  will-change: transform;
  flex-shrink: 0;
}

.swipeable-card.dragging {
  cursor: grabbing;
}

/* Card Inner */
.card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  padding: 28px;
  display: flex;
  flex-direction: column;
  background: transparent; /* Transparent by default - priority gradients applied elsewhere */
  border-radius: 20px;
  box-shadow: none; /* No shadow - card should be solid */
  overflow: hidden;
  color: #2C3E50; /* Default dark grey text for white background */
}

/* Gold Card for High Priority */
.swipeable-card.gold-card .card-inner {
  background: linear-gradient(135deg,
    #D9A621 0%,
    #FFD700 25%,
    #D9A621 50%,
    #B87A0A 100%
  );
  color: white !important; /* White text on gold background */
}

/* Urgent Priority (Red) - Red gradient background */
.swipeable-card.urgent .card-inner {
  background: linear-gradient(135deg,
    #E66152 0%,
    #FF6F61 25%,
    #F26859 50%,
    #D9594A 100%
  );
  color: white !important; /* White text on red background */
}

/* Medium Priority (Green) - Green gradient background */
.swipeable-card.medium .card-inner {
  background: linear-gradient(135deg,
    #3DB063 0%,
    #50C878 25%,
    #47BD6E 50%,
    #33A358 100%
  );
  color: white !important; /* White text on green background */
}

/* Holographic Border - DISABLED for solid card look */
.swipeable-card::before {
  content: none; /* Disabled */
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  border-radius: 20px;
  padding: 0; /* No padding/border */
  background: none; /* No border gradient */
  /* background: linear-gradient(
    135deg,
    rgba(245, 242, 237, 0.4),
    rgba(255, 20, 204, 0.3),
    rgba(212, 167, 106, 0.5),
    rgba(237, 233, 223, 0.6),
    rgba(255, 20, 204, 0.3),
    rgba(245, 242, 237, 0.4)
  );
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0.2;
  pointer-events: none;
}

.swipeable-card.dragging::before {
  opacity: 0.6;
}

/* Shimmer Overlay */
.shimmer-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(245, 242, 237, 0.15),
    rgba(212, 167, 106, 0.1),
    rgba(245, 242, 237, 0.15),
    transparent
  );
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.shimmer-overlay.active {
  opacity: 1;
  animation: shimmerSweep 1.5s ease-in-out;
}

@keyframes shimmerSweep {
  from { transform: translateX(-100%); }
  to { transform: translateX(100%); }
}

/* Card Header */
.card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 16px;
}

.category-badge {
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.5px;
  color: white;
  background: linear-gradient(135deg, #737376, #8C8C8E);
  padding: 6px 12px;
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(115, 115, 118, 0.3);
}

.priority-badge {
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.5px;
  padding: 6px 12px;
  border-radius: 12px;
}

.priority-badge span {
  color: white;
}

/* Embossed Text Effect for Gold Cards */
.embossed {
  text-shadow: 
    1px 1px 0 rgba(0, 0, 0, 0.4),
    -1px -1px 0 rgba(255, 255, 255, 0.7);
  color: rgba(255, 255, 255, 0.95) !important;
}

/* Savings Display */
.savings-display {
  text-align: right;
  margin-bottom: 16px;
}

.savings-label {
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 1.2px;
  color: var(--brokerly-text-secondary);
  margin-bottom: 4px;
}

.gold-card .savings-label {
  color: rgba(255, 255, 255, 0.8);
}

.savings-amount {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  font-size: 28px;
  font-weight: 900;
  color: #50C878;
}

.gold-card .savings-amount {
  color: rgba(255, 255, 255, 0.95);
  text-shadow: 
    1px 1px 0 rgba(0, 0, 0, 0.4),
    -1px -1px 0 rgba(255, 255, 255, 0.8);
}

.savings-amount .currency {
  font-size: 0.8em;
}

/* Sparkles */
.sparkles {
  position: relative;
  display: flex;
  align-items: center;
  gap: 4px;
}

.sparkle-main {
  animation: sparkleRotate 2s ease-in-out infinite;
}

.sparkle-accent {
  position: absolute;
  right: -8px;
  top: -8px;
  animation: sparkleFloat 1.5s ease-in-out infinite;
}

@keyframes sparkleRotate {
  0%, 100% { transform: rotate(0deg) scale(1); }
  50% { transform: rotate(15deg) scale(1.3); }
}

@keyframes sparkleFloat {
  0%, 100% { transform: translate(0, 0) scale(0.8); opacity: 0.6; }
  50% { transform: translate(2px, -2px) scale(1.2); opacity: 1; }
}

/* Card Divider */
.card-divider {
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(0, 0, 0, 0.1) 10%,
    rgba(0, 0, 0, 0.15) 50%,
    rgba(0, 0, 0, 0.1) 90%,
    transparent
  );
  margin: 12px 0;
}

.gold-card .card-divider {
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.3) 10%,
    rgba(255, 255, 255, 0.4) 50%,
    rgba(255, 255, 255, 0.3) 90%,
    transparent
  );
}

/* Card Title */
.card-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--brokerly-text-primary);
  margin: 12px 0;
  line-height: 1.3;
}

.gold-card .card-title {
  color: rgba(255, 255, 255, 0.95);
}

/* Description Section */
.card-description-section {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.card-description {
  font-size: 15px;
  font-weight: 500;
  color: rgba(0, 0, 0, 0.75);
  line-height: 1.5;
}

.gold-card .card-description {
  color: rgba(255, 255, 255, 0.85);
}

.time-to-complete {
  text-align: right;
}

.time-label {
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 1.0px;
  color: var(--brokerly-text-secondary);
  margin-bottom: 2px;
}

.gold-card .time-label {
  color: rgba(255, 255, 255, 0.8);
}

.time-value {
  font-size: 14px;
  font-weight: 700;
  color: var(--brokerly-text-primary);
}

.gold-card .time-value {
  color: rgba(255, 255, 255, 0.95);
}

.card-spacer {
  flex: 1;
}

/* Swipe Instructions */
.swipe-instructions {
  margin-top: auto;
}

.swipe-label {
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 2.0px;
  color: var(--brokerly-text-secondary);
  text-align: center;
  margin: 12px 0;
}

.gold-card .swipe-label {
  color: rgba(255, 255, 255, 0.8);
}

.swipe-indicators {
  display: flex;
  justify-content: space-around;
  gap: 60px;
}

.swipe-indicator {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  transition: all 0.2s ease;
}

.indicator-icon {
  transition: transform 0.2s ease;
}

.indicator-label {
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 1.0px;
  transition: opacity 0.2s ease;
}

.swipe-indicator.reject .indicator-label {
  color: #FF6F61;
}

.swipe-indicator.accept .indicator-label {
  color: #50C878;
}

.gold-card .swipe-indicator.reject .indicator-label,
.gold-card .swipe-indicator.accept .indicator-label {
  color: rgba(255, 255, 255, 0.95);
  text-shadow: 
    1px 1px 0 rgba(0, 0, 0, 0.4),
    -1px -1px 0 rgba(255, 255, 255, 0.7);
}

/* Card Stack Effect */
.card-stack {
  position: relative;
  width: 100%;
  min-height: 500px;
}

.swipeable-card.stacked {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
}

.swipeable-card.stacked-1 {
  z-index: 2;
  transform: translateX(-50%) translateY(18px) scale(0.92);
  opacity: 0.85;
}

.swipeable-card.stacked-2 {
  z-index: 1;
  transform: translateX(-50%) translateY(36px) scale(0.84);
  opacity: 0.65;
}

/* ============================================
   PRIORITY-SPECIFIC TEXT COLORS
   ============================================ */

/* Urgent Priority (Red) - White text */
.swipeable-card.urgent .card-title,
.swipeable-card.urgent .card-description,
.swipeable-card.urgent .savings-label,
.swipeable-card.urgent .time-label,
.swipeable-card.urgent .time-value {
  color: white !important;
}

.swipeable-card.urgent .savings-amount {
  color: white !important;
  text-shadow: 
    1px 1px 0 rgba(0, 0, 0, 0.4),
    -1px -1px 0 rgba(255, 255, 255, 0.8);
}

/* High Priority (Gold) - White text (already handled by .gold-card) */

/* Medium Priority (Green) - White text */
.swipeable-card.medium .card-title,
.swipeable-card.medium .card-description,
.swipeable-card.medium .savings-label,
.swipeable-card.medium .time-label,
.swipeable-card.medium .time-value {
  color: white !important;
}

.swipeable-card.medium .savings-amount {
  color: white !important;
  text-shadow: 
    1px 1px 0 rgba(0, 0, 0, 0.4),
    -1px -1px 0 rgba(255, 255, 255, 0.8);
}

/* MediumLow Priority (Blue) - Blue gradient with white text */
.swipeable-card.mediumLow .card-inner {
  background: linear-gradient(135deg,
    #0099D8 0%,
    #00B4D8 25%,
    #00A8CC 50%,
    #0088BB 100%
  ) !important;
  color: white !important;
}

.swipeable-card.mediumLow .card-title,
.swipeable-card.mediumLow .card-description,
.swipeable-card.mediumLow .savings-label,
.swipeable-card.mediumLow .time-label,
.swipeable-card.mediumLow .time-value {
  color: white !important;
}

.swipeable-card.mediumLow .savings-amount {
  color: white !important;
  text-shadow: 
    1px 1px 0 rgba(0, 0, 0, 0.4),
    -1px -1px 0 rgba(255, 255, 255, 0.8);
}

/* Low Priority (White) - Dark grey text */
.swipeable-card.low .card-inner {
  color: #2C3E50 !important;
}

.swipeable-card.low .card-title {
  color: #2C3E50 !important;
}

.swipeable-card.low .card-description {
  color: #445566 !important;
}

.swipeable-card.low .savings-label {
  color: #5A6C7D !important;
}

.swipeable-card.low .savings-amount {
  color: #50C878 !important;
}

.swipeable-card.low .time-label {
  color: #5A6C7D !important;
}

.swipeable-card.low .time-value {
  color: #2C3E50 !important;
}

.swipeable-card.low .priority-badge,
.swipeable-card.low .priority-badge span {
  color: #2C3E50 !important;
}

/* Category badge stays white on grey background */
.swipeable-card.low .category-badge {
  color: white !important;
  background: linear-gradient(135deg, #5A6C7D, #738491) !important;
}

/* Responsive */
@media (max-width: 768px) {
  /* Card size comes from cards-unified.css - no override needed */

  .card-inner {
    padding: 20px;
  }

  .card-title {
    font-size: 20px;
  }

  .card-description {
    font-size: 14px;
  }
}

