/* assets/css/components.css - Reusable UI Components */

/* Cards & Layout Containers */
.card-custom {
  background: var(--color-bg-card);
  color: var(--color-text-main);
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-md);
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.25s ease;
}

.card-custom:hover {
  box-shadow: var(--shadow-lg);
}

.card-gradient-primary {
  background: var(--color-primary-gradient);
  color: #ffffff !important;
  border-radius: var(--radius-lg);
  border: none;
  box-shadow: var(--shadow-glow);
}

/* ========================================================
   MASTER REUSABLE AVATAR & IMAGE SYSTEM (NO-DISTORTION)
   ======================================================== */
.avatar {
  aspect-ratio: 1 / 1 !important;
  overflow: hidden !important;
  border-radius: 50% !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex-shrink: 0 !important;
  background-color: var(--color-secondary-light);
  border: 2px solid #ffffff;
  box-shadow: var(--shadow-sm);
}

.avatar img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  object-position: center !important;
  display: block !important;
  border-radius: 50% !important;
}

/* Avatar Sizing Standard Scale */
.avatar-xs { width: 32px !important; height: 32px !important; }
.avatar-sm { width: 44px !important; height: 44px !important; }
.avatar-md { width: 64px !important; height: 64px !important; }
.avatar-lg { width: 84px !important; height: 84px !important; }
.avatar-xl { width: 110px !important; height: 110px !important; }

.avatar-circle-wrapper {
  width: 110px;
  height: 110px;
  border-radius: 50% !important;
  overflow: hidden !important;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #ffffff;
  margin: 0 auto;
  border: 4px solid var(--color-primary);
  box-shadow: var(--shadow-md);
  flex-shrink: 0 !important;
}

.avatar-circle-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover !important;
  object-position: center !important;
  border-radius: 50% !important;
}

/* Photo Card Aspect Ratio Containers */
.photo-card-34 {
  width: 100%;
  aspect-ratio: 4 / 3 !important;
  overflow: hidden !important;
  border-radius: var(--radius-md);
  background: #000000;
}

.photo-card-34 img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  object-position: center !important;
  display: block !important;
}

/* Button System Hierarchy */
.btn-primary-custom {
  background: var(--color-primary-gradient);
  color: #ffffff !important;
  border: none;
  font-weight: 700;
  border-radius: var(--radius-md);
  padding: 10px 22px;
  transition: all 0.2s ease;
  box-shadow: 0 4px 14px rgba(79, 70, 229, 0.25);
}

.btn-primary-custom:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-glow);
}

.btn-ghost {
  background: transparent;
  color: var(--color-text-muted);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 8px 18px;
  font-weight: 600;
  transition: all 0.2s ease;
}

.btn-ghost:hover {
  background: var(--color-secondary-light);
  color: var(--color-text-main);
}

/* Big Pulse Attendance Button for Siswa */
.btn-absen-primary {
  width: 160px;
  height: 160px;
  border-radius: 50%;
  background: var(--color-primary-gradient);
  color: #ffffff !important;
  font-size: 1.25rem;
  font-weight: 800;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
  border: 6px solid rgba(255, 255, 255, 0.4);
  box-shadow: 0 20px 45px rgba(79, 70, 229, 0.45);
  animation: pulse-ring 2.2s infinite cubic-bezier(0.45, 0, 0.55, 1);
  cursor: pointer;
  transition: transform 0.25s ease;
}

.btn-absen-primary:hover {
  transform: scale(1.06);
}

@keyframes pulse-ring {
  0% { box-shadow: 0 0 0 0 rgba(79, 70, 229, 0.55); }
  70% { box-shadow: 0 0 0 24px rgba(79, 70, 229, 0); }
  100% { box-shadow: 0 0 0 0 rgba(79, 70, 229, 0); }
}

/* Floating Glass Mobile Bottom Navigation */
.mobile-bottom-nav {
  position: fixed;
  bottom: 14px;
  left: 16px;
  right: 16px;
  height: 66px;
  background: var(--color-bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  display: flex;
  justify-content: space-around;
  align-items: center;
  z-index: 1050;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.12);
}

.mobile-bottom-nav a {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--color-text-muted);
  text-decoration: none;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: var(--radius-md);
  transition: all 0.2s ease;
}

.mobile-bottom-nav a i {
  font-size: 1.35rem;
  margin-bottom: 2px;
}

.mobile-bottom-nav a.active {
  color: var(--color-primary) !important;
  font-weight: 800 !important;
  background: var(--color-primary-light) !important;
}

.content-mobile-padding {
  padding-bottom: 95px;
}

/* Empty State Box */
.empty-state-box {
  padding: 36px 20px;
  text-align: center;
  color: var(--color-text-muted);
}

.empty-state-box i {
  font-size: 3rem;
  color: var(--color-primary);
  opacity: 0.5;
  margin-bottom: 12px;
}

/* Skeleton Loading State */
.skeleton-box {
  background: linear-gradient(90deg, var(--color-border) 25%, var(--color-secondary-light) 37%, var(--color-border) 63%);
  background-size: 400% 100%;
  animation: skeleton-shimmer 1.4s ease infinite;
  border-radius: var(--radius-sm);
}

@keyframes skeleton-shimmer {
  0% { background-position: 100% 50%; }
  100% { background-position: 0 50%; }
}
