/**
 * RTG Digital - Visual Enhancements
 * Additional polish and modern design improvements
 */

/* ===== LOADING STATES ===== */
.loading {
  position: relative;
  pointer-events: none;
  opacity: 0.6;
}

.loading::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 20px;
  margin: -10px 0 0 -10px;
  border: 2px solid var(--rtg-red);
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ===== FOCUS STATES (Accessibility) ===== */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--rtg-red);
  outline-offset: 2px;
}

/* ===== IMPROVED SCROLLBAR ===== */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: var(--rtg-light);
}

::-webkit-scrollbar-thumb {
  background: var(--rtg-muted);
  border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--rtg-red);
}

/* ===== SKELETON LOADING ===== */
.skeleton {
  background: linear-gradient(
    90deg,
    var(--rtg-light) 0%,
    #e8e8e8 50%,
    var(--rtg-light) 100%
  );
  background-size: 200% 100%;
  animation: skeleton-loading 1.5s ease-in-out infinite;
}

@keyframes skeleton-loading {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ===== TOOLTIP ===== */
[data-tooltip] {
  position: relative;
  cursor: help;
}

[data-tooltip]::before {
  content: attr(data-tooltip);
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(-8px);
  padding: 6px 12px;
  background: var(--rtg-ink);
  color: var(--rtg-white);
  font-size: 12px;
  white-space: nowrap;
  border-radius: var(--rtg-radius);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s, transform 0.3s;
  z-index: 1000;
}

[data-tooltip]:hover::before {
  opacity: 1;
  transform: translateX(-50%) translateY(-4px);
}

/* ===== BADGE ENHANCEMENTS ===== */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  font-size: 10px;
  font-weight: 700;
  border-radius: 12px;
  background: var(--rtg-light);
  color: var(--rtg-mid);
}

.badge.new {
  background: var(--rtg-red);
  color: var(--rtg-white);
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

/* ===== IMPROVED FORM ELEMENTS ===== */
input[type="text"],
input[type="email"],
input[type="search"],
input[type="tel"],
input[type="url"],
textarea {
  appearance: none;
  -webkit-appearance: none;
  border: 1.5px solid var(--rtg-border);
  border-radius: var(--rtg-radius);
  padding: 10px 14px;
  font-size: 14px;
  transition: var(--rtg-transition);
  background: var(--rtg-white);
}

input:hover,
textarea:hover {
  border-color: var(--rtg-muted);
}

input:focus,
textarea:focus {
  border-color: var(--rtg-red);
  box-shadow: 0 0 0 3px rgba(212, 43, 43, 0.1);
}

/* ===== CARD SHINE EFFECT ===== */
.card-shine {
  position: relative;
  overflow: hidden;
}

.card-shine::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.3),
    transparent
  );
  transition: left 0.5s;
}

.card-shine:hover::before {
  left: 100%;
}

/* ===== IMPROVED SOCIAL STATS ===== */
.social-stat-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 18px 12px;
  border: 1.5px solid var(--rtg-border);
  border-radius: var(--rtg-radius);
  transition: var(--rtg-transition);
  cursor: pointer;
  text-align: center;
  background: var(--rtg-white);
}

.social-stat-card:hover {
  border-color: currentColor;
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.social-stat-card.fb { color: #1877F2; }
.social-stat-card.tw { color: #1DA1F2; }
.social-stat-card.yt { color: #FF0000; }
.social-stat-card.ig { color: #C13584; }

.social-stat-card svg {
  width: 24px;
  height: 24px;
  fill: currentColor;
  margin-bottom: 8px;
  transition: transform 0.3s;
}

.social-stat-card:hover svg {
  transform: scale(1.15);
}

.social-stat-count {
  font-family: var(--rtg-font-cond);
  font-size: 20px;
  font-weight: 800;
  color: var(--rtg-ink);
  line-height: 1;
}

.social-stat-label {
  font-size: 10px;
  color: var(--rtg-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-top: 4px;
}

/* ===== IMPROVED WEATHER WIDGET ===== */
.weather-widget {
  background: linear-gradient(135deg, var(--rtg-ink) 0%, #1a2332 100%);
  padding: 24px;
  color: var(--rtg-white);
  border-radius: var(--rtg-radius);
  box-shadow: var(--rtg-shadow-md);
}

.weather-widget h3 {
  font-family: var(--rtg-font-cond);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.6);
  margin-bottom: 16px;
}

.weather-main {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 16px;
}

.weather-icon {
  font-size: 48px;
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.3));
}

.weather-temp {
  font-family: var(--rtg-font-cond);
  font-size: 48px;
  font-weight: 800;
  line-height: 1;
}

.weather-temp span {
  font-size: 24px;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.6);
}

.weather-city {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.6);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 4px;
}

.weather-desc {
  font-size: 15px;
  font-weight: 500;
}

.weather-days {
  display: flex;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  padding-top: 16px;
  justify-content: space-between;
  gap: 8px;
}

.weather-day {
  text-align: center;
  flex: 1;
  padding: 8px 4px;
  border-radius: var(--rtg-radius);
  transition: var(--rtg-transition);
}

.weather-day:hover {
  background: rgba(255, 255, 255, 0.08);
}

.weather-day-name {
  font-size: 10px;
  color: rgba(255, 255, 255, 0.5);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 6px;
}

.weather-day-icon {
  font-size: 18px;
  margin-bottom: 4px;
}

.weather-day-temp {
  font-size: 13px;
  font-weight: 600;
}

/* ===== PRINT STYLES ===== */
@media print {
  #rtg-radio-bar,
  #rtg-top-bar,
  #rtg-nav,
  #rtg-ticker,
  .sidebar,
  #rtg-footer,
  #rtg-back-top,
  .share-btn,
  .newsletter-widget {
    display: none !important;
  }

  body {
    background: white;
    color: black;
  }

  a {
    color: black;
    text-decoration: underline;
  }

  .post-content {
    font-size: 12pt;
    line-height: 1.6;
  }
}

/* ===== DARK MODE SUPPORT (Optional) ===== */
@media (prefers-color-scheme: dark) {
  /* Add dark mode styles if needed */
}

/* ===== REDUCED MOTION ===== */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ===== HIGH CONTRAST MODE ===== */
@media (prefers-contrast: high) {
  .rtg-tag,
  .btn-nav,
  .btn-play {
    border: 2px solid currentColor;
  }
}
