/* Formulario público de instaladores (/instaladores). Todos los colores salen de los
   tokens --tc-p-* del sitio (navbar-footer.css), así que funciona en oscuro y claro. */

.tc-inst-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 24px;
}
.tc-inst-subtitle { color: var(--tc-p-text-dim); }

.tc-inst-clear {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 16px;
    border-radius: 999px;
    border: 1.5px solid var(--tc-p-input-border);
    background: transparent;
    color: var(--tc-p-text);
    font-size: 13px;
    font-weight: 600;
    transition: border-color .15s ease, color .15s ease;
}
.tc-inst-clear:hover { border-color: var(--tc-p-orange); color: var(--tc-p-orange); }

/* Tarjetas: el fondo es --tc-p-surface y los campos "suben" con --tc-p-field-bg para que
   se despeguen del fondo oscuro. */
.tc-inst-card {
    background: var(--tc-p-surface);
    border: 1px solid var(--tc-p-border);
    border-radius: 20px;
    padding: 28px;
    margin-bottom: 20px;
}
.tc-inst-section-title {
    font-size: 17px;
    font-weight: 700;
    color: var(--tc-p-text);
    margin-bottom: 18px;
}
.tc-inst-branch-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 18px;
}
.tc-inst-branch-head .tc-inst-section-title { margin-bottom: 0; }
.tc-inst-remove {
    border: 0;
    background: transparent;
    color: #e5484d;
    font-size: 13px;
    font-weight: 600;
    padding: 4px 8px;
}
.tc-inst-remove:hover { text-decoration: underline; }

/* Separador marcado donde empiezan las sucursales */
.tc-inst-divider {
    display: flex;
    align-items: center;
    gap: 16px;
    margin: 36px 0 20px;
}
.tc-inst-divider::before,
.tc-inst-divider::after {
    content: '';
    flex: 1;
    height: 2px;
    background: var(--tc-p-border);
}
.tc-inst-divider span {
    padding: 8px 20px;
    border-radius: 999px;
    background: var(--tc-p-orange);
    color: #fff;
    font-weight: 700;
    font-size: 13px;
    letter-spacing: .08em;
    text-transform: uppercase;
}

/* Campos */
.tc-inst-field { position: relative; }
.tc-inst-field label {
    display: block;
    margin-bottom: 6px;
    font-size: 13px;
    font-weight: 700;
    color: var(--tc-p-field-label);
}
.tc-inst-optional { font-weight: 400; color: var(--tc-p-text-dim); }
.tc-inst-wrap {
    position: relative;
    display: flex;
    align-items: center;
}
.tc-inst-wrap > i:first-child {
    position: absolute;
    left: 16px;
    font-size: 16px;
    color: var(--tc-p-text-dim);
    pointer-events: none;
    transition: color .15s ease;
}
.tc-inst-wrap input {
    width: 100%;
    height: 50px;
    padding: 0 16px 0 46px;
    border-radius: 12px;
    border: 1.5px solid var(--tc-p-input-border);
    background: var(--tc-p-field-bg);
    color: var(--tc-p-input-text);
    font-size: 14px;
    transition: border-color .15s ease, box-shadow .15s ease;
}
.tc-inst-wrap input::placeholder { color: var(--tc-p-text-dim); opacity: .8; }
.tc-inst-wrap input:hover { border-color: var(--tc-p-field-border-hover); }
.tc-inst-wrap input:focus {
    outline: none;
    border-color: var(--tc-p-orange);
    box-shadow: 0 0 0 4px rgba(255, 96, 0, .15);
}
.tc-inst-wrap:has(input:focus) > i:first-child { color: var(--tc-p-orange); }

.tc-inst-field.has-error input { border-color: #e5484d; }
.tc-inst-error {
    display: block;
    margin-top: 4px;
    font-size: 12px;
    color: #e5484d;
}

/* Lista de colonias sugeridas por el CP (el campo sigue siendo texto libre) */
.tc-inst-suggest-arrow {
    position: absolute;
    right: 16px;
    font-size: 12px;
    color: var(--tc-p-text-dim);
    pointer-events: none;
    display: none;
}
.tc-inst-wrap.has-suggestions .tc-inst-suggest-arrow { display: block; }
.tc-inst-wrap.has-suggestions input { padding-right: 38px; }
.tc-inst-suggest {
    display: none;
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    z-index: 20;
    max-height: 220px;
    overflow-y: auto;
    padding: 6px;
    border-radius: 12px;
    border: 1.5px solid var(--tc-p-input-border);
    background: var(--tc-p-surface);
    box-shadow: 0 14px 30px rgba(0, 0, 0, .25);
}
.tc-inst-suggest.open { display: block; }
.tc-inst-suggest-item {
    padding: 9px 12px;
    border-radius: 8px;
    font-size: 14px;
    color: var(--tc-p-text);
    cursor: pointer;
}
.tc-inst-suggest-item:hover { background: rgba(255, 96, 0, .14); color: var(--tc-p-orange); }
.tc-inst-suggest-empty { padding: 9px 12px; font-size: 13px; color: var(--tc-p-text-dim); }

/* Link de Maps y vista previa */
.tc-inst-help { margin: 14px 0 0; font-size: 13px; color: var(--tc-p-text-dim); }
.tc-inst-map-status { margin: 6px 0 0; min-height: 18px; font-size: 13px; color: var(--tc-p-text-dim); }
.tc-inst-map-status.ok { color: #1fa672; }
.tc-inst-map-status.error { color: #e5484d; }
.tc-inst-map {
    height: 260px;
    margin-top: 10px;
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid var(--tc-p-border);
}
.tc-inst-map[hidden] { display: none; }

.tc-inst-add {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 14px;
    border-radius: 14px;
    border: 1.5px dashed var(--tc-p-input-border);
    background: transparent;
    color: var(--tc-p-text);
    font-weight: 600;
    transition: border-color .15s ease, color .15s ease;
}
.tc-inst-add:hover { border-color: var(--tc-p-orange); color: var(--tc-p-orange); }

/* Honeypot fuera de pantalla (no display:none: algunos bots lo detectan) */
.tc-inst-trap {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.tc-inst-terms {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 24px 0 16px;
    font-size: 14px;
    color: var(--tc-p-text);
    cursor: pointer;
}
.tc-inst-terms input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--tc-p-orange); flex-shrink: 0; }
.tc-inst-terms a { color: var(--tc-p-orange); font-weight: 600; }

.tc-inst-submit {
    width: 100%;
    padding: 16px;
    border: 0;
    border-radius: 14px;
    background: var(--tc-p-orange);
    color: #fff;
    font-weight: 700;
    font-size: 15px;
    transition: opacity .15s ease, transform .15s ease;
}
.tc-inst-submit:hover:not(:disabled) { transform: translateY(-1px); }
.tc-inst-submit:disabled { opacity: .4; cursor: not-allowed; }
.tc-inst-note { margin: 10px 0 0; text-align: center; font-size: 13px; color: var(--tc-p-text-dim); }
.tc-inst-status { margin: 10px 0 0; text-align: center; font-weight: 600; color: #e5484d; }
.tc-inst-status.ok { color: #1fa672; }

@media (max-width: 575.98px) {
    .tc-inst-card { padding: 20px 16px; border-radius: 16px; }
}
