/* Respect WP admin .widefat striped but soften zebra */
#cf-filter-results table.widefat.striped tbody tr:nth-child(odd) {
  background: #f8fff3;
}
/* Farm Dashboard Container */
.cf-dashboard {
  background: #fefefc;
  border: 2px solid #80bb01;
  border-radius: 14px;
  padding: 30px;
  box-shadow: 0 6px 20px rgba(128, 187, 1, 0.15);
  font-family: 'Poppins', sans-serif;
  margin-bottom: 40px;
}

/* Headings */
.cf-dashboard h2 {
  font-size: 26px;
  font-weight: 700;
  color: #80bb01;
  margin-bottom: 20px;
}

.cf-dashboard h3 {
  font-size: 20px;
  font-weight: 600;
  color: #6aa300;
  margin-top: 30px;
  margin-bottom: 12px;
  border-bottom: 2px solid #80bb01;
  display: inline-block;
  padding-bottom: 4px;
}

/* Wallet Box */
.cf-wallet {
  background: #f8fff0;
  border: 1.5px solid #80bb01;
  border-radius: 8px;
  padding: 12px 16px;
  font-weight: 600;
  color: #333;
  margin-bottom: 20px;
}

/* Farm Info */
.cf-dashboard p {
  font-size: 16px;
  color: #444;
  margin-bottom: 10px;
}

/* Table Wrapper */
.cf-table-wrapper {
  overflow-x: auto;
  margin-top: 10px;
}

/* Table Styling */
.cf-table-wrapper table.widefat {
  width: 100%;
  border: 1.5px solid #80bb01;
  border-radius: 10px;
  background: #ffffff;
  font-size: 15px;
}

.cf-table-wrapper table.widefat thead th {
  background: #80bb01;
  color: #fff;
  font-weight: 600;
  text-align: center;
  padding: 10px;
}

.cf-table-wrapper table.widefat tbody td {
  text-align: center;
  padding: 10px;
  border-top: 1px solid #eef5e6;
}

.cf-table-wrapper table.widefat.striped tbody tr:nth-child(odd) {
  background: #f8fff3;
}

/* Download Report Button */
.cf-download-report {
  margin-top: 20px;
}

.cf-btn.cf-btn-secondary {
  display: inline-block;
  background: #80bb01;
  color: #fff;
  padding: 10px 20px;
  border-radius: 8px;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.3s ease;
}

.cf-btn.cf-btn-secondary:hover {
  background: #6aa300;
}

/* Farm Updates Card */
.cf-card {
  background: #fefefc;
  border: 1.5px solid #80bb01;
  border-radius: 10px;
  padding: 16px;
  margin-top: 10px;
  font-size: 15px;
  color: #555;
}

/* Cancel Membership Button */
.cf-dashboard form input.button-secondary {
  background: #f44336;
  color: #fff;
  border: none;
  padding: 10px 20px;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.3s ease;
}

.cf-dashboard form input.button-secondary:hover {
  background: #d32f2f;
}

/* Social Share Section */
.sd-title {
  font-size: 16px;
  font-weight: 600;
  color: #80bb01;
  margin-top: 30px;
}

.sd-social-icon li a {
  background: #f8fff0;
  border: 1px solid #80bb01;
  border-radius: 6px;
  padding: 6px 12px;
  margin-right: 8px;
  font-size: 14px;
  color: #333;
  transition: background 0.3s ease;
}

.sd-social-icon li a:hover {
  background: #e6f5c2;
}
.subscribe-link {
  color: #5a7d00;
  font-weight: 600;
  text-decoration: underline;
}
.subscribe-link:hover {
  color: #80bb01;
  text-decoration: none;
}
/* Container spacing and text */
.cf-freshness {
  margin: 6px 0 0;
  font-size: 12px;
  color: #58606e;
}

/* Bar wrapper */
.cf-freshness-bar {
  margin: 8px 0 4px;
}

.cf-freshness-bar__track {
  width: 100%;
  height: 10px;
  background: #e9edf3;
  border-radius: 6px;
  overflow: hidden;
  position: relative;
}

/* Fill with gradient and smooth transition */
.cf-freshness-bar__fill {
  height: 100%;
  width: 0%; /* set via inline style or JS/PHP */
  /* Base gradient: green → yellow → orange → red */
  background: linear-gradient(90deg, #34c759 0%, #a0e84f 35%, #ffd54f 60%, #ff9800 78%, #ff5252 100%);
  border-radius: 6px; /* keeps ends rounded when near 100% */
  transition: width 400ms ease-in-out;
  position: relative;
}

/* Glossy overlay for subtle depth */
.cf-freshness-bar__fill::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(255,255,255,0.35), rgba(255,255,255,0));
  pointer-events: none;
}

/* Edge shimmer pulse near the current fill end */
.cf-freshness-bar__fill::after {
  content: "";
  position: absolute;
  top: 0;
  right: -12px; /* sits slightly ahead of the fill edge */
  width: 24px;
  height: 100%;
  background: radial-gradient(closest-side, rgba(255,255,255,0.6), rgba(255,255,255,0) 70%);
  mix-blend-mode: screen;
  animation: cfPulse 2.2s ease-in-out infinite;
  pointer-events: none;
}
.cf-freshness-bar__label {
  display: block;
  font-size: 11px;
  color: #58606e;
  margin-top: 6px;
}

@keyframes cfPulse {
  0% { opacity: 0.0; transform: translateX(0); }
  30% { opacity: 0.7; transform: translateX(2px); }
  60% { opacity: 0.25; transform: translateX(0); }
  100% { opacity: 0.0; transform: translateX(-1px); }
}


/* Label */
.cf-freshness-bar__label {
  display: block;
  font-size: 11px;
  color: #58606e;
  margin-top: 6px;
}

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
  .cf-freshness-bar__fill {
    transition: none;
  }
  .cf-freshness-bar__fill::after {
    animation: none;
  }
}

/* Keyframes for subtle pulse */
@keyframes cfPulse {
  0% { opacity: 0.0; transform: translateX(0); }
  30% { opacity: 0.7; transform: translateX(2px); }
  60% { opacity: 0.25; transform: translateX(0); }
  100% { opacity: 0.0; transform: translateX(-1px); }
}

/* Compact variant for category/archive cards */
.cf-freshness-bar--compact .cf-freshness-bar__track {
  height: 6px;
  border-radius: 4px;
}
.cf-freshness-bar--compact .cf-freshness-bar__fill {
  border-radius: 4px;
}
.cf-freshness-bar--compact .cf-freshness-bar__label {
  font-size: 10px;
  margin-top: 4px;
}

/* Dark mode support (optional) */
@media (prefers-color-scheme: dark) {
  .cf-freshness-bar__track {
    background: #2a2f3a;
  }
  .cf-freshness-bar__label {
    color: #c9cfdd;
  }
}


/* Wrapper: vertical stack on mobile */
.cf-region-wrapper {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 16px;
  padding: 0 12px;
}

/* Filter Form */
.cf-region-filter {
  display: flex;
  flex-direction: column;
  width: 100%;
  gap: 6px;
}

/* Label */
.cf-region-filter label {
  font-weight: 600;
  color: #80bb01;
  font-size: 15px;
}

/* Dropdown */
.cf-region-filter select {
  padding: 8px 12px;
  border: 2px solid #80bb01;
  border-radius: 6px;
  background-color: #fff;
  font-size: 14px;
  width: 100%;
  max-width: 320px;
  transition: border-color 0.3s ease;
}

/* Hover effect */
.cf-region-filter select:hover {
  border-color: #5a9900;
}

/* Badge */
.cf-region-badge {
  font-size: 14px;
  color: #80bb01;
  font-weight: 600;
  background-color: #f4fdf0;
  padding: 6px 12px;
  border-left: 4px solid #80bb01;
  border-radius: 4px;
  margin: 6px 0 14px;
  max-width: 100%;
  word-wrap: break-word;
}
.notice-success {
    background: #80bb01; /* ShopApni brand green */
    color: #fff;
    padding: 12px 16px;
    margin: 20px 0;
    border-radius: 6px;
    font-weight: bold;
    text-align: center;
}
/* farmcoin */
/* Coin container */
.cf-coin-flip-container {
  perspective: 1000px;
  width: 100px;   /* bigger coin size */
  height: 100px;
  margin: 0 auto;
}

/* Flip wrapper */
.cf-coin-flip {
  width: 100%;
  height: 100%;
  position: relative;
  transform-style: preserve-3d;
  transition: transform 0.6s ease;
}

.cf-coin-flip.flip {
  transform: rotateY(180deg);
}

/* Front & Back common */
.cf-coin-front, .cf-coin-back {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  border-radius: 50%;
  box-shadow: none;  
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Front image */
.cf-coin-front img {
  width: 100px;   /* match container size */
  height: 100px;
  object-fit: contain;
  border-radius: 50%;
}

/* Back side balance */
.cf-coin-back {
  background: url('/wp-content/plugins/community-farming/includes/assets/img/farmcoin-back.png') no-repeat center/cover;
  transform: rotateY(180deg);
  font-size: 28px;       /* bigger text */
  font-weight: 700;
  color: silver;         /* silver font color */
  text-shadow: 0 0 4px rgba(0,0,0,0.6);
  font-family: 'Trebuchet MS','Segoe UI',sans-serif;
}