/**
 * Estilos del Wizard de Ganado
 */

/* Container principal */
.ebiolab-wizard {
    max-width: 1200px;
    margin: 40px auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* Loading overlay */
#ebiolab-loading {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.loading-spinner {
    text-align: center;
    color: white;
}

.spinner {
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top: 4px solid white;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Progress bar */
.ebiolab-progress {
    display: flex;
    justify-content: space-between;
    margin-bottom: 40px;
    position: relative;
}

.ebiolab-progress::before {
    content: '';
    position: absolute;
    top: 20px;
    left: 25%;
    right: 25%;
    height: 2px;
    background: #ddd;
    z-index: 0;
}

.progress-step {
    flex: 1;
    text-align: center;
    position: relative;
    z-index: 1;
}

.step-number {
    display: inline-block;
    width: 40px;
    height: 40px;
    line-height: 40px;
    border-radius: 50%;
    background: #ddd;
    color: #666;
    font-weight: bold;
    margin-bottom: 10px;
    transition: all 0.3s;
}

.progress-step.active .step-number {
    background: #2E75B6;
    color: white;
    box-shadow: 0 2px 10px rgba(46, 117, 182, 0.3);
}

.step-label {
    display: block;
    font-size: 14px;
    color: #666;
}

.progress-step.active .step-label {
    color: #2E75B6;
    font-weight: 600;
}

/* Steps */
.ebiolab-wizard-step {
    display: none;
}

.ebiolab-wizard-step.active {
    display: block;
    animation: fadeIn 0.3s;
}

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

.ebiolab-wizard-step h2 {
    color: #2E75B6;
    font-size: 28px;
    margin-bottom: 10px;
}

.step-description {
    color: #666;
    font-size: 16px;
    margin-bottom: 30px;
}

/* Selection counter */
#selection-counter {
    margin-bottom: 20px;
    padding: 15px;
    background: #f0f7ff;
    border-radius: 8px;
    text-align: center;
}

#selection-counter .counter {
    font-size: 18px;
    color: #666;
}

#selection-counter .counter.active {
    color: #2E75B6;
    font-weight: 600;
}

/* Carousel Wrapper and Navigation */
.carousel-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    border: 2px dashed #e0e0e0;
    border-radius: 10px;
    padding: 15px 30px;
}

.carousel-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: white;
    border: 1px solid #ddd;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    font-size: 20px;
    color: #333;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    z-index: 10;
    transition: all 0.3s ease;
}

.carousel-nav:hover {
    background: #2E75B6;
    color: white;
    border-color: #2E75B6;
}

.carousel-prev {
    left: -20px;
}

.carousel-next {
    right: -20px;
}

/* Donadoras grid (Carousel) */
.donadoras-grid {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    gap: 20px;
    margin-bottom: 30px;
    padding: 10px 5px 15px 5px;
    -webkit-overflow-scrolling: touch;
    width: 100%;
}

/* Hide scrollbar for cleaner look with arrows */
.donadoras-grid::-webkit-scrollbar {
    display: none;
}
.donadoras-grid {
    -ms-overflow-style: none; /* IE and Edge */
    scrollbar-width: none; /* Firefox */
}

.ebiolab-donadora-card {
    flex: 0 0 275px;
    scroll-snap-align: start;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    padding: 20px;
    background: white;
    cursor: pointer;
    transition: all 0.3s;
    text-align: center;
}

.ebiolab-donadora-card:hover {
    border-color: #2E75B6;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.ebiolab-donadora-card .img-donadora {
    width: 100%;
    height: 250px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 15px;
}

.ebiolab-donadora-card h3 {
    color: #333;
    font-size: 18px;
    margin: 0 0 15px 0;
    padding-bottom: 15px;
    border-bottom: 2px solid #f0f0f0;
}

.ebiolab-fechas-disponibles {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.ebiolab-fecha-option {
    display: flex;
    align-items: center;
    padding: 12px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.ebiolab-fecha-option:hover {
    background: #f8f9fa;
}

.ebiolab-fecha-option input[type="checkbox"] {
    margin-right: 12px;
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.ebiolab-fecha-option input[type="checkbox"]:checked {
    accent-color: #2E75B6;
}

.fecha-info {
    display: flex;
    justify-content: space-between;
    width: 100%;
    align-items: center;
}

.fecha-info .fecha {
    font-weight: 500;
    color: #333;
    font-size: 16px;
}

.fecha-info .costo {
    color: #2E75B6;
    font-weight: 600;
    font-size: 14px;
}

/* Total section */
.total-section {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 20px;
    margin: 30px 0;
}

.total-breakdown {
    font-size: 16px;
}

.total-breakdown .item {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid #e0e0e0;
}

.total-breakdown .item.subtotal {
    margin-top: 10px;
    padding-top: 15px;
    border-top: 2px solid #ddd;
}

.total-breakdown .item.total {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 3px solid #2E75B6;
    font-size: 20px;
    color: #2E75B6;
}

/* Receptoras */
.receptoras-option {
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 30px;
}

.receptoras-option label {
    display: block;
    font-size: 18px;
    cursor: pointer;
    margin-bottom: 20px;
}

.receptoras-option input[type="checkbox"] {
    margin-right: 10px;
    width: 20px;
    height: 20px;
    cursor: pointer;
}

#receptoras-details {
    margin-top: 20px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
}

#receptoras-details h4 {
    color: #2E75B6;
    margin-bottom: 15px;
}

.costos-list {
    list-style: none;
    padding: 0;
}

.costos-list > li {
    padding: 12px 0;
    border-bottom: 1px solid #e0e0e0;
}

.costos-list > li:last-child {
    border-bottom: none;
}

.costos-list ul {
    margin-top: 10px;
    padding-left: 20px;
    font-size: 14px;
    color: #666;
}

/* Resumen */
.resumen-section {
    margin-bottom: 30px;
    padding: 25px;
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
}

.resumen-section h3 {
    color: #2E75B6;
    font-size: 20px;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #f0f0f0;
}

.resumen-section ul {
    list-style: none;
    padding: 0;
}

.resumen-section ul li {
    padding: 12px;
    margin-bottom: 10px;
    background: #f8f9fa;
    border-radius: 6px;
}

.resumen-section ul li small {
    color: #666;
    font-size: 13px;
}

.desglose-costos .item {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid #e0e0e0;
}

/* Tabla de cuotas */
.ebiolab-table {
    width: 100%;
    border-collapse: collapse;
}

.ebiolab-table thead {
    background: #2E75B6;
    color: white;
}

.ebiolab-table th {
    padding: 12px;
    text-align: left;
    font-weight: 600;
}

.ebiolab-table tbody tr {
    border-bottom: 1px solid #e0e0e0;
}

.ebiolab-table tbody tr:hover {
    background: #f8f9fa;
}

.ebiolab-table td {
    padding: 12px;
}

.ebiolab-table .text-right {
    text-align: right;
}

/* Opciones de pago */
.pago-options {
    display: grid;
    gap: 15px;
    margin-bottom: 20px;
}

.pago-option {
    display: flex;
    align-items: start;
    padding: 20px;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s;
}

.pago-option:hover {
    border-color: #2E75B6;
    background: #f8f9fa;
}

.pago-option input[type="radio"] {
    margin-right: 15px;
    margin-top: 5px;
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: #2E75B6;
}

.pago-option .option-content {
    flex: 1;
}

.pago-option strong {
    display: block;
    font-size: 18px;
    color: #333;
    margin-bottom: 5px;
}

.pago-option p {
    margin: 0;
    color: #666;
    font-size: 14px;
}

.monto-info {
    padding: 20px;
    background: #e8f4fd;
    border-radius: 8px;
    border-left: 4px solid #2E75B6;
}

.monto-info p {
    margin: 5px 0;
}

.monto-info .small-text {
    font-size: 13px;
    color: #666;
}

/* Navigation buttons */
.wizard-navigation {
    display: flex;
    justify-content: space-between;
    gap: 15px;
    margin-top: 30px;
    padding-top: 30px;
    border-top: 2px solid #e0e0e0;
}

.ebiolab-wizard-prev,
.ebiolab-wizard-next,
#finalizar-compra {
    padding: 15px 30px;
    font-size: 16px;
    font-weight: 600;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
}

.ebiolab-wizard-prev {
    background: #f0f0f0;
    color: #333;
}

.ebiolab-wizard-prev:hover {
    background: #e0e0e0;
}

.ebiolab-wizard-next,
#finalizar-compra {
    background: #2E75B6;
    color: white;
    flex: 1;
    max-width: 300px;
    margin-left: auto;
}

.ebiolab-wizard-next:hover,
#finalizar-compra:hover {
    background: #1e5a8f;
    box-shadow: 0 4px 12px rgba(46, 117, 182, 0.3);
}

.ebiolab-wizard-next:disabled {
    background: #ccc;
    cursor: not-allowed;
    box-shadow: none;
}

.btn-primary {
    background: #28a745;
}

.btn-primary:hover {
    background: #218838;
}

.btn-primary:disabled {
    background: #ccc;
    cursor: not-allowed;
    box-shadow: none;
}

/* No data message */
.ebiolab-no-data {
    text-align: center;
    padding: 40px;
    color: #666;
    font-size: 16px;
}

/* Responsive */
@media (max-width: 768px) {
    .donadoras-grid .ebiolab-donadora-card {
        flex: 0 0 90%;
    }

    .ebiolab-progress::before {
        display: none;
    }

    .wizard-navigation {
        flex-direction: column;
    }

    .ebiolab-wizard-next,
    #finalizar-compra {
        max-width: 100%;
        margin-left: 0;
    }
}
