/**
 * OneStepOrder - Trust Badges Styling
 * Styles for trust indicator badges displayed on checkout
 * 
 * @package    WHMCS OneStepOrder Addon
 * @version    1.0.0
 */

/* Trust Badges Container */
.trust-badges-container {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 20px 0;
  padding: 15px;
  background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
  border-radius: 8px;
  border: 1px solid #ddd;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  animation: badgesEnter 0.6s ease-out;
}

@keyframes badgesEnter {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Individual Badge Styling */
.trust-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: white;
  border: 2px solid #e0e0e0;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  color: #333;
  transition: all 0.3s ease;
  cursor: pointer;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

/* Badge Hover State */
.trust-badge:hover {
  border-color: #4CAF50;
  background: #f0f8f0;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(76, 175, 80, 0.15);
}

/* Badge Hover Variant */
.trust-badge.trust-badge-hover {
  border-color: #4CAF50;
  background: #f0f8f0;
}

/* Badge Icon */
.trust-badge-icon {
  font-size: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  animation: iconBounce 0.6s ease-out;
}

@keyframes iconBounce {
  0% {
    transform: scale(0.8) rotate(-5deg);
  }
  50% {
    transform: scale(1.1) rotate(5deg);
  }
  100% {
    transform: scale(1) rotate(0deg);
  }
}

/* Badge Label */
.trust-badge-label {
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* SSL Secure Badge */
.trust-badge-ssl {
  border-color: #2196F3;
  color: #1976D2;
}

.trust-badge-ssl:hover {
  background: #e3f2fd;
  border-color: #1976D2;
}

.trust-badge-ssl .trust-badge-icon {
  color: #1976D2;
}

/* Payment Badge */
.trust-badge-payment {
  border-color: #FF9800;
  color: #E65100;
}

.trust-badge-payment:hover {
  background: #fff3e0;
  border-color: #E65100;
}

.trust-badge-payment .trust-badge-icon {
  color: #E65100;
}

/* Guarantee Badge */
.trust-badge-guarantee {
  border-color: #4CAF50;
  color: #2E7D32;
}

.trust-badge-guarantee:hover {
  background: #e8f5e9;
  border-color: #2E7D32;
}

.trust-badge-guarantee .trust-badge-icon {
  color: #4CAF50;
}

/* Verified Badge */
.trust-badge-verified {
  border-color: #9C27B0;
  color: #6A1B9A;
}

.trust-badge-verified:hover {
  background: #f3e5f5;
  border-color: #6A1B9A;
}

.trust-badge-verified .trust-badge-icon {
  color: #9C27B0;
}

/* Loaded State */
.trust-badges-container.trust-badges-loaded {
  opacity: 1;
}

/* Responsive Design */
@media (max-width: 768px) {
  .trust-badges-container {
    gap: 8px;
    padding: 12px;
    margin: 15px 0;
  }

  .trust-badge {
    padding: 6px 10px;
    font-size: 12px;
  }

  .trust-badge-label {
    display: none;
  }

  .trust-badge {
    justify-content: center;
    width: auto;
  }
}

@media (max-width: 480px) {
  .trust-badges-container {
    flex-direction: row;
    justify-content: space-around;
    gap: 4px;
    padding: 10px;
  }

  .trust-badge {
    flex: 1;
    font-size: 11px;
    padding: 5px 4px;
  }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
  .trust-badges-container {
    background: linear-gradient(135deg, #2a2a2a 0%, #1a1a1a 100%);
    border-color: #444;
  }

  .trust-badge {
    background: #333;
    border-color: #555;
    color: #ddd;
  }

  .trust-badge:hover {
    background: #3a3a3a;
  }

  .trust-badge-ssl:hover {
    background: #1a2a3a;
  }

  .trust-badge-payment:hover {
    background: #3a2a1a;
  }

  .trust-badge-guarantee:hover {
    background: #1a3a1a;
  }

  .trust-badge-verified:hover {
    background: #3a1a3a;
  }
}

/* Accessibility - High Contrast */
@media (prefers-contrast: more) {
  .trust-badge {
    border-width: 3px;
  }

  .trust-badge-icon {
    font-weight: bold;
  }
}

/* Animation for badge entrance */
.trust-badges-container .trust-badge {
  animation: badgeSlideIn 0.5s ease-out forwards;
}

.trust-badges-container .trust-badge:nth-child(1) {
  animation-delay: 0.1s;
}

.trust-badges-container .trust-badge:nth-child(2) {
  animation-delay: 0.2s;
}

.trust-badges-container .trust-badge:nth-child(3) {
  animation-delay: 0.3s;
}

.trust-badges-container .trust-badge:nth-child(4) {
  animation-delay: 0.4s;
}

@keyframes badgeSlideIn {
  from {
    opacity: 0;
    transform: translateX(-20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Print Styles */
@media print {
  .trust-badges-container {
    display: none;
  }
}
