/* KI Registrations - CSS Styles (ThemeCo PRO compatible, responsive, EAA compliant) */

.ki-reg {
  max-width: 800px;
  margin: 0 auto;
  padding: 0;
  color: var(#1d1d1b, #222);
}

.ki-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
}

.ki-header img {
  height: 50px;
}

select.ki-lang-select {
    height: 3.25em;
    border-radius: 8px;
    padding: 0 1rem;
    transition: all 0.3s;
    width: 150px;
    font-size: 1rem;
}

.ki-lang-buttons {
    display: flex;
    flex-wrap: nowrap;
    flex-direction: row;
    align-content: center;
    justify-content: space-evenly;
}

.ki-lang-buttons button {
  background: none;
  border: 1px solid #ccc;
  margin: 0 0.15rem;
  padding: 0.2rem 1rem;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.3s;
}

.ki-lang-buttons button.active,
.ki-lang-buttons button:hover,
.ki-controls button.active,
.ki-controls button:hover {
  background: var(--ki-primary-color, #0055ff);
  color: #fff;
}

.ki-controls {
    display: flex;
    flex-direction: row;
    align-content: center;
    justify-content: space-evenly;
    margin: 0 0 2em 0;
}

.ki-controls button {
    margin-right: 0.5rem;
    background: #eee;
    border: none;
    border-radius: 8px;
    padding: 0.5rem 1rem;
    cursor: pointer;
    transition: all 0.3s;
    height: 3.25em;
}

.ki-step {
  display: none;
  animation: fadeIn 0.4s ease;
}

.ki-step.active {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.ki-age-buttons {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin-top: 2rem;
}

.ki-age-buttons button {
  background: var(--ki-primary-color, #0055ff);
  color: #fff;
  font-size: 1.25rem;
  padding: 1rem 2rem;
  border: none;
  border-radius: 1rem;
  cursor: pointer;
  transition: transform 0.2s, background 0.3s;
}

.ki-age-buttons button:hover {
  transform: scale(1.05);
  background: var(--ki-primary-color, #0055ff);
}

.ki-note {
  margin-top: 1.5rem;
  text-align: center;
  font-size: 0.9rem;
  color: #555;
}

.ki-row {
  margin-bottom: 1rem;
}

.ki-row input, .ki-row select, .ki-row input#birthdate, input#email, .ki-row input#g_birthdate, input#g_email {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid #ccc;
  border-radius: 8px;
  font-size: 1rem;
  line-height: 1.7;
  height: 3.35em;
}

.ki-row input:focus, .ki-row select:focus {
  outline: none;
  border-color: var(--ki-primary-color, #0055ff);
  box-shadow: 0 0 0 2px rgba(0, 85, 255, 0.2);
}

.ki-row.ki-gender {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-content: center;
    justify-content: space-evenly;
}

.ki-gender button {
  margin-right: 0.5rem;
  background: #eee;
  border: none;
  border-radius: 8px;
  padding: 0.5rem 1rem;
  cursor: pointer;
  transition: all 0.3s;
}
.ki-gender button:hover {
    background: var(--ki-primary-color, #0055ff);
    color: #fff;
}

.ki-gender button.active {
  background: var(--ki-primary-color, #0055ff);
  color: #fff;
}

.ki-gender button.sel {
    background-color: var(--ki-primary-color);
    color: white;
}

.ki-actions {
    display: flex;
    margin-top: 1rem;
    flex-direction: row;
    flex-wrap: nowrap;
    align-content: center;
    justify-content: space-evenly;
}

.ki-actions button {
  background: var(--ki-primary-color, #0055ff);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
  cursor: pointer;
  transition: background 0.3s;
}

.ki-actions button:disabled {
  background: #ccc;
  cursor: not-allowed;
}

.ki-signature canvas {
  border: 2px dashed #ccc;
  border-radius: 12px;
  width: 100%;
  height: 200px;
  touch-action: none;
}

.ki-sign-actions {
  text-align: right;
  margin-top: 0.5rem;
}

.ki-sign-actions button {
  background: #eee;
  border: 1px solid #ccc;
  border-radius: 8px;
  padding: 0.5rem 1rem;
  cursor: pointer;
}

/* Result step */
.ki-result {
  text-align: center;
  padding: 3rem 1rem;
}

.ki-result.success::before {
  content: '\2714';
  display: block;
  font-size: 6rem;
  color: green;
  margin-bottom: 1rem;
}

.ki-result.error::before {
  content: '\2716';
  display: block;
  font-size: 6rem;
  color: red;
  margin-bottom: 1rem;
}

.ki-result button {
  background: var(--ki-primary-color, #0055ff);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 0.75rem 1.5rem;
  cursor: pointer;
}

.ki-success {
    font-size: 5em;
    color: green;
}

.ki-fail {
    font-size: 5em;
    color: red;
}

/* Countdown overlay */
#ki-countdown-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.5);
  color: #fff;
  font-size: 3rem;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  display: none;
}

.ki-countdown-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.75);
  display: flex;
  justify-content: center;
  align-items: center;
  color: #fff;
  font-size: 5rem;
  z-index: 9999;
  transition: opacity 0.3s ease;
}
.ki-countdown-num {
  font-weight: bold;
  animation: pulse 1s infinite alternate;
}
@keyframes pulse {
  from { transform: scale(1); opacity: 1; }
  to { transform: scale(1.2); opacity: 0.7; }
}


/* Responsive */
@media (max-width: 600px) {
  .ki-age-buttons { flex-direction: column; gap: 1rem; }
  .ki-actions { text-align: center; }
  .ki-header { flex-direction: column; gap: 1rem; }
  .ki-lang-buttons button { padding: 0.25rem 0.5rem; font-size: 0.9rem; }
}

input#iti-0__search-input {
    font-size: 1rem;
    margin-left: 30px;
}

.ki-invalid {
    border: 1px solid red !important;
    background-color: #ffeeee;
}
.ki-hint {
    display: none;
    visibility: hidden;
    height: 0;
}

.ki-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.65);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  animation: fadeIn 0.3s ease;
}
.ki-modal {
  background: #fff;
  border-radius: 1rem;
  max-width: 400px;
  width: 90%;
  padding: 1.5rem;
  box-shadow: 0 10px 40px rgba(0,0,0,0.2);
  text-align: center;
  animation: slideUp 0.3s ease;
}
.ki-modal h3 {
  margin-bottom: 0.5rem;
  font-size: 1.25rem;
}
.ki-modal p {
  margin: 0.5rem 0 1rem;
  line-height: 1.5;
}
.ki-modal-actions {
  display: flex;
  justify-content: center;
}
.ki-modal-close {
  background: #0073aa;
  color: #fff;
  border: none;
  padding: 0.6rem 1.2rem;
  border-radius: 0.5rem;
  cursor: pointer;
  font-size: 1rem;
}
.ki-modal-close:hover {
  background: #005d87;
}
@keyframes fadeIn {
  from { opacity: 0; } to { opacity: 1; }
}
@keyframes slideUp {
  from { transform: translateY(30px); opacity: 0; } to { transform: translateY(0); opacity: 1; }
}

.ki-progress-bar{display:flex;gap:8px;margin:2em 0;}
.ki-progress-step{flex:1;height:2em;width:2em;font-size:0.8em;text-align:center;background:transparent;border-radius:20em;opacity:0.4;transition:0.3s;}
.ki-progress-step.active{background:var(--ki-primary-color, #0055ff);color:#555;opacity:1;}
