/**
 * Estilos do Wizard - Criar Carinho
 * Extraído de criar.php para melhor manutenção
 */

/* Variáveis Exclusivas do Wizard */
:root {
    --glass-bg: rgba(255, 255, 255, 0.95);
    --glass-border: 1px solid rgba(255, 255, 255, 0.6);
    --glass-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.15);
    --primary-gradient: linear-gradient(135deg, #FF6B9D 0%, #FF8E9B 100%);
    --step-active: #FF6B9D;
    --step-inactive: #ddd;
}

body {
    background: linear-gradient(135deg, #fdfbfb 0%, #ebedee 100%);
    min-height: 100vh;
}

/* Container Centralizado - App Like */
.wizard-container {
    max-width: 600px;
    margin: 2rem auto;
    background: var(--glass-bg);
    backdrop-filter: blur(8px);
    border-radius: 24px;
    box-shadow: var(--glass-shadow);
    border: var(--glass-border);
    overflow: hidden;
    position: relative;
    padding-bottom: 100px !important;
}

/* Barra de Progresso */
.wizard-header {
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.8);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.progress-track {
    display: flex;
    justify-content: space-between;
    position: relative;
    margin: 0 10px;
}

.progress-line {
    position: absolute;
    top: 50%;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--step-inactive);
    z-index: 1;
    transform: translateY(-50%);
}

.progress-fill {
    position: absolute;
    top: 50%;
    left: 0;
    height: 2px;
    background: var(--step-active);
    z-index: 2;
    transform: translateY(-50%);
    width: 0%;
    transition: width 0.4s ease;
}

.step-dot {
    width: 32px;
    height: 32px;
    background: #fff;
    border: 2px solid var(--step-inactive);
    border-radius: 50%;
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: #999;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    position: relative;
}

.step-dot.active {
    border-color: var(--step-active);
    background: var(--step-active);
    color: white;
    box-shadow: 0 0 0 4px rgba(255, 107, 157, 0.2);
}

.step-dot.completed {
    background: var(--step-active);
    border-color: var(--step-active);
    color: white;
}

.step-label {
    position: absolute;
    top: 40px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.75rem;
    color: #666;
    white-space: nowrap;
    font-weight: 500;
}

/* Conteúdo das Etapas */
.step-content {
    display: none;
    padding: 2rem;
    animation: fadeIn 0.4s ease;
}

.step-content.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

h2.step-title {
    color: var(--text-dark);
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    text-align: center;
}

p.step-subtitle {
    text-align: center;
    color: var(--text-light);
    margin-bottom: 2rem;
    font-size: 0.95rem;
}

/* Cards de Seleção (Planos e Formatos) */
.selection-grid {
    display: grid;
    gap: 1rem;
}

.selection-card {
    background: white;
    border: 2px solid #eee;
    border-radius: 16px;
    padding: 1.25rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 1rem;
    position: relative;
}

.selection-card:hover {
    border-color: #ffd1e0;
    background: #fffdfd;
}

.selection-card.selected {
    border-color: var(--step-active);
    background: #fff5f8;
    box-shadow: 0 4px 12px rgba(255, 107, 157, 0.15);
}

.selection-card.disabled {
    opacity: 0.5;
    pointer-events: none;
}

.selection-card input[type="radio"] {
    display: none;
}

.check-circle {
    width: 24px;
    height: 24px;
    border: 2px solid #ddd;
    border-radius: 50%;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.selection-card.selected .check-circle {
    border-color: var(--step-active);
    background: var(--step-active);
}

.selection-card.selected .check-circle::after {
    content: '✓';
    color: white;
    font-size: 0.8rem;
}

.card-icon {
    font-size: 2rem;
}

.card-info h3 {
    margin: 0;
    font-size: 1rem;
    color: var(--text-dark);
}

.card-info p {
    margin: 0.25rem 0 0;
    font-size: 0.85rem;
    color: var(--text-light);
}

/* Campos de Formulário Modernos */
.input-group {
    margin-bottom: 1.25rem;
}

.input-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-dark);
}

.modern-input {
    width: 100%;
    padding: 1rem;
    border: 1px solid #ddd;
    border-radius: 12px;
    font-size: 1rem;
    background: #fdfdfd;
    transition: all 0.3s;
    box-sizing: border-box;
}

.modern-input:focus {
    outline: none;
    border-color: var(--step-active);
    box-shadow: 0 0 0 3px rgba(255, 107, 157, 0.1);
    background: white;
}

textarea.modern-input {
    resize: vertical;
    min-height: 120px;
}

/* Footer Fixo com Navegação */
.wizard-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(5px);
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    z-index: 100;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.05);
    box-sizing: border-box;
}

.btn-nav {
    padding: 0.8rem 1.5rem;
    border-radius: 12px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-prev {
    background: transparent;
    color: #666;
}

.btn-prev:hover {
    background: #f5f5f5;
}

.btn-next {
    background: var(--primary-gradient);
    color: white;
    box-shadow: 0 4px 12px rgba(255, 107, 157, 0.3);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-next:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(255, 107, 157, 0.4);
}

.btn-next:disabled {
    background: #ddd;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Botão Toggle Personalização */
.btn-toggle-personalizacao {
    background: none;
    border: 2px dashed #ddd;
    color: #666;
    width: 100%;
    padding: 1rem;
    border-radius: 12px;
    font-size: 0.95rem;
    cursor: pointer;
    margin-top: 1rem;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-toggle-personalizacao:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    background: #fff5f8;
}

/* Resumo da Revisão */
.review-box {
    background: #f9f9f9;
    border-radius: 12px;
    padding: 1rem;
    margin-bottom: 1rem;
}

.review-item {
    display: flex;
    justify-content: space-between;
    padding: 0.75rem 0;
    border-bottom: 1px solid #eee;
}

.review-item:last-child {
    border-bottom: none;
}

.review-label {
    color: #666;
    font-size: 0.9rem;
}

.review-value {
    font-weight: 600;
    color: #333;
}

/* Sub-steps sequenciais */
.sub-step {
    display: none;
    animation: fadeIn 0.5s ease;
}

.sub-step.active {
    display: block;
}

.music-question {
    animation: fadeIn 0.5s ease;
}

/* Relationship Pills Grid */
.relationship-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: center;
    margin-bottom: 1rem;
}

.relationship-pill {
    cursor: pointer;
    position: relative;
}

.relationship-pill input {
    display: none;
}

.relationship-pill span {
    display: block;
    padding: 0.75rem 1.5rem;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 50px;
    color: #666;
    font-size: 0.95rem;
    font-weight: 500;
    transition: all 0.2s;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
}

.relationship-pill:hover span {
    border-color: #ffd1e0;
    background: #fffdfd;
    transform: translateY(-1px);
}

.relationship-pill input:checked+span {
    background: var(--primary-gradient);
    color: white;
    border-color: transparent;
    box-shadow: 0 4px 12px rgba(255, 107, 157, 0.3);
    transform: translateY(-2px);
}

/* Magic Button - Gerar Música com IA */
.magic-button {
    background: linear-gradient(135deg, #6366f1 0%, #a855f7 100%);
    border: none;
    border-radius: 20px;
    color: white;
    padding: 8px 16px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.magic-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(99, 102, 241, 0.4);
}

.magic-button:disabled {
    opacity: 0.7;
    cursor: wait;
}

.magic-button .icon {
    font-size: 1rem;
}

/* Loading Animation for Textarea */
.generating-loader {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(255, 255, 255, 0.9);
    padding: 1rem 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    color: #6366f1;
    z-index: 10;
}

/* Mobile Responsivo */
@media (max-width: 480px) {
    .wizard-container {
        margin: 0;
        border-radius: 0;
        min-height: 100vh;
        border: none;
        box-shadow: none;
        padding-bottom: 100px;
    }

    .step-content {
        padding: 1.5rem 1rem 8rem 1rem;
    }

    .wizard-footer {
        position: fixed;
        bottom: 0;
        left: 0;
        width: 100%;
        box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.1);
        background: rgba(255, 255, 255, 0.95);
        backdrop-filter: blur(5px);
        padding: 1rem;
        box-sizing: border-box;
    }

    .step-title {
        font-size: 1.5rem !important;
    }

    .btn-nav {
        padding: 0.7rem 1rem;
        font-size: 0.9rem;
    }
}