/* CD Voting System - Custom CSS */

/* Safe area for mobile devices */
.pb-safe {
  padding-bottom: env(safe-area-inset-bottom, 0);
}

/* No scrollbar utility */
.no-scrollbar::-webkit-scrollbar {
  display: none;
}
.no-scrollbar {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

/* Line clamp */
.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Spinning animation */
@keyframes spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}
.animate-spin {
  animation: spin 1s linear infinite;
}

/* Custom scrollbar */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.4);
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(148, 163, 184, 0.6);
}

/* Focus ring */
:focus-visible {
  outline: 2px solid #137fec;
  outline-offset: 2px;
}

/* Selection color */
::selection {
  background: rgba(19, 127, 236, 0.2);
}

/* Table styles */
table {
  border-collapse: collapse;
}
table th,
table td {
  text-align: left;
}

/* Disabled state */
button:disabled,
input:disabled,
select:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Loading overlay */
.loading-overlay {
  position: fixed;
  inset: 0;
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

/* Checkbox custom style */
input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 1rem;
  height: 1rem;
  border: 2px solid #cbd5e1;
  border-radius: 0.25rem;
  background: white;
  cursor: pointer;
  transition: all 0.2s;
}
input[type="checkbox"]:checked {
  background: #137fec;
  border-color: #137fec;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41L9 16.17z'/%3E%3C/svg%3E");
  background-size: 0.75rem;
  background-position: center;
  background-repeat: no-repeat;
}
input[type="checkbox"]:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(19, 127, 236, 0.2);
}

/* Radio custom style */
input[type="radio"] {
  appearance: none;
  -webkit-appearance: none;
  width: 1.25rem;
  height: 1.25rem;
  border: 2px solid #cbd5e1;
  border-radius: 50%;
  background: white;
  cursor: pointer;
  transition: all 0.2s;
}
input[type="radio"]:checked {
  border-color: #137fec;
  background: radial-gradient(
    circle,
    #137fec 0%,
    #137fec 40%,
    white 40%,
    white 100%
  );
}
input[type="radio"]:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(19, 127, 236, 0.2);
}
