:root {
    --primary-color: #0052CC;
    --primary-light: #0073E6;
    --success-color: #36B37E;
    --text-color: #172B4D;
    --text-light: #5E6C84;
    --background-color: #FFFFFF;
    --border-color: #DFE1E6;
    --shadow-color: rgba(0, 0, 0, 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

body {
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.5;
}

.app-container {
    max-width: 500px;
    margin: 0 auto;
    padding: 12px;
}

.screen {
    opacity: 0;
    transition: opacity 0.5s ease;
    display: none;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 20px;
}

.screen.active {
    display: block;
    opacity: 1;
}

.logo {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 12px auto 8px auto;
    width: 100%;
}

.logo img {
    max-width: 160px;
    height: auto;
    display: block;
}

h1 {
    font-size: 24px;
    margin-bottom: 15px;
    color: var(--text-color);
}

h2 {
    font-size: 20px;
    margin-bottom: 20px;
    color: var(--text-color);
}

.subheadline {
    color: var(--text-light);
    margin-bottom: 30px;
}

.primary-button {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 14px 24px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s;
    width: 100%;
    max-width: 100%;
    margin-top: 16px;
    position: sticky;
    bottom: 10px;
    z-index: 10;
}

.primary-button:hover {
    background-color: var(--primary-light);
}

.secondary-button {
    background-color: white;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
    padding: 12px 25px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    margin: 5px;
}

.secondary-button:hover {
    background-color: var(--primary-color);
    color: white;
}

.upload-zone {
    border: 2px dashed #ccc;
    padding: 20px;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.3s;
}

.upload-zone:hover {
    border-color: var(--primary-color);
}

.upload-zone i {
    font-size: 48px;
    color: #ccc;
    margin-bottom: 10px;
}

.info-card {
    background-color: white;
    border-radius: 8px;
    padding: 14px;
    margin: 10px 0;
    box-shadow: 0 2px 4px var(--shadow-color);
    width: 100%;
    text-align: left;
}

.merchant-info {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

.merchant-logo {
    flex-shrink: 0;
    margin-right: 10px;
}

.merchant-name {
    font-size: 16px;
    margin: 0;
    font-weight: 500;
}

.commerce-logo {
    width: 40px;
    height: 40px;
    object-fit: contain;
    border-radius: 4px;
    background-color: #f8f9fa;
}

.site-url {
    margin: 8px 0;
    word-break: break-word;
}

.info-card p {
    margin: 6px 0;
}

.info-card .metadata-line {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
    margin: 8px 0;
}

.info-card .metadata-line .separator {
    color: #aaa;
    margin: 0 2px;
}

.email-edit-container {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    position: relative;
}

.email-display {
    display: inline;
}

.email-input {
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 4px 8px;
    font-size: 14px;
    font-family: inherit;
    outline: none;
    min-width: 200px;
    transition: border-color 0.2s ease;
}

.email-input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(0, 82, 204, 0.1);
}

.email-edit-icon,
.email-save-icon {
    cursor: pointer;
    color: var(--primary-color);
    font-size: 14px;
    transition: all 0.2s ease;
    padding: 4px;
    border-radius: 4px;
}

.email-edit-icon:hover,
.email-save-icon:hover {
    background-color: rgba(0, 82, 204, 0.1);
    color: var(--primary-light);
    transform: scale(1.1);
}

.email-edit-icon:active,
.email-save-icon:active {
    transform: scale(0.95);
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

.cfdi-info-box {
    background-color: #eef6ff;
    border-radius: 6px;
    padding: 8px 10px;
    margin: 10px 0 6px 0;
    border-left: 2px solid #4285f4;
}

.cfdi-info-box p {
    margin: 0;
    font-size: 14px;
    color: #1a73e8;
}

.cfdi-suggestion {
    margin-top: 10px;
    padding: 10px;
    background-color: #f0f8ff;
    border-radius: 6px;
    border-left: 4px solid #3498db;
}

.progress-steps {
    display: flex;
    justify-content: space-between;
    width: 100%;
    margin: 30px 0;
}

.step {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
    position: relative;
}

.step:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 20px;
    right: 0;
    width: 100%;
    height: 2px;
    background-color: var(--border-color);
    z-index: 1;
}

.step.completed::after {
    background-color: var(--success-color);
}

.step i {
    background-color: white;
    border: 2px solid var(--border-color);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 10px;
    position: relative;
    z-index: 2;
}

.step.completed i {
    background-color: var(--success-color);
    border-color: var(--success-color);
    color: white;
}

.step.active i {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.progress-bar {
    width: 100%;
    height: 4px;
    background-color: var(--border-color);
    border-radius: 2px;
    margin: 20px 0;
    overflow: hidden;
}

.progress {
    height: 8px;
    background-color: #0073e6;
    width: 0%;
    border-radius: 10px;
    transition: width 0.5s cubic-bezier(0.4,0,0.2,1);
}

.factura-summary {
    background-color: white;
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
    box-shadow: 0 2px 4px var(--shadow-color);
    width: 100%;
    text-align: left;
}

.download-buttons {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 20px;
}

.subscription-card {
    background-color: white;
    border-radius: 8px;
    padding: 30px;
    margin: 20px 0;
    box-shadow: 0 2px 4px var(--shadow-color);
    width: 100%;
}

.price {
    font-size: 32px;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.benefits {
    list-style: none;
    margin: 20px 0;
    text-align: left;
}

.benefits li {
    margin: 10px 0;
    display: flex;
    align-items: center;
}

.benefits i {
    color: var(--success-color);
    margin-right: 10px;
}

.faq-section {
    margin-top: 40px;
    width: 100%;
}

.faq-item {
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 10px;
}

.faq-question {
    padding: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.4,0,0.2,1);
    display: block;
}

.faq-answer.open {
    max-height: 300px;
}

.confetti-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1000;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

.screen.active {
    animation: fadeIn 0.3s ease-out;
}

.info-card, .subscription-card {
    animation: slideUp 0.3s ease-out;
}

/* Mobile optimizations */
@media (max-width: 500px) {
    .app-container {
        padding: 8px;
    }

    .upload-zone {
        padding: 20px;
    }

    .primary-button, .secondary-button {
        padding: 12px 20px;
    }

    .progress-steps {
        font-size: 12px;
    }

    .step i {
        width: 30px;
        height: 30px;
        font-size: 12px;
    }

    .info-card {
        padding: 12px;
        margin: 8px 0;
    }
    
    .primary-button {
        padding: 12px 20px;
        margin-top: 12px;
    }
    
    /* Make sure button is sticky on mobile devices */
    .button-container {
        position: sticky;
        bottom: 8px;
        padding: 4px 0;
        background: linear-gradient(to top, white 60%, transparent);
        margin-top: 8px;
        z-index: 10;
    }
}

.result-container {
    margin-top: 20px;
    padding: 15px;
    border-radius: 8px;
    background-color: #f8f9fa;
}

.result-container p {
    margin: 10px 0;
}

.result-container .error {
    color: #dc3545;
    font-weight: bold;
}

.status-banner {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 6px 10px;
    margin: 6px auto;
    width: 70%;
    max-width: 320px;
    border-radius: 6px;
    font-weight: 500;
    font-size: 13px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    animation: fadeIn 0.3s ease-out;
}

.status-banner i {
    margin-right: 5px;
    font-size: 13px;
}

.status-banner.info {
    background-color: #e1f5fe;
    color: #0288d1;
    border-left: 3px solid #0288d1;
}

.status-banner.success {
    background-color: #e8f5e9;
    color: #2e7d32;
    border-left: 3px solid #2e7d32;
}

.status-banner.error {
    background-color: #ffebee;
    color: #c62828;
    border-left: 3px solid #c62828;
}

.primary-button, .secondary-button {
    transition: background 0.3s, color 0.3s, box-shadow 0.2s, transform 0.1s;
}
.primary-button:active, .secondary-button:active {
    transform: scale(0.97);
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.stepper-container {
    width: 100%;
    max-width: 380px;
    margin: 0 auto 10px auto;
    text-align: center;
}

.stepper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 0 0 15px 0;
    width: 100%;
}

.step-circle {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
    position: relative;
}

.step-circle:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 14px;
    right: -50%;
    width: 100%;
    height: 2px;
    background: #e0e0e0;
    z-index: 0;
    transition: background-color 0.3s ease;
}

.step-circle.completed:not(:last-child)::after {
    background-color: #36B37E;
}

.circle-num {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #e0e0e0;
    color: #888;
    font-weight: bold;
    font-size: 14px;
    margin-bottom: 4px;
    z-index: 1;
    transition: all 0.3s ease;
}

.circle-label {
    font-size: 11px;
    color: #888;
    margin-top: 0;
    text-align: center;
    line-height: 1.1;
    transition: color 0.3s ease;
}

.step-circle.current .circle-num {
    background: #0073e6;
    color: #fff;
}

.step-circle.current .circle-label {
    color: #0073e6;
    font-weight: bold;
}

.step-circle.completed .circle-num {
    background: #36B37E;
    color: #fff;
    font-size: 0; /* Hide number */
}

.step-circle.completed .circle-num::before {
    content: '✓';
    font-size: 18px;
    display: block;
}

.step-circle.completed .circle-label {
    color: #36B37E;
    font-weight: 500;
}

.step-circle.upcoming .circle-num {
    background: #e0e0e0;
    color: #888;
}

.step-circle.upcoming .circle-label {
    color: #888;
}

/* Status log highlight */
.status-log .status-line {
    margin-bottom: 6px;
    white-space: pre-line;
    transition: background 0.5s;
    padding: 5px 8px;
    border-radius: 4px;
}

.status-log .status-line.flash {
    background: #e0f0ff;
    animation: flash-highlight 1.5s ease-out;
}

.status-log .status-line.heartbeat {
    color: #888 !important;
    font-style: italic;
    font-size: 0.9em;
    background-color: #f8f8f8;
}

.status-log .status-line.error {
    background-color: #ffebee;
    color: #c62828;
    font-weight: 500;
}

.status-log .status-line.success {
    background-color: #e8f5e9;
    color: #2e7d32;
    font-weight: 500;
}

.status-log .status-line.info {
    background-color: #e3f2fd;
    color: #0277bd;
}

/* Retry button for connection issues */
.status-log .primary-button {
    background-color: #f44336;
    margin-top: 15px;
    margin-bottom: 10px;
    transition: all 0.3s;
}

.status-log .primary-button:hover {
    background-color: #d32f2f;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

@keyframes flash-highlight {
    0% { background-color: #e3f2fd; }
    70% { background-color: #e3f2fd; }
    100% { background-color: transparent; }
}

@media (max-width: 500px) {
    .stepper-container { max-width: 98vw; }
    .circle-label { font-size: 11px; }
    .circle-num { width: 28px; height: 28px; font-size: 13px; }
}

.status-log {
    background: #f7f7fa;
    border-radius: 10px;
    font-family: 'Fira Mono', 'Consolas', 'Menlo', monospace;
    font-size: 15px;
    color: #222;
    padding: 18px 14px;
    margin: 20px 0 0 0;
    min-height: 120px;
    max-height: 260px;
    overflow-y: auto;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    line-height: 1.6;
    transition: background 0.3s;
}

/* Success screen styles */
.success-headline {
    font-size: 26px;
    margin-bottom: 10px;
    color: var(--text-color);
    line-height: 1.3;
}

.success-subheading {
    font-size: 18px;
    margin-bottom: 24px;
    color: var(--text-light);
}

.pro-plan-card {
    background-color: white;
    border-radius: 12px;
    padding: 24px;
    margin: 20px 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    width: 100%;
    text-align: left;
    border: 1px solid var(--border-color);
}

.pro-plan-card h3 {
    font-size: 20px;
    margin-bottom: 16px;
    color: var(--primary-color);
}

.pro-plan-card .benefits {
    margin-bottom: 24px;
    padding-left: 10px;
}

.pro-plan-card .benefits li {
    margin-bottom: 12px;
    font-size: 16px;
}

.pro-plan-card .benefits i {
    color: var(--success-color);
    margin-right: 10px;
}

.promo-box {
    background-color: #FFF9E6;
    border-radius: 8px;
    padding: 16px;
    margin: 16px 0;
    border-left: 4px solid #FFD700;
}

.promo-box h4 {
    font-size: 18px;
    margin-bottom: 8px;
    color: #B8860B;
}

.countdown {
    font-size: 15px;
    color: #333;
}

#countdown-timer {
    font-weight: bold;
    font-family: monospace;
    color: #D32F2F;
}

.subscribe-button {
    background-color: var(--success-color);
    color: white;
    border: none;
    padding: 16px 30px;
    border-radius: 30px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    width: 100%;
    margin: 20px 0 10px 0;
    box-shadow: 0 4px 12px rgba(54, 179, 126, 0.25);
}

.subscribe-button:hover {
    background-color: #2A9D8F;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(54, 179, 126, 0.3);
}

.price-label {
    display: inline-block;
}

.old-price {
    text-decoration: line-through;
    opacity: 0.7;
    margin-right: 5px;
    font-size: 16px;
}

.payment-info {
    font-size: 13px;
    color: var(--text-light);
    margin-top: 8px;
    text-align: center;
}

.download-buttons {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 20px;
}

/* Button container for sticky positioning */
.button-container {
    position: sticky;
    bottom: 8px;
    padding: 4px 0;
    background: linear-gradient(to top, white 60%, transparent);
    margin-top: 8px;
    z-index: 10;
}

/* Mobile optimizations */
@media (max-width: 500px) {
    .app-container {
        padding: 8px;
    }

    .info-card {
        padding: 12px;
        margin: 8px 0;
    }
    
    .commerce-logo {
        width: 36px;
        height: 36px;
    }
    
    .merchant-info {
        margin-bottom: 8px;
    }
    
    .cfdi-info-box {
        padding: 6px 10px;
        margin: 8px 0 4px 0;
    }
    
    .primary-button {
        padding: 12px 20px;
        margin-top: 10px;
    }
} 