/**
 * Estilos do Formulário de Recrutamento Techviz
 * Design clean e minimalista
 */

/* Importa Open Sans */
@import url('https://fonts.googleapis.com/css2?family=Open+Sans:wght@400;500;600;700&display=swap');

/* Variáveis */
:root {
    --tv-primary: #0c71c3;
    --tv-primary-dark: #0a5a9c;
    --tv-accent: #fc7955;
    --tv-text: #333333;
    --tv-text-light: #666666;
    --tv-text-muted: #999999;
    --tv-bg: #ffffff;
    --tv-bg-light: #f7f8fa;
    --tv-border: #e0e0e0;
    --tv-error: #e53935;
    --tv-success: #43a047;
    --tv-radius: 6px;
}

/* Honeypot anti-bot (invisível para humanos) */
.techviz-hp-field {
    position: absolute !important;
    left: -9999px !important;
    top: -9999px !important;
    opacity: 0 !important;
    pointer-events: none !important;
    height: 0 !important;
    width: 0 !important;
    overflow: hidden !important;
}

/* Container principal */
.techviz-form-container {
    max-width: 680px;
    margin: 0 auto;
    padding: 20px;
    font-family: 'Open Sans', -apple-system, BlinkMacSystemFont, sans-serif !important;
    font-size: 14px;
    color: var(--tv-text);
    line-height: 1.5;
}

.techviz-form-container,
.techviz-form-container *,
.techviz-form-container input,
.techviz-form-container select,
.techviz-form-container textarea,
.techviz-form-container button {
    font-family: 'Open Sans', -apple-system, BlinkMacSystemFont, sans-serif !important;
}

/* Card do formulário */
.techviz-form-card {
    background: var(--tv-bg);
    border-radius: var(--tv-radius);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    border: 1px solid var(--tv-border);
}

/* Barra de progresso */
.techviz-progress-container {
    padding: 24px 30px;
    border-bottom: 1px solid var(--tv-border);
}

.techviz-progress-steps {
    display: flex;
    justify-content: space-between;
    position: relative;
}

.techviz-progress-steps::before {
    content: '';
    position: absolute;
    top: 14px;
    left: 40px;
    right: 40px;
    height: 2px;
    background: var(--tv-border);
    z-index: 1;
}

.techviz-progress-line {
    position: absolute;
    top: 14px;
    left: 40px;
    height: 2px;
    background: var(--tv-primary);
    z-index: 2;
    transition: width 0.3s ease;
    width: 0%;
}

/* Step indicator */
.techviz-step-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 3;
    flex: 1;
}

.techviz-step-number {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--tv-bg);
    border: 2px solid var(--tv-border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 13px;
    color: var(--tv-text-muted);
    transition: all 0.2s ease;
}

.techviz-step-indicator.active .techviz-step-number {
    border-color: var(--tv-primary);
    color: var(--tv-primary);
    background: #e8f4fc;
}

.techviz-step-indicator.completed .techviz-step-number {
    background: var(--tv-primary);
    border-color: var(--tv-primary);
    color: #fff;
    font-size: 0;
}

.techviz-step-indicator.completed .techviz-step-number::after {
    content: '✓';
    font-size: 14px;
}

.techviz-step-label {
    margin-top: 8px;
    font-size: 12px;
    color: var(--tv-text-muted);
    text-align: center;
    font-weight: 500;
}

.techviz-step-indicator.active .techviz-step-label,
.techviz-step-indicator.completed .techviz-step-label {
    color: var(--tv-text);
}

/* Corpo do formulário */
.techviz-form-body {
    padding: 30px;
}

/* Steps */
.techviz-form-step {
    display: none;
    animation: fadeIn 0.3s ease;
}

.techviz-form-step.active {
    display: block;
}

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

/* Título do step */
.techviz-step-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--tv-text);
    margin: 0 0 24px 0;
}

/* Grupos de campo */
.techviz-field-group {
    margin-bottom: 20px;
}

.techviz-field-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

@media (max-width: 600px) {
    .techviz-field-row {
        grid-template-columns: 1fr;
    }
}

/* Labels */
.techviz-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--tv-text);
    margin-bottom: 6px;
}

.techviz-label .required {
    color: var(--tv-error);
    margin-left: 2px;
}

/* Inputs */
.techviz-input,
.techviz-select,
.techviz-textarea {
    width: 100%;
    padding: 16px 16px !important;
    font-size: 14px;
    font-family: inherit;
    border: 1px solid var(--tv-border);
    border-radius: var(--tv-radius);
    background: var(--tv-bg);
    color: var(--tv-text);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    box-sizing: border-box;
    height: auto !important;
    min-height: 52px !important;
    line-height: 1.4 !important;
}

/* Força mesma altura para todos os tipos de input */
.techviz-form-container input[type="text"],
.techviz-form-container input[type="email"],
.techviz-form-container input[type="tel"],
.techviz-form-container input[type="url"],
.techviz-form-container select,
.techviz-form-container .techviz-select,
#techviz-recruitment-form input[type="text"],
#techviz-recruitment-form input[type="email"],
#techviz-recruitment-form input[type="tel"],
#techviz-recruitment-form input[type="url"],
#techviz-recruitment-form select,
#techviz-recruitment-form .techviz-select {
    padding: 16px 16px !important;
    height: 52px !important;
    min-height: 52px !important;
    max-height: 52px !important;
    line-height: 1.4 !important;
    box-sizing: border-box !important;
}

/* Textarea - altura automática */
.techviz-form-container textarea,
.techviz-form-container .techviz-textarea,
#techviz-recruitment-form textarea,
#techviz-recruitment-form .techviz-textarea {
    padding: 16px 16px !important;
    min-height: 120px !important;
    height: auto !important;
    max-height: none !important;
    line-height: 1.5 !important;
    box-sizing: border-box !important;
    resize: vertical !important;
}

.techviz-input:focus,
.techviz-select:focus,
.techviz-textarea:focus {
    outline: none;
    border-color: var(--tv-primary);
    box-shadow: 0 0 0 3px rgba(12, 113, 195, 0.1);
}

.techviz-input::placeholder,
.techviz-textarea::placeholder {
    color: var(--tv-text-muted);
}

.techviz-input.error,
.techviz-select.error,
.techviz-textarea.error {
    border-color: var(--tv-error);
}

.techviz-textarea {
    min-height: 100px;
    resize: vertical;
}

/* Select */
.techviz-select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath fill='%23666' d='M0 0l5 6 5-6z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 32px;
    cursor: pointer;
}

/* Mensagens de erro */
.techviz-error-message {
    display: none;
    font-size: 12px;
    color: var(--tv-error);
    margin-top: 4px;
}

.techviz-error-message.visible {
    display: block;
}

/* Dica de campo */
.techviz-field-hint {
    font-size: 12px;
    color: var(--tv-text-muted);
    margin-top: 4px;
}

/* Upload de arquivo */
.techviz-file-upload {
    position: relative;
}

.techviz-file-dropzone {
    border: 1px dashed var(--tv-border);
    border-radius: var(--tv-radius);
    padding: 30px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    background: var(--tv-bg-light);
}

.techviz-file-dropzone:hover,
.techviz-file-dropzone.dragover {
    border-color: var(--tv-primary);
    background: #f0f7fc;
}

.techviz-file-dropzone.has-file {
    border-color: var(--tv-success);
    border-style: solid;
    background: #f1f8f2;
}

.techviz-file-icon {
    width: 40px;
    height: 40px;
    margin: 0 auto 12px;
}

.techviz-file-icon svg {
    width: 100%;
    height: 100%;
    fill: var(--tv-text-muted);
}

.techviz-file-dropzone:hover .techviz-file-icon svg,
.techviz-file-dropzone.dragover .techviz-file-icon svg {
    fill: var(--tv-primary);
}

.techviz-file-text {
    color: var(--tv-text-light);
    font-size: 13px;
}

.techviz-file-text strong {
    color: var(--tv-primary);
}

.techviz-file-hint {
    font-size: 12px;
    color: var(--tv-text-muted);
    margin-top: 8px;
}

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

.techviz-file-preview {
    display: none;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: var(--tv-bg-light);
    border-radius: var(--tv-radius);
    margin-top: 12px;
}

.techviz-file-preview.visible {
    display: flex;
}

.techviz-file-preview-icon {
    width: 36px;
    height: 36px;
    background: var(--tv-primary);
    border-radius: var(--tv-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.techviz-file-preview-icon svg {
    width: 20px;
    height: 20px;
    fill: #fff;
}

.techviz-file-preview-info {
    flex: 1;
    min-width: 0;
}

.techviz-file-preview-name {
    font-weight: 500;
    font-size: 13px;
    color: var(--tv-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.techviz-file-preview-size {
    font-size: 12px;
    color: var(--tv-text-muted);
}

.techviz-file-remove {
    background: none;
    border: none;
    color: var(--tv-text-muted);
    cursor: pointer;
    padding: 4px 8px;
    font-size: 18px;
    line-height: 1;
    transition: color 0.2s;
}

.techviz-file-remove:hover {
    color: var(--tv-error);
}

/* Navegação */
.techviz-form-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 30px;
    padding-top: 24px;
    border-top: 1px solid var(--tv-border);
}

.techviz-btn {
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 600;
    font-family: inherit;
    border-radius: var(--tv-radius);
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.techviz-btn-prev {
    background: transparent;
    color: var(--tv-text-light);
    padding-left: 0;
}

.techviz-btn-prev:hover {
    color: var(--tv-text);
}

.techviz-btn-next,
.techviz-btn-submit {
    background: var(--tv-primary);
    color: #fff;
}

.techviz-btn-next:hover,
.techviz-btn-submit:hover {
    background: var(--tv-primary-dark);
}

.techviz-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.techviz-btn-submit {
    background: var(--tv-accent);
}

.techviz-btn-submit:hover {
    background: #e8673f;
}

.techviz-btn-arrow {
    font-size: 16px;
    line-height: 1;
}

/* Spinner */
.techviz-spinner {
    display: none;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}

.techviz-btn.loading .techviz-spinner {
    display: block;
}

.techviz-btn.loading .techviz-btn-text {
    display: none;
}

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

/* Mensagem de sucesso */
.techviz-success-message {
    display: none;
    text-align: center;
    padding: 50px 30px;
}

.techviz-success-message.visible {
    display: block;
}

.techviz-success-icon {
    width: 64px;
    height: 64px;
    background: var(--tv-success);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
}

.techviz-success-icon svg {
    width: 32px;
    height: 32px;
    fill: #fff;
}

.techviz-success-message h3 {
    font-size: 20px;
    font-weight: 600;
    color: var(--tv-text);
    margin: 0 0 10px 0;
}

.techviz-success-message p {
    color: var(--tv-text-light);
    font-size: 14px;
    margin: 0;
}

/* Erro global */
.techviz-global-error {
    display: none;
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: var(--tv-error);
    padding: 12px 16px;
    border-radius: var(--tv-radius);
    margin-bottom: 20px;
    font-size: 13px;
}

.techviz-global-error.visible {
    display: block;
}

/* Box de informação (etapa 4) */
.techviz-form-step[data-step="4"] .techviz-field-group:last-of-type {
    background: var(--tv-bg-light);
    border-radius: var(--tv-radius);
    padding: 16px;
    margin-top: 24px;
}

.techviz-form-step[data-step="4"] .techviz-field-group:last-of-type p {
    margin: 0;
    font-size: 13px;
    color: var(--tv-text-light);
}

.techviz-form-step[data-step="4"] .techviz-field-group:last-of-type p:first-child {
    margin-bottom: 8px;
}

.techviz-form-step[data-step="4"] .techviz-field-group:last-of-type strong {
    color: var(--tv-text);
}

/* Responsivo */
@media (max-width: 480px) {
    .techviz-form-container {
        padding: 10px;
    }

    .techviz-progress-container {
        padding: 20px 16px;
    }

    .techviz-step-label {
        font-size: 10px;
    }

    .techviz-form-body {
        padding: 20px 16px;
    }

    .techviz-form-navigation {
        flex-direction: column-reverse;
        gap: 12px;
    }

    .techviz-btn {
        width: 100%;
        justify-content: center;
    }

    .techviz-btn-prev {
        padding-left: 20px;
    }
}
