/* ============================================
   ANT DESIGN VUE - ESTILOS GLOBALES
   Todos los estilos de componentes Ant Design deben estar aquí
   ============================================ */

/* --------------------------------------------
   LAYOUT HELPERS
   -------------------------------------------- */
.app-container {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.app-header {
  flex-shrink: 0;
}

.app-main {
  flex: 1;
  padding: 20px 0;
}

.app-footer {
  flex-shrink: 0;
}

/* --------------------------------------------
   INPUTS - Configuración global mejorada
   -------------------------------------------- */
.ant-input,
.ant-input-affix-wrapper,
.ant-input-password {
  border-radius: 12px !important;
  border: 1.5px solid #e5e7eb !important;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
  background: #ffffff !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05) !important;
  font-size: 15px !important;
  color: #1f2937 !important;
  position: relative !important;
  padding-left: 40px !important;
}

.ant-input-affix-wrapper,
.ant-input-password {
  padding: 0 !important;
}

.ant-input:hover,
.ant-input-affix-wrapper:hover,
.ant-input-password:hover {
  border-color: #cbd5e1 !important;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08) !important;
}

/* Campos deshabilitados - Estilo global */
.ant-input[disabled],
.ant-input-affix-wrapper-disabled,
.ant-input-affix-wrapper-disabled .ant-input,
.ant-input-password-disabled,
.ant-input-password-disabled .ant-input {
  color: #bfbfbf !important;
  background-color: #f5f5f5 !important;
  cursor: not-allowed !important;
  border-color: #d9d9d9 !important;
}

.ant-input-affix-wrapper-disabled:hover,
.ant-input-password-disabled:hover {
  border-color: #d9d9d9 !important;
  box-shadow: none !important;
}

/* Input interno - Ant Design Vue maneja el padding automáticamente */
.ant-input-affix-wrapper .ant-input,
.ant-input-password .ant-input {
  border: none !important;
  background: transparent !important;
  box-shadow: none !important;
  height: 100% !important;
  font-size: 15px !important;
  font-weight: 400 !important;
  color: #1f2937 !important;
  line-height: 1.5 !important;
}

.ant-input::-moz-placeholder, .ant-input-affix-wrapper .ant-input::-moz-placeholder, .ant-input-password .ant-input::-moz-placeholder {
  color: #9ca3af !important;
  opacity: 1 !important;
  font-weight: 400 !important;
}

.ant-input::placeholder,
.ant-input-affix-wrapper .ant-input::placeholder,
.ant-input-password .ant-input::placeholder {
  color: #9ca3af !important;
  opacity: 1 !important;
  font-weight: 400 !important;
}

/* Prefix y Suffix - Iconos mejorados */
.ant-input-prefix,
.ant-input-suffix {
  position: absolute !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
  color: #9ca3af !important;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  z-index: 1 !important;
  pointer-events: none !important;
}

.ant-input-prefix {
  left: 14px !important;
  width: 20px !important;
}

.ant-input-suffix {
  right: 14px !important;
  width: 20px !important;
  pointer-events: auto !important;
}

.ant-input-prefix i,
.ant-input-suffix i,
.ant-input-prefix .mdi,
.ant-input-suffix .mdi {
  color: inherit !important;
  font-size: 1.15rem !important;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
  line-height: 1 !important;
  display: inline-flex !important;
  align-items: center !important;
}

/* Estados de focus en prefix/suffix */
.ant-input-affix-wrapper-focused .ant-input-prefix,
.ant-input-password-focused .ant-input-prefix,
.ant-input-affix-wrapper-focused .ant-input-prefix i,
.ant-input-password-focused .ant-input-prefix i {
  color: #285DE1 !important;
}

.ant-input-affix-wrapper-focused .ant-input-suffix,
.ant-input-password-focused .ant-input-suffix {
  color: #285DE1 !important;
}

/* Password icon específico */
.ant-input-password-icon {
  color: #9ca3af !important;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
  cursor: pointer !important;
  pointer-events: auto !important;
  font-size: 1.15rem !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

.ant-input-password-icon:hover {
  color: #285DE1 !important;
  transform: scale(1.1) !important;
}

.ant-input-suffix:hover .ant-input-password-icon {
  color: #285DE1 !important;
}

/* Tamaños específicos para inputs large */
.ant-input-affix-wrapper-lg,
.ant-input-password-lg {
  min-height: 48px !important;
  height: 48px !important;
}

.ant-input-affix-wrapper-lg .ant-input,
.ant-input-password-lg .ant-input {
  font-size: 15px !important;
}

/* Mejora visual en estados de error */
.ant-input-affix-wrapper-status-error,
.ant-input-password-status-error {
  border-color: #f5222d !important;
}

.ant-input-affix-wrapper-status-error:focus,
.ant-input-password-status-error:focus {
  box-shadow: 0 0 0 4px rgba(245, 34, 45, 0.12), 0 2px 8px rgba(245, 34, 45, 0.15) !important;
}

/* --------------------------------------------
   DATE PICKER - Configuración global
   -------------------------------------------- */
.ant-picker {
  border-radius: 12px !important;
  border: 1px solid #e5e7eb !important;
  height: 40px !important;
  transition: all 0.3s ease !important;
  background: #ffffff !important;
  font-size: 14px !important;
}

.ant-picker:hover {
  border-color: #d1d5db !important;
}

.ant-picker-focused {
  border-color: #285DE1 !important;
  box-shadow: 0 0 0 3px rgba(40, 93, 225, 0.1) !important;
  outline: none !important;
}

.ant-picker-input > input {
  font-size: 14px !important;
  color: #1f2937 !important;
}

.ant-picker-input > input::-moz-placeholder {
  color: #9ca3af !important;
}

.ant-picker-input > input::placeholder {
  color: #9ca3af !important;
}

.ant-picker-suffix {
  color: #9ca3af !important;
  transition: color 0.3s ease !important;
}

.ant-picker-focused .ant-picker-suffix {
  color: #285DE1 !important;
}

/* --------------------------------------------
   SELECT - Configuración global
   -------------------------------------------- */
.ant-select .ant-select-selector {
  border-radius: 12px !important;
  border: 1px solid #e5e7eb !important;
  transition: all 0.3s ease !important;
  background: #ffffff !important;
  font-size: 14px !important;
  color: #1f2937 !important;
}

.ant-select:hover .ant-select-selector {
  border-color: #d1d5db !important;
}

.ant-select-focused .ant-select-selector {
  border-color: #285DE1 !important;
  box-shadow: 0 0 0 3px rgba(40, 93, 225, 0.1) !important;
  outline: none !important;
}

.ant-select-selection-placeholder {
  color: #9ca3af !important;
}

.ant-select-arrow {
  color: #9ca3af !important;
  transition: color 0.3s ease !important;
}

.ant-select-focused .ant-select-arrow {
  color: #285DE1 !important;
}

/* --------------------------------------------
   BUTTONS - Configuración global
   -------------------------------------------- */
.ant-btn {
  border-radius: 8px !important;
  font-weight: 500 !important;
  transition: all 0.3s ease !important;
}

.ant-btn-primary {
  background: linear-gradient(135deg, #285DE1 0%, #1a4bc7 100%) !important;
  border: none !important;
}

.ant-btn-primary:hover {
  background: linear-gradient(135deg, #1a4bc7 0%, #0d3ba3 100%) !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 4px 12px rgba(40, 93, 225, 0.3) !important;
}

/* --------------------------------------------
   CARDS - Configuración global
   -------------------------------------------- */
.ant-card {
  border-radius: 16px !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08) !important;
}

/* --------------------------------------------
   FORMS - Configuración global
   -------------------------------------------- */
.ant-form-item {
  margin-bottom: 16px !important;
}

.ant-form-item-label {
  padding-bottom: 8px !important;
}

.ant-form-item-label > label {
  font-weight: 600 !important;
  color: #2c3e50 !important;
  font-size: 0.9rem !important;
}

.ant-form-item-explain-error {
  color: #f5222d !important;
  font-size: 12px !important;
}

/* --------------------------------------------
   MODALS - Configuración global
   -------------------------------------------- */
.ant-modal-content {
  border-radius: 16px !important;
  overflow: hidden !important;
}

.ant-modal-header {
  border-bottom: 1px solid #f0f0f0 !important;
  padding: 20px 24px !important;
}

.ant-modal-title {
  font-weight: 700 !important;
  font-size: 1.1rem !important;
  color: #1f2937 !important;
}

.ant-modal-body {
  padding: 24px !important;
}

/* --------------------------------------------
   TEXTAREA - Configuración global
   -------------------------------------------- */
.ant-input:not(.ant-input-affix-wrapper .ant-input):not(.ant-input-password .ant-input) {
  border-radius: 12px !important;
  min-height: 40px !important;
  padding: 8px 16px !important;
}

/* --------------------------------------------
   ALERTS - Configuración global
   -------------------------------------------- */
.ant-alert {
  border-radius: 12px !important;
  border: none !important;
}

/* --------------------------------------------
   RESPONSIVE - Ajustes globales
   -------------------------------------------- */
@media (max-width: 576px) {
  .ant-input-affix-wrapper,
  .ant-input-password {
    height: 48px !important;
  }
  
  .ant-input-affix-wrapper .ant-input,
  .ant-input-password .ant-input {
    font-size: 0.9rem !important;
  }
  
  .ant-input-prefix i {
    font-size: 1.1rem !important;
  }
}

/* --------------------------------------------
   AUTOAUTOCOMPLETE/DROPDOWN - Ocultar sugerencias
   -------------------------------------------- */
/* Ocultar dropdowns de autocompletado */
/* NOTA: El dropdown del EventSearch se sobrescribe en el componente con mayor especificidad */
/* NOTA: El dropdown del ProfileSelector debe mostrarse, por lo que se excluye */
.ant-picker-dropdown,
.ant-auto-complete-dropdown,
.ant-cascader-dropdown {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

/* Excepción: Mostrar dropdown del ProfileSelector */
.profile-dropdown .ant-dropdown,
.profile-dropdown ~ .ant-dropdown {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  pointer-events: auto !important;
}

/* Ocultar popovers y tooltips relacionados con inputs */
.ant-input-affix-wrapper + .ant-popover,
.ant-input-password + .ant-popover {
  display: none !important;
}

/* Ocultar cualquier elemento flotante relacionado con inputs */
.ant-input-affix-wrapper ~ [class*="dropdown"],
.ant-input-affix-wrapper ~ [class*="popover"],
.ant-input-affix-wrapper ~ [class*="tooltip"] {
  display: none !important;
}

/* Asegurar que no haya elementos de sugerencia visibles */
/* NOTA: El menú del dropdown del EventSearch se sobrescribe en el componente */
/* NOTA: El menú del dropdown del ProfileSelector debe mostrarse */
.ant-select-dropdown-menu,
.ant-picker-dropdown,
.ant-auto-complete-dropdown-menu {
  display: none !important;
}

/* Excepción: Mostrar menú del dropdown del ProfileSelector */
.profile-dropdown .ant-dropdown-menu,
.profile-dropdown ~ .ant-dropdown .ant-dropdown-menu {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  pointer-events: auto !important;
}

