/* ========================================
   RVENTAS - Special Components CSS
   Styles for dynamic components
   ======================================== */

/* === BEFORE/AFTER COMPARISON === */
.before-after {
    background: white;
}

.comparison-container {
    max-width: 1000px;
    margin: 0 auto;
}

.comparison-wrapper {
    position: relative;
    height: 500px;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    user-select: none;
    border: 3px solid var(--gray-300);
}

.comparison-side {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px;
}

.before-side {
    left: 0;
    background: linear-gradient(135deg, #DC2626 0%, #991B1B 100%);
    clip-path: inset(0 50% 0 0);
    z-index: 2;
}

.after-side {
    right: 0;
    background: linear-gradient(135deg, #10B981 0%, #047857 100%);
    z-index: 1;
}

.side-label {
    position: absolute;
    top: 24px;
    left: 50%;
    transform: translateX(-50%);
    background: white;
    padding: 10px 24px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 14px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    z-index: 5;
}

.before-label {
    color: #DC2626;
}

.after-label {
    color: #047857;
}

/* Chaos Mockup */
.mockup-chaos {
    position: relative;
    width: 100%;
    max-width: 400px;
    height: 350px;
}

.chaos-desk {
    position: relative;
    width: 100%;
    height: 100%;
}

.paper-stack {
    position: absolute;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.paper {
    background: white;
    padding: 12px 16px;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    font-size: 13px;
    font-weight: 600;
    color: var(--gray-900);
    white-space: nowrap;
}

.stressed-person,
.happy-person {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
}

.person-icon {
    font-size: 64px;
    margin-bottom: 12px;
    animation: shake 2s ease-in-out infinite;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-3px) rotate(-2deg); }
    75% { transform: translateX(3px) rotate(2deg); }
}

.thought-bubble {
    background: white;
    padding: 12px 16px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    font-size: 12px;
    font-weight: 600;
    color: var(--gray-900);
    position: relative;
    line-height: 1.4;
}

.thought-bubble::before {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 50%;
    width: 12px;
    height: 12px;
    background: white;
    transform: translateX(-50%) rotate(45deg);
}

.thought-bubble.success {
    color: var(--success-green);
    border: 2px solid var(--success-green);
}

.chaos-float,
.success-float {
    position: absolute;
    font-size: 32px;
    animation: floatChaos 3s ease-in-out infinite;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
}

@keyframes floatChaos {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-15px) rotate(10deg); }
}

/* Order Mockup */
.mockup-order {
    position: relative;
    width: 100%;
    max-width: 400px;
    height: 350px;
}

.order-screen {
    position: relative;
    width: 100%;
    height: 100%;
}

.clean-dashboard {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
    margin-bottom: 20px;
}

.dashboard-mini-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--gray-200);
}

.mini-logo {
    background: linear-gradient(135deg, var(--primary-blue), var(--secondary-blue));
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 14px;
}

.status-dot {
    font-size: 16px;
}

.mini-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 16px;
}

.mini-stat {
    background: var(--gray-50);
    padding: 12px;
    border-radius: 8px;
    text-align: center;
}

.mini-stat-icon {
    font-size: 24px;
    margin-bottom: 4px;
}

.mini-stat-value {
    font-size: 18px;
    font-weight: 800;
    color: var(--primary-blue);
    margin-bottom: 2px;
}

.mini-stat-label {
    font-size: 11px;
    color: var(--gray-600);
}

.mini-chart {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    height: 60px;
    gap: 8px;
}

.mini-bar {
    flex: 1;
    background: linear-gradient(to top, var(--primary-blue), var(--secondary-blue));
    border-radius: 4px 4px 0 0;
    animation: growMiniBar 1s ease-out;
}

@keyframes growMiniBar {
    from { height: 0 !important; }
}

.happy-person .person-icon {
    animation: none;
}

/* Comparison Slider */
.comparison-slider {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 4px;
    cursor: ew-resize;
    z-index: 10;
    transform: translateX(-50%);
}

.slider-line {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 3px;
    background: white;
    transform: translateX(-50%);
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
}

.slider-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 64px;
    height: 64px;
    background: white;
    border-radius: 50%;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 3px solid var(--primary-blue);
}

.slider-icon {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 20px;
    font-weight: bold;
    color: var(--primary-blue);
}

.slider-instruction {
    position: absolute;
    bottom: -40px;
    left: 50%;
    transform: translateX(-50%);
    background: white;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    color: var(--primary-blue);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    white-space: nowrap;
    animation: bounce 2s ease-in-out infinite;
}

.comparison-instructions {
    text-align: center;
    margin-top: 32px;
    padding: 16px;
    background: var(--gray-50);
    border-radius: 12px;
}

/* === LIVE DASHBOARD === */
.live-dashboard {
    background: linear-gradient(135deg, var(--dark-blue), var(--darker-blue));
    border-radius: 20px;
    padding: 24px;
    color: white;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.dashboard-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    font-size: 16px;
}

.pulse-dot {
    width: 8px;
    height: 8px;
    background: var(--success-green);
    border-radius: 50%;
    animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.dashboard-time {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.6);
    font-family: monospace;
}

.dashboard-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 20px;
}

.stat-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 16px;
    transition: all 0.3s ease;
}

.stat-card:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateY(-2px);
}

.stat-icon {
    font-size: 24px;
    margin-bottom: 8px;
}

.stat-label {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 6px;
}

.stat-value {
    font-size: 24px;
    font-weight: 800;
    font-family: var(--font-display);
    color: var(--primary-blue);
    margin-bottom: 4px;
}

.stat-change {
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 4px;
    display: inline-block;
}

.stat-change.positive {
    background: rgba(0, 217, 160, 0.2);
    color: var(--success-green);
}

.stat-change.neutral {
    background: rgba(100, 210, 255, 0.2);
    color: var(--secondary-blue);
}

.dashboard-notifications {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 20px;
    max-height: 180px;
    overflow-y: auto;
}

.notification-title {
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 12px;
    color: rgba(255, 255, 255, 0.8);
}

.notification-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    margin-bottom: 8px;
    animation: slideInNotification 0.5s ease;
    font-size: 13px;
    line-height: 1.4;
}

@keyframes slideInNotification {
    from {
        transform: translateX(-20px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.notification-icon {
    font-size: 16px;
    flex-shrink: 0;
}

.notification-content {
    flex: 1;
}

.notification-time {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.4);
    margin-top: 2px;
}

.dashboard-chart {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 16px;
}

.chart-title {
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 16px;
    color: rgba(255, 255, 255, 0.8);
}

.chart-bars {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    height: 100px;
    gap: 8px;
}

.chart-bar {
    flex: 1;
    background: linear-gradient(to top, var(--primary-blue), var(--secondary-blue));
    border-radius: 4px 4px 0 0;
    position: relative;
    transition: all 0.3s ease;
    animation: growBar 1s ease-out;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding-bottom: 4px;
}

@keyframes growBar {
    from { height: 0 !important; }
}

.chart-bar.active {
    background: linear-gradient(to top, var(--success-green), var(--accent-cyan));
    box-shadow: 0 0 20px rgba(0, 217, 160, 0.5);
}

.chart-bar:hover {
    opacity: 0.8;
    transform: scaleY(1.05);
}

.chart-bar span {
    font-size: 10px;
    color: white;
    font-weight: 600;
}

/* === CALCULATORS === */
.expansion-wrapper,
.roi-calculator-wrapper {
    max-width: 1000px;
    margin: 0 auto;
}

.store-selector {
    text-align: center;
    margin-bottom: 40px;
}

.selector-label {
    font-size: 18px;
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: 20px;
}

.store-buttons {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

.store-btn {
    background: white;
    border: 2px solid var(--gray-300);
    padding: 20px 24px;
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    min-width: 140px;
}

.store-btn:hover {
    border-color: var(--primary-blue);
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(10, 132, 255, 0.2);
}

.store-btn.active {
    background: linear-gradient(135deg, var(--primary-blue), var(--secondary-blue));
    border-color: var(--primary-blue);
    color: white;
    box-shadow: 0 8px 24px rgba(10, 132, 255, 0.3);
}

.store-icon {
    font-size: 32px;
}

.store-number {
    font-size: 14px;
    font-weight: 600;
}

.expansion-inputs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-bottom: 40px;
}

.input-card {
    background: white;
    border: 2px solid var(--gray-200);
    border-radius: 16px;
    padding: 24px;
}

.input-card label {
    display: block;
    font-size: 15px;
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: 12px;
}

.range-display {
    text-align: center;
    font-size: 24px;
    font-weight: 800;
    color: var(--primary-blue);
    font-family: var(--font-display);
    margin-top: 8px;
}

.expansion-results {
    background: white;
    border: 2px solid var(--gray-200);
    border-radius: 20px;
    padding: 32px;
}

.results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 32px;
}

.result-store {
    background: linear-gradient(135deg, var(--gray-50), white);
    border: 2px solid var(--gray-200);
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    transition: all 0.3s ease;
    animation: popIn 0.5s ease;
}

@keyframes popIn {
    from {
        transform: scale(0.8);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.result-store:hover {
    transform: translateY(-4px);
    border-color: var(--primary-blue);
    box-shadow: 0 8px 20px rgba(10, 132, 255, 0.15);
}

.result-store-icon {
    font-size: 40px;
    margin-bottom: 8px;
}

.result-store-label {
    font-size: 13px;
    color: var(--gray-600);
    margin-bottom: 8px;
}

.result-store-value {
    font-size: 20px;
    font-weight: 800;
    color: var(--primary-blue);
    font-family: var(--font-display);
}

.expansion-summary {
    background: linear-gradient(135deg, var(--gray-50), white);
    border: 2px solid var(--gray-300);
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 24px;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    font-size: 15px;
}

.summary-row.highlight {
    background: rgba(10, 132, 255, 0.05);
    padding: 12px 16px;
    border-radius: 8px;
    margin: 4px 0;
}

.summary-value {
    font-weight: 800;
    font-size: 18px;
    font-family: var(--font-display);
    color: var(--gray-900);
}

.summary-value.success {
    color: var(--success-green);
}

.growth-message {
    display: flex;
    gap: 16px;
    align-items: flex-start;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1), rgba(5, 150, 105, 0.05));
    border: 2px solid var(--success-green);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 24px;
}

.growth-icon {
    font-size: 32px;
}

.growth-text strong {
    display: block;
    font-size: 16px;
    color: var(--success-green);
    margin-bottom: 4px;
}

.growth-text p {
    margin: 0;
    color: var(--gray-700);
    line-height: 1.5;
}

.expansion-cta {
    text-align: center;
}

.expansion-button {
    display: inline-block;
    width: 100%;
    padding: 18px;
    background: linear-gradient(135deg, var(--primary-blue), var(--secondary-blue));
    color: white;
    text-decoration: none;
    font-weight: 700;
    font-size: 16px;
    border-radius: 12px;
    transition: all 0.3s ease;
    box-shadow: 0 8px 24px rgba(10, 132, 255, 0.3);
}

.expansion-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 32px rgba(10, 132, 255, 0.4);
    color: white;
}

/* === ROI CALCULATOR === */
.receipt-container {
    perspective: 1000px;
    margin-bottom: 40px;
}

.receipt-paper {
    background: linear-gradient(180deg, #FAFAFA 0%, #F5F5F5 100%);
    border-radius: 8px;
    padding: 40px 32px;
    box-shadow: 
        0 2px 4px rgba(0, 0, 0, 0.1),
        0 8px 16px rgba(0, 0, 0, 0.1);
    position: relative;
    transition: transform 0.6s ease;
}

.receipt-paper:hover {
    transform: rotateX(2deg) rotateY(-2deg);
}

.receipt-header {
    text-align: center;
    margin-bottom: 32px;
    padding-top: 12px;
}

.receipt-logo {
    font-size: 48px;
    margin-bottom: 8px;
}

.receipt-header h3 {
    font-family: var(--font-display);
    font-size: 24px;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 4px;
}

.receipt-date {
    font-family: monospace;
    font-size: 12px;
    color: var(--gray-500);
}

.calculator-input-group {
    margin-bottom: 24px;
}

.calculator-input-group label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: 8px;
}

.range-value {
    display: inline-block;
    margin-top: 8px;
    font-weight: 600;
    color: var(--primary-blue);
}

.receipt-divider {
    text-align: center;
    color: var(--gray-400);
    margin: 20px 0;
    font-family: monospace;
    font-size: 14px;
}

.receipt-results {
    margin: 20px 0;
}

.result-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    font-size: 14px;
}

.result-value {
    font-weight: 700;
    font-family: var(--font-display);
}

.result-value.danger {
    color: var(--danger-red);
}

.receipt-total {
    background: rgba(239, 68, 68, 0.1);
    padding: 16px;
    border-radius: 8px;
    margin: 20px 0;
}

.total-label {
    font-size: 14px;
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: 8px;
}

.total-amount {
    font-size: 32px;
    font-weight: 900;
    font-family: var(--font-display);
}

.total-amount.danger {
    color: var(--danger-red);
}

.receipt-savings {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1), rgba(5, 150, 105, 0.1));
    padding: 20px;
    border-radius: 8px;
    text-align: center;
}

.savings-label {
    font-size: 14px;
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: 8px;
}

.savings-amount {
    font-size: 36px;
    font-weight: 900;
    font-family: var(--font-display);
    color: var(--success-green);
    margin-bottom: 8px;
}

.savings-roi {
    font-size: 14px;
    color: var(--gray-600);
}

.roi-value {
    font-weight: 700;
    color: var(--success-green);
    font-size: 18px;
}

.receipt-cta {
    margin: 24px 0;
}

.receipt-button {
    display: block;
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, var(--primary-blue), var(--secondary-blue));
    color: white;
    text-align: center;
    text-decoration: none;
    font-weight: 700;
    border-radius: 8px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 16px rgba(10, 132, 255, 0.3);
}

.receipt-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(10, 132, 255, 0.4);
    color: white;
}

.receipt-footer {
    text-align: center;
    font-size: 11px;
    color: var(--gray-500);
    margin-top: 16px;
}

/* === MOCKUP COMPONENTS === */
.mockup-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.mockup-logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.mockup-logo-icon {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, var(--primary-blue), var(--secondary-blue));
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 14px;
}

.mockup-logo-text {
    font-weight: 600;
    color: white;
    font-size: 16px;
}

.mockup-status {
    background: var(--success-green);
    color: white;
    padding: 6px 12px;
    border-radius: 50px;
    font-size: 12px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
}

.mockup-status::before {
    content: '';
    width: 6px;
    height: 6px;
    background: white;
    border-radius: 50%;
    animation: pulse-dot 2s ease-in-out infinite;
}

.mockup-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 24px;
}

.mockup-footer {
    text-align: center;
    color: var(--success-green);
    font-weight: 600;
    font-size: 14px;
}

@media (max-width: 640px) {
    .comparison-wrapper {
        height: 450px;
    }

    .paper {
        font-size: 11px;
        padding: 8px 12px;
    }

    .person-icon {
        font-size: 48px;
    }

    .thought-bubble {
        font-size: 11px;
        padding: 10px 12px;
    }

    .chaos-float,
    .success-float {
        font-size: 24px;
    }

    .expansion-inputs {
        grid-template-columns: 1fr;
    }

    .store-buttons {
        grid-template-columns: 1fr 1fr;
    }
/* Estilos para el select */

/* Estilos para el select */
#duration-selector {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23fff' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 15px center;
    padding-right: 40px;
}

#duration-selector option {
    background: #1a1a2e;
    color: #fff;
    padding: 10px;
}

/* Responsivo para selector */
@media (max-width: 768px) {
    #duration-selector {
        min-width: 200px;
        width: 100%;
        font-size: 1em;
        padding: 10px 15px;
    }
    
    div[style*="text-align: center; margin: 30px 0"] {
        padding: 0 15px;
    }
    
    div[style*="text-align: center; margin: 30px 0"] label {
        display: block;
        margin-bottom: 10px;
        font-size: 1.1em;
    }
}

/* Responsivo para tabla */
@media (max-width: 768px) {
    table {
        font-size: 0.85em;
    }
    
    table th,
    table td {
        padding: 10px 5px !important;
    }
}
}