/* ===========================================
   BORDER RADIUS OVERRIDE - Sistema Padronizado
   Grupo Cafeina - Gestão Interna
   
   Este arquivo sobrescreve as classes do Tailwind
   para usar border-radius de 3px em todo o sistema.
   =========================================== */

/* ===========================================
   OVERRIDE TAILWIND ROUNDED CLASSES
   =========================================== */

/* Containers, cards, painéis, seções */
.rounded,
.rounded-sm,
.rounded-md,
.rounded-lg,
.rounded-xl,
.rounded-2xl,
.rounded-3xl,
[class*="rounded-lg"],
[class*="rounded-xl"],
[class*="rounded-2xl"] {
  border-radius: var(--radius-base, 3px) !important;
}

/* Bordas específicas - top */
.rounded-t,
.rounded-t-sm,
.rounded-t-md,
.rounded-t-lg,
.rounded-t-xl,
.rounded-t-2xl,
.rounded-t-3xl {
  border-top-left-radius: var(--radius-base, 3px) !important;
  border-top-right-radius: var(--radius-base, 3px) !important;
}

/* Bordas específicas - bottom */
.rounded-b,
.rounded-b-sm,
.rounded-b-md,
.rounded-b-lg,
.rounded-b-xl,
.rounded-b-2xl,
.rounded-b-3xl {
  border-bottom-left-radius: var(--radius-base, 3px) !important;
  border-bottom-right-radius: var(--radius-base, 3px) !important;
}

/* Bordas específicas - left */
.rounded-l,
.rounded-l-sm,
.rounded-l-md,
.rounded-l-lg,
.rounded-l-xl,
.rounded-l-2xl,
.rounded-l-3xl {
  border-top-left-radius: var(--radius-base, 3px) !important;
  border-bottom-left-radius: var(--radius-base, 3px) !important;
}

/* Bordas específicas - right */
.rounded-r,
.rounded-r-sm,
.rounded-r-md,
.rounded-r-lg,
.rounded-r-xl,
.rounded-r-2xl,
.rounded-r-3xl {
  border-top-right-radius: var(--radius-base, 3px) !important;
  border-bottom-right-radius: var(--radius-base, 3px) !important;
}

/* Cantos específicos */
.rounded-tl,
.rounded-tl-sm,
.rounded-tl-md,
.rounded-tl-lg,
.rounded-tl-xl,
.rounded-tl-2xl {
  border-top-left-radius: var(--radius-base, 3px) !important;
}

.rounded-tr,
.rounded-tr-sm,
.rounded-tr-md,
.rounded-tr-lg,
.rounded-tr-xl,
.rounded-tr-2xl {
  border-top-right-radius: var(--radius-base, 3px) !important;
}

.rounded-bl,
.rounded-bl-sm,
.rounded-bl-md,
.rounded-bl-lg,
.rounded-bl-xl,
.rounded-bl-2xl {
  border-bottom-left-radius: var(--radius-base, 3px) !important;
}

.rounded-br,
.rounded-br-sm,
.rounded-br-md,
.rounded-br-lg,
.rounded-br-xl,
.rounded-br-2xl {
  border-bottom-right-radius: var(--radius-base, 3px) !important;
}

/* ===========================================
   EXCEÇÕES - Elementos que devem ser circulares
   =========================================== */

/* Manter rounded-full APENAS para elementos específicos */
.rounded-full {
  border-radius: var(--radius-base, 3px) !important;
}

/* Avatares circulares - usar classe específica */
.avatar-circle,
.rounded-full.avatar-circle,
img.rounded-full[class*="w-8"],
img.rounded-full[class*="w-10"],
img.rounded-full[class*="w-12"] {
  border-radius: var(--radius-circle, 50%) !important;
}

/* Toggle switches - manter pill shape (track + bolinha) */
.toggle-switch,
.rounded-full.toggle-switch,
[role="switch"],
input[type="checkbox"].toggle {
  border-radius: var(--radius-pill, 9999px) !important;
}

.toggle-switch::after,
[role="switch"]::after {
  border-radius: var(--radius-pill, 9999px) !important;
}

/* ===========================================
   COMPONENTES ESPECÍFICOS
   =========================================== */

/* Botões */
button,
.btn,
[class*="btn-"],
a[class*="btn"],
input[type="submit"],
input[type="button"] {
  border-radius: var(--radius-button, 3px) !important;
}

/* Inputs e formulários */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="tel"],
input[type="url"],
input[type="search"],
input[type="date"],
input[type="time"],
input[type="datetime-local"],
textarea,
select,
.form-control,
.form-input,
.form-select {
  border-radius: var(--radius-input, 3px) !important;
}

/* Tags, badges, chips */
.tag,
.badge,
.chip,
.status-badge,
[class*="badge-"],
span[class*="bg-"][class*="text-"][class*="px-"] {
  border-radius: var(--radius-tag, 3px) !important;
}

/* Tooltips */
.tooltip,
.tippy-box,
[role="tooltip"],
[data-tooltip] {
  border-radius: var(--radius-tooltip, 3px) !important;
}

/* Modais */
.modal,
.modal-content,
.dialog,
[role="dialog"],
.confirm-modal {
  border-radius: var(--radius-modal, 3px) !important;
}

/* Dropdowns */
.dropdown,
.dropdown-menu,
.dropdown-content,
[role="menu"],
[role="listbox"],
.custom-select-dropdown {
  border-radius: var(--radius-dropdown, 3px) !important;
}

/* Toast notifications */
.toast,
.toast-container,
.notification {
  border-radius: var(--radius-toast, 3px) !important;
}

/* Cards e containers */
.card,
.panel,
section.panel,
.box,
.container-box,
article {
  border-radius: var(--radius-container, 3px) !important;
}

/* Checkboxes customizados */
.checkbox-custom,
input[type="checkbox"] + span,
.custom-checkbox {
  border-radius: var(--radius-checkbox, 2px) !important;
}

/* ===========================================
   TABELAS
   =========================================== */

table {
  border-radius: var(--radius-container, 3px) !important;
}

table thead tr:first-child th:first-child {
  border-top-left-radius: var(--radius-base, 3px) !important;
}

table thead tr:first-child th:last-child {
  border-top-right-radius: var(--radius-base, 3px) !important;
}

table tbody tr:last-child td:first-child {
  border-bottom-left-radius: var(--radius-base, 3px) !important;
}

table tbody tr:last-child td:last-child {
  border-bottom-right-radius: var(--radius-base, 3px) !important;
}

/* ===========================================
   IMAGENS E MÍDIA
   =========================================== */

img:not(.avatar-circle):not([class*="rounded-full"]),
video,
.thumbnail,
.image-container {
  border-radius: var(--radius-base, 3px) !important;
}

/* ===========================================
   SCROLLBARS
   =========================================== */

::-webkit-scrollbar-thumb {
  border-radius: var(--radius-base, 3px) !important;
}

::-webkit-scrollbar-track {
  border-radius: var(--radius-base, 3px) !important;
}

/* ===========================================
   PROGRESS BARS
   =========================================== */

.progress,
.progress-bar,
[role="progressbar"] {
  border-radius: var(--radius-base, 3px) !important;
}

/* ===========================================
   ALERTAS E MENSAGENS
   =========================================== */

.alert,
.message,
.notice,
[role="alert"] {
  border-radius: var(--radius-container, 3px) !important;
}
