/* ============================================
   SHADCN/UI COMPLETE CSS FOR ELEMENTOR (FULL VERSION)
   Gabungan kode asli lu + perbaikan selektor Elementor
   ============================================ */

/* ===== CSS VARIABLES ===== */
:root {
  /* Colors - HSL Format */
  --background: 0 0% 100%;
  --foreground: 240 10% 3.9%;
  --card: 0 0% 100%;
  --card-foreground: 240 10% 3.9%;
  --popover: 0 0% 100%;
  --popover-foreground: 240 10% 3.9%;
  --primary: 240 5.9% 10%;
  --primary-foreground: 0 0% 98%;
  --secondary: 240 4.8% 95.9%;
  --secondary-foreground: 240 5.9% 10%;
  --muted: 240 4.8% 95.9%;
  --muted-foreground: 240 3.8% 46.1%;
  --accent: 240 4.8% 95.9%;
  --accent-foreground: 240 5.9% 10%;
  --destructive: 0 84.2% 60.2%;
  --destructive-foreground: 0 0% 98%;
  --border: 240 5.9% 90%;
  --input: 240 5.9% 90%;
  --ring: 240 5.9% 10%;

  /* Border Radius */
  --radius: 0.5rem;
  --radius-sm: 0.375rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;

  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px -1px rgba(0, 0, 0, 0.1);
  --shadow-md:
    0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
  --shadow-lg:
    0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
  --shadow-xl:
    0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
}

/* Dark Mode Variables */
@media (prefers-color-scheme: dark) {
  :root {
    --background: 240 10% 3.9%;
    --foreground: 0 0% 98%;
    --card: 240 10% 3.9%;
    --card-foreground: 0 0% 98%;
    --popover: 240 10% 3.9%;
    --popover-foreground: 0 0% 98%;
    --primary: 0 0% 98%;
    --primary-foreground: 240 5.9% 10%;
    --secondary: 240 3.7% 15.9%;
    --secondary-foreground: 0 0% 98%;
    --muted: 240 3.7% 15.9%;
    --muted-foreground: 240 5% 64.9%;
    --accent: 240 3.7% 15.9%;
    --accent-foreground: 0 0% 98%;
    --border: 240 3.7% 15.9%;
    --input: 240 3.7% 15.9%;
    --ring: 240 4.9% 83.9%;
  }
}

/* ===== BASE STYLES ===== */
* {
  border-color: hsl(var(--border));
  box-sizing: border-box;
}

body {
  background-color: hsl(var(--background));
  color: hsl(var(--foreground));
  font-feature-settings:
    "rlig" 1,
    "calt" 1;
}

/* ===== FOCUS STYLES ===== */
*:focus {
  outline: none !important;
}
*:focus-visible {
  outline: 2px solid hsl(var(--ring)) !important;
  outline-offset: 2px !important;
}

/* ===== BUTTON STYLES (Elementor Fix) ===== */

/* Base reset untuk semua tombol shadcn di Elementor */
[class*="btn-"] .elementor-button,
.elementor-button-primary {
  border-radius: var(--radius-sm) !important;
  padding: 0.5rem 1rem !important;
  font-size: 0.875rem !important;
  font-weight: 500 !important;
  line-height: 1.25rem !important;
  transition: all 0.2s ease !important;
  cursor: pointer !important;
  border: none !important;
}

/* Primary */
.btn-primary .elementor-button,
.elementor-button-primary {
  background-color: hsl(var(--primary)) !important;
  color: hsl(var(--primary-foreground)) !important;
}
.btn-primary .elementor-button:hover,
.elementor-button-primary:hover {
  background-color: hsl(240 5.9% 15%) !important;
  box-shadow: var(--shadow-sm) !important;
}

/* Secondary */
.btn-secondary .elementor-button {
  background-color: hsl(var(--secondary)) !important;
  color: hsl(var(--secondary-foreground)) !important;
}
.btn-secondary .elementor-button:hover {
  background-color: hsl(240 4.8% 90%) !important;
}

/* Destructive */
.btn-destructive .elementor-button {
  background-color: hsl(var(--destructive)) !important;
  color: hsl(var(--destructive-foreground)) !important;
}
.btn-destructive .elementor-button:hover {
  background-color: hsl(0 84.2% 55%) !important;
}

/* Outline */
.btn-outline .elementor-button {
  background-color: transparent !important;
  color: hsl(var(--foreground)) !important;
  border: 1px solid hsl(var(--input)) !important;
}
.btn-outline .elementor-button:hover {
  background-color: hsl(var(--accent)) !important;
  color: hsl(var(--accent-foreground)) !important;
}

/* Ghost */
.btn-ghost .elementor-button {
  background-color: transparent !important;
  color: hsl(var(--foreground)) !important;
}
.btn-ghost .elementor-button:hover {
  background-color: hsl(var(--accent)) !important;
  color: hsl(var(--accent-foreground)) !important;
}

/* Link */
.btn-link .elementor-button {
  background-color: transparent !important;
  color: hsl(var(--primary)) !important;
  text-decoration: underline !important;
  text-underline-offset: 4px !important;
}
.btn-link .elementor-button:hover {
  text-decoration: none !important;
}

/* Button Sizes */
.btn-sm .elementor-button {
  padding: 0.375rem 0.75rem !important;
  font-size: 0.75rem !important;
  line-height: 1rem !important;
}
.btn-lg .elementor-button {
  padding: 0.625rem 2rem !important;
  font-size: 1rem !important;
  line-height: 1.5rem !important;
  border-radius: var(--radius) !important;
}
.btn-icon .elementor-button {
  width: 2.5rem !important;
  height: 2.5rem !important;
  padding: 0 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
}

/* ===== FORM STYLES (Elementor Fix) ===== */
.scn-form .elementor-field-group input[type="text"],
.scn-form .elementor-field-group input[type="email"],
.scn-form .elementor-field-group input[type="password"],
.scn-form .elementor-field-group input[type="tel"],
.scn-form .elementor-field-group input[type="url"],
.scn-form .elementor-field-group input[type="number"],
.scn-form .elementor-field-group textarea,
.scn-form .elementor-field-group select {
  background-color: transparent !important;
  border: 1px solid hsl(var(--input)) !important;
  border-radius: var(--radius-sm) !important;
  padding: 0.5rem 0.75rem !important;
  font-size: 0.875rem !important;
  color: hsl(var(--foreground)) !important;
  height: 2.5rem !important;
  width: 100% !important;
  transition: all 0.2s ease !important;
}

.scn-form .elementor-field-group textarea {
  min-height: 5rem !important;
  height: auto !important;
}

/* Focus & State */
.scn-form .elementor-field-group input:focus,
.scn-form .elementor-field-group textarea:focus {
  border-color: hsl(var(--ring)) !important;
  outline: 2px solid hsl(var(--ring)) !important;
  outline-offset: -2px !important;
}

/* Checkbox & Radio */
.scn-form input[type="checkbox"],
.scn-form input[type="radio"] {
  width: 1rem !important;
  height: 1rem !important;
  border: 1px solid hsl(var(--primary)) !important;
  accent-color: hsl(var(--primary)) !important;
}

/* ===== CARD STYLES ===== */
.scn-card > .elementor-widget-container,
.shadcn-card {
  background-color: hsl(var(--card)) !important;
  color: hsl(var(--card-foreground)) !important;
  border: 1px solid hsl(var(--border)) !important;
  border-radius: var(--radius) !important;
  padding: 1.5rem !important;
  box-shadow: var(--shadow-sm) !important;
}

.card-header {
  padding-bottom: 1rem;
  border-bottom: 1px solid hsl(var(--border));
  margin-bottom: 1rem;
}
.card-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: hsl(var(--card-foreground));
}
.card-description {
  font-size: 0.875rem;
  color: hsl(var(--muted-foreground));
  margin-top: 0.25rem;
}

/* ===== BADGE STYLES ===== */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.125rem 0.625rem;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: 9999px;
  border: 1px solid transparent;
}
.badge-default {
  background-color: hsl(var(--primary));
  color: hsl(var(--primary-foreground));
}
.badge-secondary {
  background-color: hsl(var(--secondary));
  color: hsl(var(--secondary-foreground));
}
.badge-destructive {
  background-color: hsl(var(--destructive));
  color: hsl(var(--destructive-foreground));
}
.badge-outline {
  border: 1px solid hsl(var(--border));
  color: hsl(var(--foreground));
}

/* ===== ALERT STYLES ===== */
.alert {
  border-radius: var(--radius);
  border: 1px solid hsl(var(--border));
  padding: 1rem;
  position: relative;
  background-color: hsl(var(--background));
}
.alert-destructive {
  border-color: hsl(var(--destructive));
  color: hsl(var(--destructive));
  background-color: hsla(var(--destructive), 0.1);
}
.alert-title {
  font-weight: 600;
  margin-bottom: 0.25rem;
  display: block;
}
.alert-description {
  font-size: 0.875rem;
  color: hsl(var(--muted-foreground));
}

/* ===== AVATAR STYLES ===== */
.avatar {
  border-radius: 50%;
  overflow: hidden;
  display: inline-block;
  border: 2px solid hsl(var(--background));
  background-color: hsl(var(--muted));
}
.avatar-xs {
  width: 2rem;
  height: 2rem;
}
.avatar-sm {
  width: 2.5rem;
  height: 2.5rem;
}
.avatar-md {
  width: 3rem;
  height: 3rem;
}
.avatar-lg {
  width: 4rem;
  height: 4rem;
}
.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ===== TYPOGRAPHY HELPERS ===== */
.text-muted {
  color: hsl(var(--muted-foreground)) !important;
}
.text-sm {
  font-size: 0.875rem !important;
}
.text-xs {
  font-size: 0.75rem !important;
}
.text-lg {
  font-size: 1.125rem !important;
}
.text-xl {
  font-size: 1.25rem !important;
}
.lead {
  font-size: 1.25rem;
  color: hsl(var(--muted-foreground));
}

/* ===== SPACING UTILITIES ===== */
.container-scn {
  padding-left: 1rem;
  padding-right: 1rem;
  width: 100%;
  margin: 0 auto;
}
@media (min-width: 768px) {
  .container-scn {
    padding-left: 2.5rem;
    padding-right: 2.5rem;
  }
}
@media (min-width: 1024px) {
  .container-scn {
    padding-left: 5rem;
    padding-right: 5rem;
  }
}

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar {
  width: 0.625rem;
  height: 0.625rem;
}
::-webkit-scrollbar-track {
  background: hsl(var(--muted));
  border-radius: var(--radius);
}
::-webkit-scrollbar-thumb {
  background: hsl(var(--muted-foreground));
  border-radius: var(--radius);
}
::-webkit-scrollbar-thumb:hover {
  background: hsl(240 3.8% 36%);
}

/* ===== SEPARATOR ===== */
.separator {
  height: 1px;
  background-color: hsl(var(--border));
  margin: 1.5rem 0;
  width: 100%;
}
.separator-vertical {
  width: 1px;
  height: 20px;
  background-color: hsl(var(--border));
  margin: 0 1rem;
  display: inline-block;
  vertical-align: middle;
}

/* ===== SKELETON LOADING ===== */
.skeleton {
  background: linear-gradient(
    90deg,
    hsl(var(--muted)) 0%,
    hsl(var(--accent)) 50%,
    hsl(var(--muted)) 100%
  );
  background-size: 200% 100%;
  animation: skeleton-loading 1.5s ease-in-out infinite;
  border-radius: var(--radius);
  min-height: 1rem;
}
@keyframes skeleton-loading {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

/* ===== RESPONSIVE HELPERS ===== */
@media (max-width: 768px) {
  .hide-mobile {
    display: none !important;
  }
}
@media (min-width: 769px) {
  .hide-desktop {
    display: none !important;
  }
}

/* ===== END OF SHADCN/UI STYLES ===== */
