/* ==========================================================
   Clubul National de Agility – Formular de Aderare
   ========================================================== */

/* ---- Reset de baza ---- */
.cna-wrap *,
.cna-wrap *::before,
.cna-wrap *::after {
  box-sizing: border-box;
}

/* ---- Container principal ---- */
.cna-wrap {
  max-width: 860px;
  margin: 0 auto;
  font-family: 'Segoe UI', Arial, sans-serif;
  font-size: 15px;
  color: #333;
  line-height: 1.5;
}

/* ---- Mesaj succes ---- */
.cna-success-box {
  background: #eafaf1;
  border: 2px solid #27ae60;
  border-radius: 8px;
  padding: 30px 36px;
  text-align: center;
  margin-bottom: 20px;
}
.cna-success-icon {
  font-size: 52px;
  color: #27ae60;
  line-height: 1;
  margin-bottom: 12px;
}
.cna-success-box h3 {
  color: #1e8449;
  font-size: 22px;
  margin: 0 0 10px;
}
.cna-success-box p {
  margin: 0;
  color: #2c7a4b;
}

/* ---- Header formular ---- */
.cna-form-header {
  text-align: center;
  padding: 24px 0 16px;
  border-bottom: 3px solid #1a5276;
  margin-bottom: 28px;
}
.cna-form-header h2 {
  font-size: 20px;
  font-weight: 700;
  color: #1a5276;
  margin: 0 0 6px;
  letter-spacing: 0.5px;
}
.cna-form-header h3 {
  font-size: 17px;
  font-weight: 600;
  color: #2e86c1;
  margin: 0 0 4px;
}
.cna-subtitle {
  font-style: italic;
  color: #555;
  margin: 0;
  font-size: 14px;
}

/* ---- Sectiuni (fieldset) ---- */
.cna-section {
  border: none;
  border-left: 4px solid #2e86c1;
  background: #fafcff;
  border-radius: 0 6px 6px 0;
  padding: 20px 24px;
  margin: 0 0 22px;
}
.cna-section-legend {
  display: inline-block;
  font-size: 14px;
  font-weight: 700;
  color: #1a5276;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  background: #fff;
  padding: 3px 10px;
  border-radius: 4px;
  border: 1px solid #d0e4f7;
  margin-bottom: 14px;
}
.cna-section-note {
  font-size: 13px;
  color: #666;
  background: #fff8e1;
  border-left: 3px solid #f0c040;
  padding: 8px 12px;
  border-radius: 0 4px 4px 0;
  margin: 0 0 14px;
}

/* ---- Grid rows ---- */
.cna-row {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 16px;
}
.cna-row:last-child {
  margin-bottom: 0;
}

/* ---- Coloane ---- */
.cna-col        { display: flex; flex-direction: column; min-width: 0; }
.cna-col-full   { flex: 1 1 100%; }
.cna-col-half   { flex: 1 1 calc(50% - 8px); min-width: 180px; }

/* Adresa */
.cna-row-address { align-items: flex-end; }
.cna-col-street  { flex: 2 1 200px; }
.cna-col-short   { flex: 0 1 70px; min-width: 50px; }

/* Data */
.cna-row-date     { align-items: flex-end; }
.cna-col-date-day   { flex: 0 1 90px; }
.cna-col-date-month { flex: 1 1 160px; }
.cna-col-date-year  { flex: 0 1 100px; }

/* ---- Labels ---- */
.cna-label {
  font-size: 13px;
  font-weight: 600;
  color: #444;
  margin-bottom: 5px;
}
.cna-req {
  color: #c0392b;
  font-size: 15px;
}

/* ---- Inputuri ---- */
.cna-input {
  width: 100%;
  padding: 9px 12px;
  border: 1.5px solid #bdc3c7;
  border-radius: 5px;
  font-size: 14px;
  color: #333;
  background: #fff;
  transition: border-color 0.2s, box-shadow 0.2s;
  appearance: none;
  -webkit-appearance: none;
}
.cna-input:focus {
  outline: none;
  border-color: #2e86c1;
  box-shadow: 0 0 0 3px rgba(46,134,193,0.15);
}
.cna-input.cna-input-error {
  border-color: #e74c3c;
  box-shadow: 0 0 0 3px rgba(231,76,60,0.12);
}
select.cna-input {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23666' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  padding-right: 32px;
}

/* ---- File input ---- */
.cna-file-input {
  font-size: 13px;
  color: #555;
  cursor: pointer;
}
.cna-file-hint {
  font-size: 11px;
  color: #888;
  margin-top: 4px;
}

/* ---- Erori campuri ---- */
.cna-field-error {
  display: block;
  font-size: 12px;
  color: #e74c3c;
  margin-top: 4px;
  min-height: 16px;
}

/* ---- Secțiune declarație legală ---- */
.cna-decl-section {
  border-left-color: #1a5276;
}
.cna-legal-text {
  background: #f4f6f8;
  border: 1px solid #d5d8dc;
  border-radius: 6px;
  padding: 18px 22px;
  font-size: 13.5px;
  color: #2c3e50;
  line-height: 1.7;
}
.cna-legal-text p {
  margin: 0 0 14px;
}
.cna-legal-heading {
  font-size: 13px;
  font-weight: 700;
  color: #1a5276;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  margin: 16px 0 8px;
  padding-bottom: 4px;
  border-bottom: 1px solid #aed6f1;
}
.cna-legal-list {
  margin: 0 0 4px 20px;
  padding: 0;
}
.cna-legal-list li {
  margin-bottom: 8px;
}
.cna-legal-list li:last-child {
  margin-bottom: 0;
}

/* ---- Bloc informații plată ---- */
.cna-payment-box {
  background: #eaf4fb;
  border: 1.5px solid #2e86c1;
  border-radius: 8px;
  padding: 16px 20px;
  margin-bottom: 20px;
}
.cna-payment-title {
  font-weight: 700;
  color: #1a5276;
  font-size: 14px;
  margin-bottom: 8px;
}
.cna-iban {
  font-family: 'Courier New', Courier, monospace;
  font-size: 18px;
  font-weight: 700;
  color: #154360;
  background: #fff;
  border: 1.5px solid #aed6f1;
  border-radius: 5px;
  padding: 8px 14px;
  display: inline-block;
  letter-spacing: 1px;
  margin: 6px 0 10px;
}
.cna-payment-note {
  font-size: 12.5px;
  color: #555;
  margin: 4px 0 0;
}

/* ---- GDPR Section ---- */
.cna-gdpr-section {
  border-left-color: #8e44ad;
}
.cna-gdpr-intro {
  background: #f5eef8;
  border-left: 3px solid #8e44ad;
  padding: 10px 14px;
  border-radius: 0 4px 4px 0;
  margin-bottom: 16px;
  font-size: 13px;
}
.cna-gdpr-intro ul {
  margin: 6px 0 0 18px;
  padding: 0;
}
.cna-gdpr-intro li {
  margin-bottom: 3px;
}

/* ---- GDPR detalii expandabile ---- */
.cna-gdpr-details {
  background: #fdf9ff;
  border: 1.5px solid #c39bd3;
  border-radius: 6px;
  margin-bottom: 18px;
  overflow: hidden;
}
.cna-gdpr-summary {
  cursor: pointer;
  padding: 12px 16px;
  font-weight: 700;
  font-size: 13.5px;
  color: #6c3483;
  list-style: none;
  display: flex;
  align-items: flex-start;
  gap: 8px;
  user-select: none;
}
.cna-gdpr-summary::-webkit-details-marker { display: none; }
.cna-gdpr-summary::before {
  content: '\25B6';
  font-size: 10px;
  margin-top: 3px;
  flex-shrink: 0;
  transition: transform 0.2s;
}
.cna-gdpr-details[open] .cna-gdpr-summary::before {
  transform: rotate(90deg);
}
.cna-gdpr-summary-hint {
  font-weight: 400;
  font-size: 12px;
  color: #888;
}
.cna-gdpr-text {
  padding: 0 18px 18px;
  border-top: 1px solid #e8d5f5;
}
.cna-gdpr-regulation {
  font-size: 12px;
  color: #777;
  margin: 12px 0 10px;
}
.cna-gdpr-list {
  margin: 0;
  padding-left: 22px;
}
.cna-gdpr-list li {
  font-size: 13px;
  color: #444;
  margin-bottom: 10px;
  line-height: 1.6;
}
.cna-gdpr-list li:last-child {
  margin-bottom: 0;
}
.cna-gdpr-optional {
  display: block;
  font-size: 12px;
  color: #8e44ad;
  margin-top: 4px;
}

/* ---- Checkbox custom ---- */
.cna-checkbox-group {
  margin-bottom: 14px;
}
.cna-checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  cursor: pointer;
}
.cna-checkbox {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}
.cna-checkmark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  min-width: 20px;
  border: 2px solid #8e44ad;
  border-radius: 4px;
  background: #fff;
  transition: background 0.2s, border-color 0.2s;
  margin-top: 2px;
}
.cna-checkbox:checked + .cna-checkmark {
  background: #8e44ad;
  border-color: #8e44ad;
}
.cna-checkbox:checked + .cna-checkmark::after {
  content: '';
  display: block;
  width: 5px;
  height: 9px;
  border: 2px solid #fff;
  border-top: none;
  border-left: none;
  transform: rotate(42deg) translate(-1px, -1px);
}
.cna-checkbox:focus + .cna-checkmark {
  box-shadow: 0 0 0 3px rgba(142,68,173,0.2);
}
.cna-checkbox-text {
  font-size: 13.5px;
  color: #444;
  line-height: 1.5;
}

/* ---- Semnatura ---- */
.cna-signature-wrap {
  position: relative;
  border: 2px dashed #bdc3c7;
  border-radius: 6px;
  background: #fff;
  overflow: hidden;
  cursor: crosshair;
  transition: border-color 0.2s;
}
.cna-signature-wrap:hover,
.cna-signature-wrap.active {
  border-color: #2e86c1;
}
.cna-signature-wrap.error {
  border-color: #e74c3c;
}
.cna-sig-canvas {
  display: block;
  width: 100%;
  height: 160px;
  touch-action: none;
}
.cna-sig-placeholder {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: #bbb;
  font-size: 15px;
  pointer-events: none;
  white-space: nowrap;
  transition: opacity 0.2s;
}
.cna-sig-canvas.has-drawn + .cna-sig-placeholder {
  display: none;
}
.cna-sig-controls {
  margin-top: 8px;
}
.cna-btn-secondary {
  background: none;
  border: 1.5px solid #bdc3c7;
  border-radius: 5px;
  padding: 6px 14px;
  font-size: 13px;
  color: #666;
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s;
}
.cna-btn-secondary:hover {
  border-color: #e74c3c;
  color: #e74c3c;
}

/* ---- Declaratie ---- */
.cna-declaration {
  background: #eaf4fb;
  border: 1px solid #aed6f1;
  border-radius: 6px;
  padding: 14px 18px;
  margin: 0 0 20px;
  font-size: 13.5px;
  color: #1a5276;
}
.cna-declaration strong {
  color: #1a5276;
}

/* ---- Submit ---- */
.cna-submit-wrap {
  text-align: center;
  padding: 10px 0 20px;
}
.cna-btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: #1a5276;
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 14px 36px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
  letter-spacing: 0.3px;
}
.cna-btn-primary:hover {
  background: #154360;
}
.cna-btn-primary:active {
  transform: scale(0.98);
}
.cna-btn-primary:disabled {
  background: #7f8c8d;
  cursor: not-allowed;
}

/* ---- Spinner ---- */
.cna-spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255,255,255,0.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: cna-spin 0.7s linear infinite;
}
@keyframes cna-spin {
  to { transform: rotate(360deg); }
}

/* ---- Eroare globala ---- */
.cna-global-error {
  margin-top: 14px;
  background: #fdecea;
  border: 1px solid #e74c3c;
  border-radius: 6px;
  padding: 12px 16px;
  color: #c0392b;
  font-size: 14px;
}

/* ---- Responsive ---- */
@media (max-width: 620px) {
  .cna-section {
    padding: 16px 14px;
  }
  .cna-col-half {
    flex: 1 1 100%;
  }
  .cna-col-street {
    flex: 1 1 100%;
  }
  .cna-col-short {
    flex: 1 1 calc(33% - 8px);
  }
  .cna-col-date-month {
    flex: 1 1 100%;
  }
  .cna-btn-primary {
    width: 100%;
    padding: 14px 20px;
  }
  .cna-sig-placeholder {
    font-size: 13px;
  }
}
