/* ============================================================
   PETDAY 2026 - Wizard Multi-Etapas
   Overlay, modal, progress bar, steps, assinatura, termos
   ============================================================ */

/* === OVERLAY === */
.wizard-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    backdrop-filter: blur(6px);
    padding: 20px;
}

.wizard-overlay.active { display: flex; }

/* === MODAL === */
.wizard-modal {
    background: white;
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 720px;
    max-height: 92vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
    animation: bounceIn 0.4s ease;
    overflow: hidden;
}

/* === HEADER === */
.wizard-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 24px;
    background: linear-gradient(135deg, var(--pet-primary) 0%, var(--pet-primary-dark) 100%);
    color: white;
    min-height: 64px;
}

.wizard-header-left {
    display: flex;
    align-items: center;
    gap: 14px;
}

.wizard-step-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: rgba(255, 215, 0, 0.15);
    color: var(--pet-gold);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
}

.wizard-header-text h3 {
    font-size: 1.05rem;
    font-weight: 700;
    line-height: 1.2;
}

.wizard-header-text span {
    font-size: 0.72rem;
    color: rgba(255,255,255,0.8);
}

.wizard-close {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255,255,255,0.6);
    transition: var(--transition-fast);
    font-size: 0.9rem;
}

.wizard-close:hover {
    background: rgba(255,255,255,0.12);
    color: white;
}

/* === PROGRESS BAR === */
.wizard-progress {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    padding: 16px 24px;
    background: var(--pet-gray-50);
    border-bottom: 1px solid var(--pet-gray-100);
}

.progress-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    position: relative;
    flex: 1;
}

.progress-step:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 14px;
    left: calc(50% + 18px);
    right: calc(-50% + 18px);
    height: 2px;
    background: var(--pet-gray-200);
    transition: var(--transition);
}

.progress-step.completed:not(:last-child)::after {
    background: var(--pet-success);
}

.progress-step.active:not(:last-child)::after {
    background: linear-gradient(90deg, var(--pet-primary), var(--pet-gray-200));
}

.progress-dot {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: white;
    border: 2px solid var(--pet-gray-300);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--pet-gray-400);
    transition: var(--transition);
    z-index: 2;
}

.progress-step.active .progress-dot {
    background: var(--pet-primary);
    border-color: var(--pet-primary);
    color: white;
    box-shadow: 0 0 0 4px rgba(179, 27, 27, 0.12);
}

.progress-step.completed .progress-dot {
    background: var(--pet-success);
    border-color: var(--pet-success);
    color: white;
}

.progress-label {
    font-size: 0.68rem;
    font-weight: 600;
    color: var(--pet-gray-400);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.progress-step.active .progress-label { color: var(--pet-primary); }
.progress-step.completed .progress-label { color: var(--pet-success); }

/* === BODY === */
.wizard-body {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
}

/* === STEPS === */
.wizard-step {
    display: none;
}

.wizard-step.active {
    display: block;
    animation: fadeInUp 0.3s ease;
}

/* === VACINAS GRID === */
.vacinas-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.comportamento-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

/* === PET BLOCK (multi-pet) === */
.pet-block {
    position: relative;
    margin-bottom: 20px;
    padding: 20px;
    border: 2px solid var(--pet-gray-200);
    border-radius: var(--radius-lg);
    background: var(--pet-gray-50);
}

.pet-block + .pet-block {
    border-top: 2px solid var(--pet-gray-200);
}

.pet-block-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.pet-block-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 16px;
    background: linear-gradient(135deg, var(--pet-primary), var(--pet-primary-dark));
    color: white;
    font-size: 0.82rem;
    font-weight: 700;
    border-radius: 50px;
}

.pet-block-badge i {
    font-size: 0.75rem;
}

.btn-remover-pet {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: rgba(239, 68, 68, 0.08);
    color: #ef4444;
    border: 1.5px solid rgba(239, 68, 68, 0.2);
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.8rem;
}

.btn-remover-pet:hover {
    background: #ef4444;
    color: white;
    border-color: #ef4444;
}

.btn-add-pet {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 14px;
    border: 2px dashed var(--pet-gray-300);
    border-radius: var(--radius);
    background: white;
    color: var(--pet-primary);
    font-size: 0.88rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-top: 4px;
}

.btn-add-pet:hover {
    border-color: var(--pet-primary);
    background: rgba(179, 27, 27, 0.03);
}

.btn-add-pet i {
    font-size: 1.1rem;
}

/* === PET STEP — SECTIONS === */
.pet-section {
    background: #ffffff;
    border: 1.5px solid var(--pet-gray-200);
    border-radius: var(--radius);
    padding: 20px;
    margin-bottom: 16px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.05);
}

.pet-section-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--pet-gray-100);
}

.pet-section-header h4 {
    font-size: 0.92rem;
    font-weight: 700;
    color: var(--pet-gray-700);
    margin: 0;
}

.pet-section-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: linear-gradient(135deg, var(--pet-primary), var(--pet-primary-dark));
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    flex-shrink: 0;
}

.pet-section-icon.icon-vacina {
    background: linear-gradient(135deg, #059669, #047857);
}

/* === RADIO PILLS === */
.radio-group-inline {
    display: flex;
    gap: 8px;
    margin-top: 6px;
}

.radio-pill {
    cursor: pointer;
    position: relative;
}

.wizard-step .radio-pill input[type="radio"] {
    position: absolute !important;
    opacity: 0 !important;
    width: 0 !important;
    height: 0 !important;
    pointer-events: none;
    margin: 0;
    padding: 0;
}

.radio-pill span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 18px;
    border-radius: 50px;
    border: 1.5px solid var(--pet-gray-200);
    background: white;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--pet-gray-500);
    transition: all 0.2s ease;
}

.radio-pill span i {
    font-size: 0.78rem;
}

.radio-pill input:checked ~ span,
.radio-pill input:checked + span {
    border-color: var(--pet-primary);
    background: rgba(179, 27, 27, 0.06);
    color: var(--pet-primary);
}

.radio-pill.pill-success input:checked ~ span,
.radio-pill.pill-success input:checked + span {
    border-color: var(--pet-success);
    background: rgba(16, 185, 129, 0.06);
    color: #059669;
}

.radio-pill.pill-danger input:checked ~ span,
.radio-pill.pill-danger input:checked + span {
    border-color: #ef4444;
    background: rgba(239, 68, 68, 0.06);
    color: #dc2626;
}

.radio-pill:hover span {
    border-color: var(--pet-gray-300);
    background: var(--pet-gray-50);
}

/* === PET UPLOAD AREA IMPROVED === */
.pet-section .upload-area-pet {
    border: 2px dashed var(--pet-gray-300);
    border-radius: var(--radius);
    padding: 28px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    background: white;
}

.pet-section .upload-area-pet:hover {
    border-color: var(--pet-primary);
    background: rgba(179, 27, 27, 0.02);
}

.pet-section .upload-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.pet-section .upload-placeholder i {
    font-size: 1.6rem;
    color: var(--pet-gray-400);
}

.pet-section .upload-placeholder span {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--pet-gray-500);
}

.pet-section .upload-placeholder small {
    font-size: 0.72rem;
    color: var(--pet-gray-400);
}

/* === VACINAÇÃO SECTION === */
.pet-section-vacina {
    background: #f0fdf4;
    border-color: #86efac;
    box-shadow: 0 1px 4px rgba(5, 150, 105, 0.08);
}

.vacina-question {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--pet-gray-700);
    display: block;
    margin-bottom: 8px;
}

.vacina-termo-texto {
    font-size: 0.78rem;
    color: var(--pet-gray-500);
    line-height: 1.5;
    margin: 12px 0 10px;
    padding: 10px 12px;
    background: rgba(255,255,255,0.7);
    border-radius: var(--radius-sm);
    border-left: 3px solid #059669;
}

.vacina-termo-texto i {
    color: #059669;
    margin-right: 4px;
}

.pet-section-vacina textarea {
    width: 100%;
    border: 1.5px solid #bbf7d0;
    border-radius: var(--radius-sm);
    padding: 10px 12px;
    font-family: inherit;
    font-size: 0.82rem;
    resize: vertical;
    outline: none;
    transition: all 0.2s ease;
    background: white;
}

.pet-section-vacina textarea:focus {
    border-color: #059669;
    box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.08);
}

/* --- Vacina Card --- */
.vacina-card {
    background: white;
    border: 1.5px solid var(--pet-gray-200);
    border-radius: var(--radius);
    overflow: hidden;
    transition: var(--transition);
}

.vacina-card:has(input:checked) {
    border-color: var(--pet-success);
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

.vacina-card-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    cursor: pointer;
    transition: var(--transition-fast);
    user-select: none;
}

.vacina-card-header:hover {
    background: var(--pet-gray-50);
}

.vacina-card-header input[type="checkbox"] {
    display: none;
}

.vacina-toggle {
    width: 38px;
    height: 20px;
    border-radius: 20px;
    background: var(--pet-gray-200);
    position: relative;
    flex-shrink: 0;
    transition: var(--transition);
}

.vacina-toggle::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: white;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
    transition: var(--transition);
}

.vacina-card-header input:checked ~ .vacina-toggle {
    background: var(--pet-success);
}

.vacina-card-header input:checked ~ .vacina-toggle::after {
    left: 20px;
}

.vacina-icon {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    background: var(--pet-gray-50);
    color: var(--pet-gray-400);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    flex-shrink: 0;
    transition: var(--transition);
}

.vacina-card:has(input:checked) .vacina-icon {
    background: #d1fae5;
    color: #065f46;
}

.vacina-nome {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--pet-gray-700);
    flex: 1;
}

.vacina-card-body {
    padding: 0 14px 12px;
    display: none;
}

.vacina-card:has(input:checked) .vacina-card-body {
    display: block;
    animation: fadeInUp 0.2s ease;
}

.vacina-date-label {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--pet-gray-400);
    text-transform: uppercase;
    letter-spacing: 0.03em;
    margin-bottom: 4px;
    display: block;
}

.vacina-card-body input[type="date"] {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid var(--pet-gray-200);
    border-radius: var(--radius-sm);
    font-size: 0.82rem;
    font-family: inherit;
    outline: none;
    transition: var(--transition-fast);
}

.vacina-card-body input[type="date"]:focus {
    border-color: var(--pet-success);
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.08);
}

/* === TERMOS === */
.termos-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.termo-item {
    padding: 14px 16px;
    background: var(--pet-gray-50);
    border-radius: var(--radius-sm);
    border: 1px solid var(--pet-gray-100);
    transition: var(--transition-fast);
}

.termo-item:has(input:checked) {
    border-color: var(--pet-success);
    background: rgba(16, 185, 129, 0.03);
}

/* === ASSINATURA === */
.assinatura-container {
    position: relative;
    border: 2px solid var(--pet-gray-200);
    border-radius: var(--radius);
    overflow: hidden;
    background: white;
}

.assinatura-container canvas {
    width: 100%;
    height: 200px;
    cursor: crosshair;
    display: block;
    touch-action: none;
}

.btn-limpar-assinatura {
    position: absolute;
    top: 8px;
    right: 8px;
    padding: 6px 14px;
    background: var(--pet-gray-100);
    color: var(--pet-gray-600);
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 6px;
    border: 1px solid var(--pet-gray-200);
    transition: var(--transition-fast);
}

.btn-limpar-assinatura:hover {
    background: var(--pet-gray-200);
}

/* === FOOTER === */
.wizard-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 24px;
    border-top: 1px solid var(--pet-gray-100);
    background: var(--pet-gray-50);
    gap: 12px;
}

.btn-wizard-prev {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 20px;
    background: white;
    color: var(--pet-gray-600);
    font-weight: 600;
    font-size: 0.85rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--pet-gray-200);
    transition: var(--transition);
}

.btn-wizard-prev:hover {
    background: var(--pet-gray-50);
    border-color: var(--pet-gray-300);
}

.btn-wizard-next {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 24px;
    background: linear-gradient(135deg, var(--pet-primary), var(--pet-primary-dark));
    color: white;
    font-weight: 600;
    font-size: 0.85rem;
    border-radius: var(--radius-sm);
    transition: var(--transition);
    margin-left: auto;
    box-shadow: var(--shadow-sm);
}

.btn-wizard-next:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-wizard-submit {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 24px;
    background: linear-gradient(135deg, var(--pet-success), var(--pet-success-dark));
    color: white;
    font-weight: 600;
    font-size: 0.85rem;
    border-radius: var(--radius-sm);
    transition: var(--transition);
    margin-left: auto;
    box-shadow: var(--shadow-sm);
}

.btn-wizard-submit:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-wizard-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* === MODAL GEO === */
.geo-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    backdrop-filter: blur(6px);
    padding: 20px;
}

.geo-modal-overlay.active {
    display: flex;
}

.geo-modal {
    background: white;
    border-radius: 18px;
    max-width: 440px;
    width: 100%;
    padding: 36px 32px 28px;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
    animation: bounceIn 0.35s ease;
}

.geo-modal-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin: 0 auto 18px;
    box-shadow: 0 4px 16px rgba(231, 76, 60, 0.35);
}

.geo-modal h3 {
    font-size: 1.2rem;
    font-weight: 700;
    color: #1a1a2e;
    margin-bottom: 14px;
}

.geo-modal p {
    font-size: 0.92rem;
    color: #555;
    line-height: 1.6;
    margin-bottom: 10px;
}

.geo-modal-note {
    background: #fff8f0;
    border-left: 3px solid #f39c12;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 0.85rem !important;
    color: #7a6530 !important;
    margin: 14px 0 20px !important;
    text-align: left;
}

.geo-modal-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.geo-modal-btn {
    padding: 11px 24px;
    border-radius: 10px;
    font-size: 0.92rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.2s ease;
}

.geo-modal-btn-cancel {
    background: #f0f0f0;
    color: #666;
}

.geo-modal-btn-cancel:hover {
    background: #e0e0e0;
}

.geo-modal-btn-ok {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    color: white;
    box-shadow: 0 4px 14px rgba(231, 76, 60, 0.35);
}

.geo-modal-btn-ok:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(231, 76, 60, 0.45);
}

/* === RESPONSIVO === */
@media (max-width: 768px) {
    .wizard-overlay { padding: 0; }

    .wizard-modal {
        max-width: 100%;
        max-height: 100vh;
        border-radius: 0;
        height: 100vh;
    }

    .wizard-header { padding: 14px 16px; }
    .wizard-body { padding: 20px 16px; }
    .wizard-footer { padding: 14px 16px; }

    .progress-label { display: none; }

    .vacinas-grid,
    .comportamento-grid {
        grid-template-columns: 1fr;
    }

    .pet-section {
        padding: 16px;
    }

    .radio-pill span {
        padding: 7px 14px;
        font-size: 0.78rem;
    }
}
