/**
 * SINDILEQ-CE - Estilos do Formulário de Afiliação Digital
 * Layout 1140px Contínuo, Responsivo e Moderno
 */

:root {
  --sind-navy: #001A5C;
  --sind-cyan: #00A3E0;
  --sind-dark: #0A1128;
  --sind-text: #1E293B;
  --sind-muted: #64748B;
  --sind-border: #CBD5E1;
  --sind-bg-light: #F8FAFC;
  --sind-error: #EF4444;
  --sind-success: #10B981;
  --sind-font-title: 'Outfit', sans-serif;
  --sind-font-body: 'Plus Jakarta Sans', sans-serif;
}

.sindileq-afiliacao-wrapper {
  width: 100%;
  margin: 0 auto;
  box-sizing: border-box;
}

.sindileq-form-core {
  width: 100%;
  max-width: 1140px;
  background: transparent;
  border: none;
  border-radius: 0;
  box-shadow: none;
  padding: 10px 0;
  display: flex;
  flex-direction: column;
  gap: 22px;
  margin: 0 auto;
  font-family: var(--sind-font-body);
  color: var(--sind-text);
  box-sizing: border-box;
}

.sindileq-form-core *,
.sindileq-form-core *::before,
.sindileq-form-core *::after {
  box-sizing: border-box;
}

/* 1. SELETOR SIMPLES NACIONAL */
.form-row-center {
  display: flex;
  justify-content: center;
  margin-bottom: 6px;
}

.simples-selector-wrap {
  text-align: center;
  background: #F8FAFC;
  border: 1.5px solid #E2E8F0;
  border-radius: 12px;
  padding: 16px 28px;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.simples-main-label {
  font-size: 0.96rem;
  font-weight: 700;
  color: var(--sind-navy);
  display: flex;
  align-items: center;
  gap: 8px;
}

.simples-main-label i {
  color: var(--sind-cyan);
}

.simples-options-group {
  display: flex;
  gap: 12px;
  justify-content: center;
}

.simples-pill-option {
  cursor: pointer;
  display: inline-block;
  user-select: none;
  margin: 0;
}

.simples-pill-option input[type="radio"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.pill-box {
  background: #FFFFFF;
  border: 1.5px solid #CBD5E1;
  border-radius: 24px;
  padding: 8px 22px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.92rem;
  color: var(--sind-text);
  transition: all 0.2s ease;
}

.simples-pill-option:hover .pill-box {
  border-color: #94A3B8;
  background: #F1F5F9;
}

.pill-radio-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid #94A3B8;
  display: inline-block;
  transition: all 0.2s ease;
}

.simples-pill-option input[type="radio"]:checked + .pill-box {
  background: #F0F9FF;
  border-color: var(--sind-cyan);
  color: var(--sind-navy);
  box-shadow: 0 2px 8px rgba(0, 163, 224, 0.18);
}

.simples-pill-option input[type="radio"]:checked + .pill-box .pill-radio-dot {
  border-color: var(--sind-cyan);
  background-color: var(--sind-cyan);
}

/* 2. GRID DE CAMPOS */
.form-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 16px 14px;
}

.col-12 { grid-column: span 12; }
.col-md-2 { grid-column: span 2; }
.col-md-3 { grid-column: span 3; }
.col-md-4 { grid-column: span 4; }
.col-md-7 { grid-column: span 7; }
.col-md-8 { grid-column: span 8; }

.form-col {
  display: flex;
  flex-direction: column;
}

.form-col label {
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--sind-text);
  margin-bottom: 5px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.req {
  color: var(--sind-error);
  font-weight: 700;
  margin-left: 2px;
}

.opt {
  font-weight: 400;
  color: var(--sind-muted);
  font-size: 0.74rem;
}

/* WRAPPER E INPUTS */
.input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.input-icon {
  position: absolute;
  left: 12px;
  color: #94A3B8;
  font-size: 0.92rem;
  pointer-events: none;
  z-index: 2;
  transition: color 0.2s ease;
}

.input-wrap input,
.input-wrap select {
  width: 100%;
  height: 44px;
  background-color: #FFFFFF;
  border: 1.5px solid #CBD5E1;
  border-radius: 8px;
  padding: 8px 12px 8px 38px;
  font-size: 0.92rem;
  font-family: var(--sind-font-body);
  color: var(--sind-text);
  transition: all 0.2s ease;
  outline: none;
}

.input-wrap input::placeholder {
  color: #94A3B8;
  font-size: 0.88rem;
}

.input-wrap input:focus,
.input-wrap select:focus {
  border-color: var(--sind-cyan);
  box-shadow: 0 0 0 3px rgba(0, 163, 224, 0.16);
  background-color: #FFFFFF;
}

.input-wrap input:focus ~ .input-icon,
.input-wrap select:focus ~ .input-icon {
  color: var(--sind-cyan);
}

.form-col.has-error input,
.form-col.has-error select {
  border-color: var(--sind-error);
  background-color: #FFF5F5;
}

.form-col.has-error .input-icon {
  color: var(--sind-error);
}

.input-hint, .field-hint {
  font-size: 0.73rem;
  color: var(--sind-muted);
  margin-top: 3px;
}

.field-error {
  font-size: 0.76rem;
  color: var(--sind-error);
  font-weight: 600;
  margin-top: 4px;
  display: none;
}

.form-col.has-error .field-error {
  display: block;
}

.text-center {
  text-align: center;
}

.btn-lookup-addon {
  position: absolute;
  right: 5px;
  background: var(--sind-navy);
  color: #FFFFFF;
  border: none;
  border-radius: 6px;
  padding: 6px 11px;
  font-size: 0.76rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: background 0.2s ease;
  z-index: 3;
}

.btn-lookup-addon:hover {
  background: var(--sind-cyan);
}

.spinner-inline {
  position: absolute;
  right: 12px;
  width: 16px;
  height: 16px;
  border: 2px solid #CBD5E1;
  border-top-color: var(--sind-cyan);
  border-radius: 50%;
  animation: sindileq-spin 0.7s linear infinite;
  z-index: 3;
}

@keyframes sindileq-spin {
  to { transform: rotate(360deg); }
}

/* 3. ANEXOS (DRAG & DROP) */
.anexos-block {
  background: #F8FAFC;
  border: 1px solid #E2E8F0;
  border-radius: 12px;
  padding: 22px;
}

.anexos-header {
  text-align: center;
  margin-bottom: 14px;
}

.anexos-title {
  font-family: var(--sind-font-title);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--sind-navy);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
}

.anexos-title i {
  color: var(--sind-cyan);
}

.anexos-subtitle {
  font-size: 0.88rem;
  color: var(--sind-text);
  font-weight: 600;
  margin-top: 2px;
  margin-bottom: 0;
}

.upload-dropzone-box {
  border: 2px dashed #94A3B8;
  border-radius: 10px;
  padding: 26px 16px;
  text-align: center;
  background: #FFFFFF;
  cursor: pointer;
  position: relative;
  transition: all 0.2s ease;
}

.upload-dropzone-box:hover,
.upload-dropzone-box.dragover {
  border-color: var(--sind-cyan);
  background: #F0F9FF;
}

.hidden-file-input {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
  z-index: 5;
}

.dropzone-circle-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #E0F5FC;
  color: var(--sind-cyan);
  font-size: 1.4rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 10px;
}

.dropzone-main-text {
  font-size: 0.9rem;
  color: var(--sind-text);
  margin-bottom: 12px;
}

.link-highlight {
  color: var(--sind-cyan);
  font-weight: 600;
  text-decoration: underline;
}

.dropzone-chips-line {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
}

.chip-tag {
  background: #F1F5F9;
  border: 1px solid #CBD5E1;
  color: var(--sind-muted);
  font-size: 0.74rem;
  font-weight: 500;
  padding: 4px 10px;
  border-radius: 16px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.selected-files-list {
  margin-top: 14px;
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: 8px;
  padding: 14px;
}

.files-list-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  color: var(--sind-navy);
  font-weight: 600;
  margin-bottom: 10px;
}

.btn-clear-files {
  background: transparent;
  border: none;
  color: var(--sind-error);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
}

.files-items-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 8px;
}

.file-box {
  background: #F8FAFC;
  border: 1px solid #E2E8F0;
  border-radius: 6px;
  padding: 8px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.file-box-info {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow: hidden;
}

.file-box-icon {
  width: 28px;
  height: 28px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  flex-shrink: 0;
}

.file-box-icon.pdf { color: #DC2626; background: #FEE2E2; }
.file-box-icon.image { color: #2563EB; background: #DBEAFE; }
.file-box-icon.doc { color: #0284C7; background: #E0F2FE; }

.file-box-details { overflow: hidden; }
.file-box-details .name {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--sind-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
}
.file-box-details .size {
  font-size: 0.68rem;
  color: var(--sind-muted);
}

.btn-remove-one {
  background: transparent;
  border: none;
  color: #94A3B8;
  cursor: pointer;
  padding: 4px;
}
.btn-remove-one:hover { color: var(--sind-error); }

/* 4. TERMO FINANCEIRO */
.financial-term-card {
  background: #FFFBEB;
  border: 1.5px solid #FDE68A;
  border-radius: 12px;
  padding: 20px 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.term-badge-tag {
  display: inline-block;
  align-self: flex-start;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  color: #92400E;
  background: #FEF3C7;
  padding: 3px 10px;
  border-radius: 12px;
  border: 1px solid #FCD34D;
}

.term-text-body {
  font-size: 0.92rem;
  color: #78350F;
  line-height: 1.55;
  margin: 0;
}

.term-text-body strong {
  color: #451A03;
}

/* 5. CONFORMIDADE LGPD */
.lgpd-term-card {
  background: #F0FDF4;
  border: 1.5px solid #BBF7D0;
  border-radius: 12px;
  padding: 20px 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.lgpd-badge-tag {
  display: inline-block;
  align-self: flex-start;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  color: #166534;
  background: #DCFCE7;
  padding: 3px 10px;
  border-radius: 12px;
  border: 1px solid #86EFAC;
}

.lgpd-text-body {
  font-size: 0.88rem;
  color: #14532D;
  line-height: 1.55;
  margin: 0;
}

/* CHECKBOXES ESTILIZADOS */
.term-checkbox-label {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  background: #FFFFFF;
  border: 1.5px solid #CBD5E1;
  border-radius: 8px;
  padding: 12px 16px;
  transition: all 0.2s ease;
  margin: 0;
}

.term-checkbox-label:hover {
  background: #F8FAFC;
  border-color: #94A3B8;
}

.term-checkbox-label input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.custom-chk {
  width: 20px;
  height: 20px;
  background: #FFFFFF;
  border: 2px solid #94A3B8;
  border-radius: 5px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.custom-chk::after {
  content: '\f00c';
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
  color: #FFFFFF;
  font-size: 0.7rem;
  opacity: 0;
  transform: scale(0.4);
  transition: all 0.2s ease;
}

.term-checkbox-label input[type="checkbox"]:checked ~ .custom-chk {
  background: var(--sind-navy);
  border-color: var(--sind-navy);
}

.term-checkbox-label input[type="checkbox"]:checked ~ .custom-chk::after {
  opacity: 1;
  transform: scale(1);
}

.chk-text {
  font-size: 0.86rem;
  color: var(--sind-text);
  line-height: 1.4;
}

/* ALERTA GLOBAL DE ERRO */
.sindileq-global-alert-error {
  background: #FEF2F2;
  border: 1.5px solid #F87171;
  color: #991B1B;
  padding: 14px 18px;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 600;
}

/* 6. BOTÃO DE ENVIO */
.form-submit-row {
  margin-top: 12px;
  width: 100%;
  display: flex;
  justify-content: center;
}

.btn-sindileq-submit {
  width: 100%;
  min-height: 54px;
  background-color: #001A5C;
  background: linear-gradient(135deg, #001A5C 0%, #0B2B7D 100%);
  color: #FFFFFF !important;
  font-family: var(--sind-font-title);
  font-size: 1.15rem;
  font-weight: 700;
  padding: 16px 32px;
  border-radius: 12px;
  border: none;
  cursor: pointer;
  display: flex !important;
  align-items: center;
  justify-content: center;
  gap: 12px;
  box-shadow: 0 6px 20px rgba(0, 26, 92, 0.25);
  transition: all 0.25s ease;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  visibility: visible !important;
  opacity: 1 !important;
}

.btn-sindileq-submit:hover {
  background-color: #00A3E0;
  background: linear-gradient(135deg, #0B2B7D 0%, #00A3E0 100%);
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(0, 163, 224, 0.35);
  color: #FFFFFF !important;
}

.btn-sindileq-submit:disabled {
  opacity: 0.65 !important;
  cursor: not-allowed;
  transform: none;
}

/* 7. MODAL DE SUCESSO COM PROTOCOLO */
.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 17, 61, 0.7);
  backdrop-filter: blur(5px);
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.modal-dialog {
  background: #FFFFFF;
  border-radius: 14px;
  max-width: 520px;
  width: 100%;
  padding: 32px 26px;
  text-align: center;
  box-shadow: 0 20px 40px rgba(0, 26, 92, 0.2);
}

.modal-icon-success {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: #ECFDF5;
  color: var(--sind-success);
  font-size: 2.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  box-shadow: 0 0 0 6px rgba(16, 185, 129, 0.12);
}

.modal-dialog-title {
  font-family: var(--sind-font-title);
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--sind-navy);
  margin-bottom: 8px;
}

.modal-dialog-desc {
  font-size: 0.9rem;
  color: var(--sind-muted);
  line-height: 1.5;
  margin-bottom: 20px;
}

.protocol-card {
  background: #F8FAFC;
  border: 1px solid #E2E8F0;
  border-radius: 8px;
  padding: 14px 18px;
  margin-bottom: 20px;
  text-align: left;
}

.protocol-line {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 0;
  font-size: 0.86rem;
  border-bottom: 1px dashed #CBD5E1;
}

.protocol-line:last-child {
  border-bottom: none;
}

.protocol-line span {
  color: var(--sind-muted);
}

.protocol-line strong {
  color: var(--sind-navy);
  font-family: var(--sind-font-title);
}

.modal-buttons {
  display: flex;
  gap: 12px;
  justify-content: center;
}

.btn-modal-close,
.btn-modal-print {
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 0.92rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s ease;
}

.btn-modal-close {
  background: var(--sind-navy);
  color: #FFFFFF;
  border: none;
}

.btn-modal-close:hover {
  background: var(--sind-cyan);
}

.btn-modal-print {
  background: #FFFFFF;
  color: var(--sind-text);
  border: 1.5px solid #CBD5E1;
}

.btn-modal-print:hover {
  background: #F1F5F9;
  border-color: #94A3B8;
}

/* RESPONSIVIDADE */
@media (max-width: 768px) {
  .sindileq-form-core {
    padding: 16px 10px;
    gap: 16px;
  }
  .simples-selector-wrap {
    width: 100%;
    padding: 14px 16px;
  }
  .col-md-2, .col-md-3, .col-md-4, .col-md-7, .col-md-8 {
    grid-column: span 12;
  }
  .modal-buttons {
    flex-direction: column;
  }
}
