/**
 * Dealicious - Cart Reminder Timer for WooCommerce frontend styles
 */

.crt-timer {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border: none;
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 16px;
  color: #fff;
  text-align: center;
  font-size: 16px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
  animation: crt-slideIn 0.4s ease-out;
  position: relative;
  overflow: hidden;
}

.crt-timer.danger {
  background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.crt-timer.warning {
  background: linear-gradient(135deg, #ffa751 0%, #ffe259 100%);
  color: #1f2937;
}

.crt-timer.info {
  background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

.crt-timer.success {
  background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
  color: #1f2937;
}

.crt-timer.critical {
  animation: crt-pulse 1s infinite, crt-slideIn 0.4s ease-out;
}

@keyframes crt-slideIn {
  from {
    transform: translateY(-20px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

@keyframes crt-pulse {
  0%,
  100% {
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
  }
  50% {
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.25);
  }
}

.crt-progress-container {
  height: 4px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 4px;
  margin-bottom: 12px;
  overflow: hidden;
}

.crt-progress-bar {
  height: 100%;
  background: rgba(255, 255, 255, 0.8);
  width: 100%;
  transition: width 1s linear;
  border-radius: 4px;
}

.crt-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.crt-message {
  flex: 1;
  text-align: center;
  min-width: 200px;
  font-weight: 500;
}

.crt-timer-value {
  font-size: 28px;
  font-weight: 700;
  font-family: "Courier New", monospace;
  display: inline-block;
  min-width: 100px;
  letter-spacing: 1px;
}

.crt-dismiss-btn {
  background: rgba(255, 255, 255, 0.25);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 6px;
  padding: 8px 12px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  transition: all 0.3s ease;
  flex-shrink: 0;
  white-space: nowrap;
}

.crt-dismiss-btn:hover {
  background: rgba(255, 255, 255, 0.35);
  transform: scale(1.05);
}

.crt-reopen-btn {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: #667eea;
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 60px;
  height: 60px;
  font-size: 24px;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(102, 126, 234, 0.4);
  z-index: 999;
  transition: all 0.3s ease;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.crt-reopen-btn:hover {
  transform: scale(1.15);
  box-shadow: 0 8px 24px rgba(102, 126, 234, 0.5);
}

.crt-reopen-btn.show {
  display: flex;
  animation: crt-slideIn 0.4s ease-out;
}

/* Added styling for expired timer notification */
.crt-timer.expired {
  animation: none;
  opacity: 0.95;
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
}

.crt-expired-notice {
  padding: 8px 0;
  line-height: 1.6;
}

.crt-expired-notice strong {
  display: block;
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 8px;
}

.crt-expired-notice-subtitle {
  display: block;
  font-size: 13px;
  opacity: 0.95;
  font-weight: 500;
}

@media (max-width: 768px) {
  .crt-timer {
    padding: 12px;
    font-size: 14px;
  }

  .crt-content {
    flex-direction: column;
    gap: 8px;
  }

  .crt-message {
    min-width: 100%;
  }

  .crt-timer-value {
    font-size: 24px;
    min-width: auto;
  }

  .crt-dismiss-btn {
    width: 100%;
    padding: 10px 12px;
  }

  .crt-reopen-btn {
    bottom: 10px;
    right: 10px;
    width: 50px;
    height: 50px;
    font-size: 20px;
  }
}
