/* TAM - Wizard Cotizador Inteligente */

/* Container */
.wizard-container {
    max-width: 700px;
    margin: 0 auto;
}

/* Progress Bar */
.wizard-progress {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 2.5rem;
    padding: 0 1rem;
}

.progress-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.step-number {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--gray-200);
    color: var(--gray-600);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.progress-step.active .step-number,
.progress-step.completed .step-number {
    background: var(--primary);
    color: white;
}

.progress-step.completed .step-number::after {
    content: '✓';
}

.step-label {
    font-size: 0.75rem;
    color: var(--gray-600);
    font-weight: 500;
    text-align: center;
}

.progress-step.active .step-label {
    color: var(--primary);
    font-weight: 600;
}

.progress-line {
    flex: 1;
    height: 3px;
    background: var(--gray-200);
    margin: 0 0.5rem;
    margin-bottom: 1.5rem;
    transition: background 0.3s ease;
}

.progress-line.completed {
    background: var(--primary);
}

@media (max-width: 500px) {
    .step-label {
        display: none;
    }
    .progress-line {
        margin-bottom: 0;
    }
}

/* Wizard Form */
.wizard-form {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 2rem;
    box-shadow: var(--shadow-lg);
}

@media (max-width: 600px) {
    .wizard-form {
        padding: 1.5rem 1rem;
    }
}

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

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

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

.step-header {
    text-align: center;
    margin-bottom: 2rem;
}

.step-header h2 {
    color: var(--gray-900);
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.step-header p {
    color: var(--gray-600);
    font-size: 1rem;
}

/* Question Groups */
.question-group {
    margin-bottom: 2rem;
}

.question-label {
    display: block;
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: 1rem;
    font-size: 1rem;
}

/* Option Cards */
.option-cards {
    display: grid;
    gap: 1rem;
}

.option-cards.horizontal {
    grid-template-columns: repeat(3, 1fr);
}

@media (max-width: 600px) {
    .option-cards.horizontal {
        grid-template-columns: 1fr;
    }
}

.option-card {
    display: block;
    position: relative;
    cursor: pointer;
}

.option-card input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.option-card .card-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 1.5rem;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius);
    background: var(--white);
    transition: all 0.2s ease;
}

.option-card:hover .card-content {
    border-color: var(--primary-light);
    background: var(--gray-100);
}

.option-card input:checked + .card-content {
    border-color: var(--primary);
    background: rgba(45, 90, 135, 0.05);
    box-shadow: 0 0 0 3px rgba(45, 90, 135, 0.1);
}

.card-icon {
    font-size: 2.5rem;
    margin-bottom: 0.75rem;
}

.card-title {
    font-weight: 600;
    color: var(--gray-900);
    font-size: 1rem;
    margin-bottom: 0.25rem;
}

.card-desc {
    font-size: 0.85rem;
    color: var(--gray-600);
    line-height: 1.4;
}

/* Compact cards for retention */
.option-card.compact .card-content {
    padding: 1rem;
}

.option-card.compact .card-title {
    font-size: 1.25rem;
    margin-bottom: 0.25rem;
}

.option-card.compact .card-desc {
    font-size: 0.75rem;
}

/* Input Groups */
.inputs-grid {
    display: grid;
    gap: 1.5rem;
}

.input-group {
    margin-bottom: 1rem;
}

.input-group label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
    color: var(--gray-900);
    margin-bottom: 0.75rem;
}

.input-icon {
    font-size: 1.25rem;
}

.input-hint {
    display: block;
    font-size: 0.8rem;
    color: var(--gray-600);
    margin-top: 0.5rem;
}

/* Input with +/- buttons */
.input-with-buttons {
    display: flex;
    align-items: center;
    gap: 0;
    max-width: 180px;
}

.input-with-buttons input {
    width: 80px;
    text-align: center;
    font-size: 1.25rem;
    font-weight: 600;
    padding: 0.75rem;
    border: 2px solid var(--gray-300);
    border-left: none;
    border-right: none;
    border-radius: 0;
    -moz-appearance: textfield;
}

.input-with-buttons input::-webkit-outer-spin-button,
.input-with-buttons input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.btn-minus, .btn-plus {
    width: 50px;
    height: 50px;
    border: 2px solid var(--gray-300);
    background: var(--gray-100);
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--gray-700);
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-minus {
    border-radius: var(--radius) 0 0 var(--radius);
}

.btn-plus {
    border-radius: 0 var(--radius) var(--radius) 0;
}

.btn-minus:hover, .btn-plus:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

/* Large input for units */
.input-group.large {
    text-align: center;
    margin-bottom: 2rem;
}

.input-group.large label {
    justify-content: center;
    font-size: 1.1rem;
}

.input-large {
    width: 150px;
    font-size: 2rem;
    font-weight: 700;
    text-align: center;
    padding: 1rem;
    border: 2px solid var(--gray-300);
    border-radius: var(--radius);
    margin: 0 auto;
    display: block;
}

.input-large:focus {
    border-color: var(--primary);
    outline: none;
    box-shadow: 0 0 0 3px rgba(45, 90, 135, 0.1);
}

/* Info Box */
.info-box {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    background: #eff6ff;
    border-left: 4px solid var(--primary);
    padding: 1rem;
    border-radius: 0 var(--radius) var(--radius) 0;
    margin-top: 1.5rem;
}

.info-icon {
    font-size: 1.25rem;
    flex-shrink: 0;
}

.info-box p {
    font-size: 0.9rem;
    color: var(--gray-900);
    margin: 0;
}

/* Quote Result */
.quote-result {
    min-height: 200px;
}

.quote-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    color: var(--gray-600);
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--gray-200);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 1rem;
}

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

/* Quote Card */
.quote-card {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.quote-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(255,255,255,0.2);
}

.quote-product-name {
    font-size: 1.25rem;
    font-weight: 700;
}

.quote-product-features {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-top: 0.5rem;
}

.feature-badge {
    background: rgba(255,255,255,0.2);
    padding: 0.25rem 0.75rem;
    border-radius: 100px;
    font-size: 0.75rem;
    font-weight: 500;
}

/* Services List */
.quote-services {
    background: var(--gray-100);
    border-radius: var(--radius);
    padding: 1rem;
    margin-bottom: 1.5rem;
}

.quote-services h4 {
    font-size: 0.9rem;
    color: var(--gray-600);
    margin-bottom: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.service-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--gray-200);
}

.service-item:last-child {
    border-bottom: none;
}

.service-name {
    font-weight: 500;
    color: var(--gray-900);
}

.service-quantity {
    font-size: 0.85rem;
    color: var(--gray-600);
}

.service-price {
    font-weight: 600;
    color: var(--primary);
}

/* Totals */
.quote-totals {
    background: var(--white);
    border: 2px solid var(--primary);
    border-radius: var(--radius);
    padding: 1rem;
}

.total-row {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    font-size: 0.95rem;
}

.total-row.subtotal {
    color: var(--gray-600);
}

.total-row.iva {
    color: var(--gray-500);
    font-size: 0.85rem;
}

.total-row.final {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary);
    border-top: 2px solid var(--gray-200);
    margin-top: 0.5rem;
    padding-top: 0.75rem;
}

.total-row .label {
    font-weight: 500;
}

/* Explanation */
.quote-explanation {
    background: rgba(125, 161, 119, 0.1);
    border-left: 4px solid var(--accent);
    padding: 1rem;
    border-radius: 0 var(--radius) var(--radius) 0;
    margin-bottom: 1.5rem;
}

.quote-explanation p {
    margin: 0;
    color: var(--gray-900);
    font-size: 0.95rem;
    line-height: 1.5;
}

/* Contact Form */
.contact-form {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--gray-200);
}

.contact-form h3 {
    font-size: 1.1rem;
    color: var(--gray-900);
    margin-bottom: 1.5rem;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

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

.form-group {
    margin-bottom: 0.5rem;
}

.form-group label {
    display: block;
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: var(--gray-900);
    font-size: 0.9rem;
}

.form-group input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius);
    font-size: 1rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-group input:focus {
    border-color: var(--primary);
    outline: none;
    box-shadow: 0 0 0 3px rgba(45, 90, 135, 0.1);
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-size: 0.95rem;
    color: var(--gray-700);
}

.checkbox-label input {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

/* Wizard Navigation */
.wizard-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--gray-200);
}

.wizard-nav .btn {
    min-width: 140px;
}

.wizard-nav .btn-large {
    min-width: 200px;
    padding: 1rem 2rem;
    font-size: 1.1rem;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: var(--radius-lg);
    max-width: 450px;
    width: 100%;
    overflow: hidden;
    animation: modalIn 0.3s ease;
}

@keyframes modalIn {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

.modal-header {
    padding: 2rem;
    text-align: center;
}

.modal-header.success {
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-dark) 100%);
    color: white;
}

.modal-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    background: rgba(255,255,255,0.2);
    border-radius: 50%;
    font-size: 2rem;
    margin-bottom: 1rem;
}

.modal-header h2 {
    margin: 0;
    font-size: 1.5rem;
}

.modal-body {
    padding: 1.5rem 2rem;
    text-align: center;
}

.modal-body p {
    margin-bottom: 0.75rem;
    color: var(--gray-700);
}

.modal-footer {
    padding: 1rem 2rem 2rem;
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.modal-footer .btn {
    flex: 1;
    max-width: 180px;
}

/* Error State */
.quote-error {
    text-align: center;
    padding: 2rem;
    color: var(--alert);
}

.quote-error .error-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

/* No services message */
.no-services {
    text-align: center;
    padding: 1rem;
    color: var(--gray-500);
    font-style: italic;
}

/* Quote Content (from JS) */
.quote-content {
    padding: 0.5rem 0;
}

.recommendation-box {
    display: flex;
    gap: 1rem;
    background: linear-gradient(135deg, rgba(125, 161, 119, 0.15) 0%, rgba(125, 161, 119, 0.05) 100%);
    border: 1px solid var(--accent);
    border-radius: var(--radius);
    padding: 1.25rem;
    margin-bottom: 1.5rem;
}

.recommendation-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.recommendation-text h4 {
    margin: 0 0 0.5rem;
    color: var(--accent);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.recommendation-text p {
    margin: 0;
    color: var(--gray-900);
    font-size: 0.95rem;
    line-height: 1.5;
}

.quote-section {
    margin-bottom: 1.5rem;
}

.quote-section h4 {
    font-size: 0.85rem;
    color: var(--gray-500);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.75rem;
}

.quote-item {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 0.75rem 1rem;
    background: var(--gray-50);
    border-radius: var(--radius);
    margin-bottom: 0.5rem;
}

.quote-item.main {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
}

.quote-item.main .item-desc {
    color: rgba(255,255,255,0.8);
}

.item-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.item-name {
    font-weight: 600;
    color: var(--gray-900);
}

.quote-item.main .item-name {
    color: white;
}

.item-desc {
    font-size: 0.85rem;
    color: var(--gray-600);
}

.item-price {
    font-weight: 600;
    color: var(--primary);
    white-space: nowrap;
    text-align: right;
}

.quote-item.main .item-price {
    color: white;
}

.item-qty {
    font-size: 0.85rem;
    font-weight: normal;
    color: var(--gray-500);
    margin-right: 0.25rem;
}

/* Totals Section */
.totals-section {
    padding: 1rem;
    background: var(--gray-50);
    border-radius: var(--radius);
    margin-bottom: 1rem;
}

.totals-section:last-child {
    margin-bottom: 0;
}

.totals-section h4 {
    font-size: 0.85rem;
    color: var(--gray-500);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--gray-200);
}

.totals-section.monthly {
    background: linear-gradient(135deg, rgba(45, 90, 135, 0.1) 0%, rgba(45, 90, 135, 0.05) 100%);
    border: 1px solid var(--primary);
}

.total-row.total-final {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--gray-900);
    border-top: 1px solid var(--gray-300);
    margin-top: 0.5rem;
    padding-top: 0.75rem;
}

.total-row.total-final.monthly {
    color: var(--primary);
    font-size: 1.25rem;
}

.quote-cta {
    text-align: center;
    margin-top: 2rem;
    padding: 1.5rem;
    background: linear-gradient(135deg, #f0f7ff 0%, #e8f4f8 100%);
    border-radius: 12px;
    border: 2px solid var(--primary, #2d5a87);
}

.quote-cta .btn-large {
    font-size: 1.1rem;
    padding: 1rem 2rem;
}

.quote-cta-sub {
    font-size: 0.85rem;
    color: var(--gray-600, #666);
    margin-top: 0.75rem;
    margin-bottom: 0.5rem;
}

.quote-cta-link {
    font-size: 0.85rem;
    color: var(--primary, #2d5a87);
    text-decoration: underline;
}

.quote-note {
    font-size: 0.85rem;
    color: var(--gray-500);
    text-align: center;
    margin-top: 1rem;
    font-style: italic;
}
