/**
 * SQUARE UI OVERRIDE
 * ==================
 * Minimal override file - provides sq- classes
 * Does NOT aggressively override existing Tailwind styles
 * Loaded LAST
 */

/* ========================================
   GLOBAL RADIUS VARIABLE
   ======================================== */

:root {
  --radius: var(--sq-radius-md, 0.375rem);
}

/* ========================================
   AVATAR EXCEPTIONS - KEEP CIRCULAR
   ======================================== */

img.rounded-full,
.avatar.rounded-full,
.avatar img,
[class*="avatar"] img,
.profile-image,
.user-avatar {
  border-radius: 9999px !important;
}

/* Status dot indicators */
.status-indicator,
.online-indicator,
.pulse-dot,
span.w-3.h-3.rounded-full,
div.w-3.h-3.rounded-full {
  border-radius: 9999px !important;
}

/* Radio buttons */
input[type="radio"] {
  border-radius: 9999px !important;
}

/* ========================================
   UTILITY OVERRIDE CLASSES
   ======================================== */

.force-rounded {
  border-radius: 0.5rem !important;
}

.force-rounded-lg {
  border-radius: 1rem !important;
}

.force-rounded-full {
  border-radius: 9999px !important;
}

/* ========================================
   MODAL POPUPS - ENFORCE ROUNDED CORNERS
   ======================================== */

/* Square UI modal components */
.sq-modal,
.sq-card[class*="max-w-"],
div[class*="fixed inset-0"][class*="flex"] > .sq-card,
div[class*="fixed inset-0"][class*="flex"] > div[class*="bg-white"],
div[class*="fixed inset-0"][class*="flex"] > div[class*="dark:bg-gray"] {
  border-radius: 0.75rem !important;
}

/* Modal backdrops - ensure child modals are rounded */
.sq-modal-backdrop > *,
div.fixed.inset-0.bg-black\/50 > div,
div[class*="fixed"][class*="inset-0"][class*="bg-black"] > div:not([class*="absolute"]) {
  border-radius: 0.75rem !important;
}

/* Inventory/Maintenance specific modal fixes */
[x-show*="Modal"] > .sq-card,
[x-show*="modal"] > .sq-card {
  border-radius: 0.75rem !important;
}
