/*  MODAIS GERAIS E ESTRUTURA BASE */
.smart-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2147483650;
}

.smart-modal__header {
  margin-bottom: 16px;
  width: 100%;
}

.smart-modal__title-wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.smart-modal__title {
  font-family: var(--sp-font-title) !important;
  margin: 0 !important;
  font-size: 24px !important;
  font-weight: 700 !important;
  color: var(--sp-text-main);
}

.smart-modal__subtitle {
  font-family: var(--sp-font-body);
  margin: 8px 0 0;
  font-size: 16px;
  color: var(--sp-text-muted);
}

.smart-modal__close {
  background-color: var(--sp-bg-white) !important;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 40px;
  height: 40px;
  padding: 0 !important;
  border: none !important;
  background: transparent;
  transition: transform 0.2s ease;
  flex-shrink: 0;
  cursor: pointer;
  color: var(--sp-color-primary) !important;
}

.smart-modal__close svg {
  width: 100%;
  height: 100%;
  max-width: 30px;
  max-height: 30px;
  fill: currentColor;
}

.smart-modal__close:hover {
  transform: scale(1.1);
}

.smart-modal__actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 20px;
  width: 100%;
}

.smart-modal__btn {
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  padding: 12px 40px;
  height: 48px;
  border-radius: var(--sp-border-radius);
  font-size: 14px;
  font-family: var(--sp-font-title);
  font-weight: 700;
  text-transform: uppercase;
  cursor: pointer;
  border: none;
  transition: var(--sp-transition);
}

.smart-modal__btn--secondary {
  background-color: var(--sp-bg-white) !important;
  color: var(--sp-text-main) !important;
  border: var(--sp-border-button) !important;
  width: 275px;
}

.smart-modal__btn--secondary:hover {
  background-color: #f5f5f5 !important;
}

.smart-modal__btn--primary {
  background-color: var(--sp-color-primary) !important;
  color: var(--sp-bg-white) !important;
  width: 134px;
}

.smart-modal__btn--primary:hover {
  background-color: var(--sp-color-primary-hover) !important;
}

.smart-modal__btn--danger {
  background-color: var(--sp-color-danger) !important;
  color: var(--sp-bg-white) !important;
  width: 149px;
}

.hidden {
  display: none !important;
}

/* MODAL GERAL E DE REMOÇÃO */
.smart-modal__content--general,
.smart-modal__content--remove {
  background: var(--sp-bg-white);
  border-radius: 16px;
  padding: 40px;
  box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.05);
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  box-sizing: border-box;
}

.smart-modal__content--general {
  width: 100%;
  height: auto;
  max-width: 662px;
}

.smart-modal__content--remove {
  width: 100%;
  height: auto;
  max-width: 600px;
  z-index: 2147483650;
}

.smart-modal__cart-item {
  width: 100%;
  margin: 20px 0;
}

.smart-modal__cart-item .cart-item {
  display: flex;
  flex-direction: row;
  gap: 16px;
  padding: 0;
  background-color: transparent;
  border: none;
  box-shadow: none;
  margin: 0;
}

.smart-modal__cart-item .cart-item:hover {
  transform: none;
  box-shadow: none;
}

.smart-modal__cart-item .cart-item__media {
  width: 120px;
  height: auto !important;
  flex-shrink: 0;
  overflow: hidden;
  position: relative;
  border-radius: 8px;
}

.smart-modal__content--remove .cart-item__media {
  width: 220px;
  height: auto !important;
}


.smart-modal__cart-item .cart-item__thumb {
  border-radius: 8px;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 8px;
}

.smart-modal__cart-item .cart-item__body {
  gap: 8px;
  justify-content: flex-start;
}

.smart-modal__cart-item .cart-item__header {
  padding-top: 8px;
}

.smart-modal__cart-item .cart-item__format {
  font-size: 12px;
}

.smart-modal__cart-item .cart-item__title {
  font-size: 16px;
}

.smart-modal__cart-item .cart-item__row--meta-price {
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
}

.smart-modal__content--remove .cart-item__row--meta-price {
  flex-direction: column;
  gap: 8px;
  align-items: flex-start;
}

.smart-modal__cart-item .cart-item__meta-list {
  flex-direction: row;
  gap: 4px;
}

.smart-modal__content--remove .cart-item__meta-list {
  flex-direction: column;
}

.smart-modal__content--general .cart-item__meta-list {
  flex-direction: row;
  gap: 100px;
}

.smart-modal__cart-item .cart-item__price {
  font-size: 16px;
}

.smart-modal__cart-item .cart-item__btn--accordion,
.smart-modal__cart-item .cart-item__badge {
  display: none !important;
}

.smart-modal__content-area {
  display: flex !important;
  flex-direction: column !important;
  gap: 24px !important;
  width: 100%;
}

.smart-modal__company-section {
  display: flex;
  flex-direction: column;
  gap: 9px;
  padding: 24px;
  background-color: #f4f7fe;
  border-radius: 8px;
}

.smart-modal__company-display {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.smart-modal__company-select {
  display: flex;
  align-items: center;
  gap: 6px;
}

.smart-modal__company-name {
  font-family: var(--sp-font-body) !important;
  font-size: 18px !important;
  font-weight: 400 !important;
  color: var(--sp-text-main) !important;
  text-transform: lowercase !important;
}

.smart-modal__company-name::first-letter {
  text-transform: uppercase !important;
}

.smart-modal__btn-link {
  background: none !important;
  border: none !important;
  padding: 0 !important;
  color: var(--sp-color-primary) !important;
  cursor: pointer !important;
  font-family: var(--sp-font-body) !important;
  font-size: 14px !important;
  font-weight: 400 !important;
  text-decoration: underline !important;
}

.smart-modal__btn-register {
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  padding: 12px 40px;
  gap: 10px;
  width: 100%;
  height: 48px;
  background-color: #f4f7fe !important;
  color: var(--sp-color-primary) !important;
  border: 1px solid var(--sp-color-primary) !important;
  border-radius: 8px;
  text-transform: uppercase !important;
  font-family: var(--sp-font-title);
  font-weight: 700;
  cursor: pointer;
  transition: var(--sp-transition);
}

.smart-modal__btn-register:hover {
  background-color: rgba(42, 79, 218, 0.05) !important;
}

.smart-modal__label {
  font-family: var(--sp-font-title) !important;
  font-size: 14px !important;
  font-weight: 500 !important;
  text-transform: uppercase !important;
  color: var(--sp-text-main);
}

.smart-modal__search-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.smart-modal__search-wrapper {
  width: 100%;
}

.smart-modal__search-input {
  width: 100%;
  height: 40px;
  padding: 10px;
  border: var(--sp-border-label);
  border-radius: 4px;
  font-family: var(--sp-font-body);
  box-sizing: border-box;
}

/* MODAL DE FORMULÁRIO PJ (GRID E CORES) */
.smart-modal__content--form {
  margin-top: 20px;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  padding: 40px !important;
  gap: 12px !important;
  width: 90% !important;
  max-width: 662px !important;
  max-height: 90vh !important;
  background: #FFFFFF !important;
  box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.05) !important;
  border-radius: 16px !important;
  box-sizing: border-box !important;
  position: relative !important;
  overflow: hidden !important;
}

.smart-modal__content--form .smart-modal__close {
  position: absolute !important;
  top: 24px !important;
  right: 24px !important;
  font-size: 28px !important;
  color: #000000 !important;
}

.smart-modal__content--form .smart-modal__header {
  width: 100% !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: flex-start !important;
  padding: 0 !important;
  margin-bottom: 0 !important;
  border-bottom: none !important;
}

.smart-modal__content--form .smart-modal__title {
  font-family: "Campuni", sans-serif !important;
  font-weight: 700 !important;
  font-size: 24px !important;
  line-height: 26px !important;
  color: #000000 !important;
  margin: 0 !important;
}

.smart-modal__content--form .smart-modal__body {
  width: 100% !important;
  flex-grow: 1 !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  padding-right: 8px !important;
}

.smart-modal__pj-form {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 16px !important;
  width: 100% !important;
}

.smart-modal__form-group {
  display: flex !important;
  flex-direction: column !important;
  align-items: flex-start !important;
  gap: 8px !important;
  width: calc(50% - 8px) !important;
  border-radius: 8px !important;
}

.smart-modal__form-group--full {
  width: 100% !important;
}

.smart-modal__pj-form .smart-modal__input,
.smart-modal__pj-form .smart-modal__select {
  box-sizing: border-box !important;
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  width: 100% !important;
  height: 40px !important;
  background: #FAFCFE !important;
  border: 1px solid #E1E3E5 !important;
  border-radius: 8px !important;
  font-family: "Figtree", sans-serif !important;
  font-weight: 400 !important;
  font-size: 14px !important;
  color: #000000 !important;
  padding: 0 12px !important;
}

.smart-modal__pj-form .smart-modal__input::placeholder {
  color: rgba(0, 0, 0, 0.4) !important;
}

.smart-modal__pj-form .smart-modal__input:focus,
.smart-modal__pj-form .smart-modal__select:focus {
  outline: none !important;
  border-color: #000000 !important;
}

.smart-modal__pj-form .smart-modal__label {
  font-family: "Campuni", sans-serif !important;
  font-weight: 500 !important;
  font-size: 14px !important;
  line-height: 20px !important;
  text-transform: uppercase !important;
  color: #000000 !important;
  margin: 0 !important;
}

.smart-modal__select-wrapper {
  width: 100% !important;
  position: relative !important;
}

.smart-modal__select-wrapper .smart-modal__select {
  appearance: none !important;
  -webkit-appearance: none !important;
  cursor: pointer !important;
  padding-right: 40px !important;
}

.smart-modal__select-wrapper .smart-modal__chevron {
  position: absolute !important;
  right: 16px !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
  pointer-events: none !important;
  width: 20px !important;
  height: 11px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  color: #000000 !important;
}

.smart-modal__select-wrapper .smart-modal__chevron svg {
  fill: currentColor !important;
}

/* LISTA DE PARTICIPANTES DO MODAL GERAL */
.modal-list-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid #f5f5f5;
  background: var(--sp-bg-white);
  min-height: 50px;
}

.modal-list-left {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-grow: 1;
}

.modal-list-info {
  display: flex;
  flex-direction: column;
}

.modal-list-name {
  font-size: 14px;
  font-weight: 600;
  color: #333;
}

.modal-list-doc {
  font-size: 12px;
  color: #888;
}

.modal-list-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn-trash {
  background: transparent;
  border: none;
  cursor: pointer;
  color: var(--sp-color-danger);
  padding: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s;
}

.btn-trash svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.btn-trash:hover {
  opacity: 0.8;
  background-color: rgba(244, 69, 90, 0.1);
  border-radius: 4px;
  transform: scale(1.1);
}
/* ==========================================================================
   MODAL DE PERGUNTAS (EXTENSÃO)
   ========================================================================== */
.smart-modal__content--questions {
  height: 90%;
  max-height: 800px; 
  width: 650px; 
  max-width: 95%; 
  background: var(--sp-bg-white);
  border-radius: 16px;
  padding: 32px; 
  box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.05);
  display: flex;
  flex-direction: column;
  position: relative;
  box-sizing: border-box;
}

.smart-modal__content--questions .smart-modal__btn--primary {
    min-width: 280px;
}

.smart-modal__body--scrollable {
    flex: 1;
    width: 100%; 
    overflow-y: auto;
    padding: 0 12px 0 0 !important; 
}

/* ==========================================================================
   AGRUPAMENTO DE PERGUNTAS (QUESTION GROUP)
   ========================================================================== */
.question-product-group {
    border: 1px solid #c7d7ec;
    border-radius: 8px;
    padding: 1.25rem;
    margin-bottom: 1rem;
}

.question-participant-group__header {
    display: flex;
    align-items: center;
    flex-direction: row;
    gap: 0.5rem;
    margin-top: 16px;
}

.question-product-group .smart-modal__cart-item {
    margin: 0px;
}


.question-group:last-child {
    margin-bottom: 0;
}

.question-group__header {
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px dashed #cbd5e1;
}

.question-group__participant-wrapper {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.25rem;
}

.question-group__participant-wrapper .participant-form__icon {
    width: 20px; 
    display: flex;
    color: #005ce5;
}

.question-group__participant-name {
    font-size: 1rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0;
}

.question-participant-group__name {
    font-family: var(--sp-font-title) !important;
    text-transform: uppercase !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    color: #0041d9 !important;
    margin: 0;
}

.question-group__product-name {
    font-size: 0.85rem;
    color: #64748b;
    margin: 0;
    display: flex;
    align-items: center;
}

.question-group__fields {
    display: flex;
    flex-direction: column;
    gap: 1rem; 
}

.question-group__fields .smart-form-group {
    margin-bottom: 0; 
}


/* RESPONSIVIDADE DOS MODAIS */
@media (max-width: 700px) {

  .smart-modal__cart-item {
    width: 100%;
    margin: 0px;
  }

  .smart-modal__company-display {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 6px;
}

  .smart-modal__cart-item .cart-item__body {
    margin-top: 10px;
    margin-bottom: 10px;
    justify-content: flex-start;
  }

  .smart-modal__cart-item .cart-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 0;
    background-color: transparent;
    border: none;
    box-shadow: none;
    margin: 0;
  }

  .smart-modal__content--general,
  .smart-modal__content--remove,
  .smart-modal__content--form {
    width: 100% !important;
    height: 100% !important;
    padding: 24px !important;
    max-height: 100% !important;
    max-width: 100% !important;
  }

  .smart-modal__title {
    font-family: var(--sp-font-title) !important;
    margin: 0 !important;
    font-size: 23px !important;
    font-weight: 700 !important;
    color: var(--sp-text-main);
}

  .smart-modal__actions {
    margin-top: auto !important;
    flex-direction: column-reverse !important;
  }

  .smart-modal__btn {
    width: 100% !important;
  }

  .smart-modal__cart-item .cart-item__media {
    width: 100% !important;
    height: auto !important;
  }

  .smart-modal__pj-form {
    flex-direction: column !important;
  }

  .smart-modal__form-group {
    width: 100% !important;
  }

  .smart-modal__content--questions {
    width: 100% !important;
    height: 100% !important;
    max-height: 100% !important;
    max-width: 100% !important;
    padding: 16px !important;
  }
}
