/**
 * @fileoverview Main styles for the QR Digital tutorial example
 * 
 * This file contains the core styling for the welcome content, tutorial steps,
 * and main content layout with responsive design.
 * 
 * Key Features:
 * - Welcome content with smooth transitions
 * - Main container structure
 * - Button components
 * - Responsive design
 */

/* ===== BASE STYLES ===== */
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: white;
    min-height: 100vh;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: flex-start;
    justify-content: center;
}

input {
    box-sizing: border-box;
}

/* ===== MAIN CONTAINER ===== */
.example-container {
    overflow: hidden;
    max-width: 57rem;
    width: 100%;
    padding-inline: 6rem;
    padding-block: 3rem;
    transition: all 0.3s ease;
    /* Use full viewport height */
    height: 100vh;
    display: flex;
    flex-direction: column;
}

.example-content {
    /* Content wrapper - take full available space */
    flex: 1;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.example-actions {
    margin-top: 20px;
    text-align: center;
}

/* ===== BUTTON COMPONENTS ===== */
.example-button {
    background: #4cb5f6;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-block;
}

.example-button:hover {
    background: #3f87c7;
    transform: translateY(-1px);
}

.example-button.secondary {
    background: #6c757d;
}

.example-button.secondary:hover {
    background: #545b62;
}

.example-button.warning {
    background: #ffc107;
    color: rgb(34, 37, 40);
}

.example-button.warning:hover {
    background: #ffc107;
}

.example-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* ===== WELCOME CONTENT ===== */
.welcome-content {
    display: flex;
    flex-direction: column;
    text-align: center;
    gap: 2rem;
    flex: 1;
    align-items: flex-start;
    height: 100%;
}

/* Welcome Typography */
.welcome-content h2 {
    color: #4cb5f6;
    margin-bottom: 20px;
    font-size: 28px;
    font-weight: 600;
}

.welcome-content p {
    color: #6c757d;
    margin-bottom: 30px;
}

/* Welcome Images */
.welcome-intro-image {
    margin: 25px 0;
    display: flex;
    justify-content: center;
}

.welcome-phone-image {
    max-width: 200px;
    width: 100%;
    height: auto;
    border-radius: 8px;
}

.desktop-image {
    display: none;
}

.mobile-image {
    display: block;
    margin: 20px 0;
}

/* Welcome Layout */
.welcome-text {
    order: 1;
    text-align: justify;
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    height: 100%;
}

.welcome-buttons {
    display: flex !important;
    gap: 15px;
    justify-content: center;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: center;
    width: 100%;
    min-width: 0;
    margin-top: auto;
}

.welcome-buttons .example-button {
    min-width: 120px;
    flex: 1 !important;
    max-width: 180px;
    display: inline-block !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ===== MAIN CONTENT ===== */
.main-content {
    display: none;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.3s ease, transform 0.3s ease;
    flex: 1;
    overflow-y: auto;
    height: 100%;
}

.main-content.show {
    opacity: 1;
    transform: translateY(0);
}

/* ===== TUTORIAL STYLES ===== */
.tutorial-step {
    min-height: 200px;
    justify-content: flex-start;
}

.tutorial-step p {
    color: #6c757d;
    font-size: 16px;
    line-height: 1.6;
    max-width: 400px;
    margin: 0 auto 20px auto;
}

/* Tutorial Typography - Responsive */
.tutorial-step h3 {
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1.4;
    margin-bottom: 1rem;
    color: #3d4461;
}

#tutorial-navigation {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin: 20px 0;
}

#tutorial-prev-button:disabled,
#tutorial-next-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ===== ACTION BUTTONS ===== */
.block-screen-actions {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin: 20px 0;
}

/* ===== LINK STYLES ===== */
.welcome-text a,
.tutorial-step a,
.fmd-modules__beauty-note a {
    color: inherit !important;
    text-decoration: none;
}

.welcome-text a:hover,
.tutorial-step a:hover,
.fmd-modules__beauty-note a:hover {
    color: inherit !important;
    text-decoration: underline;
}

/* ===== RESPONSIVE DESIGN ===== */
@media (min-width: 768px) {

    /* Container adjustments for desktop */
    .example-container {
        height: 100vh;
    }

    /* Welcome Content Desktop Layout */
    .welcome-content {
        flex-direction: row;
        align-items: flex-start;
        gap: 40px;
        text-align: left;
    }

    .welcome-content h2 {
        margin-bottom: 15px;
        font-size: 32px;
    }

    .welcome-content p {
        margin-bottom: 20px;
    }

    .welcome-text {
        flex: 1;
        order: 2;
        text-align: justify;
    }

    .desktop-image {
        display: block;
        margin: 0;
        flex-shrink: 0;
        order: 1;
    }

    .mobile-image {
        display: none;
    }

    .welcome-phone-image {
        max-width: 280px;
        border-radius: 12px;
    }

    .welcome-buttons {
        justify-content: flex-end;
        margin-top: 30px;
        flex-wrap: nowrap;
    }

    .welcome-buttons .example-button {
        min-width: 140px;
        max-width: 200px;
        padding: 14px 28px;
        font-size: 18px;
        flex: 1;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    /* Tutorial Typography - Desktop */
    .tutorial-step h3 {
        font-size: 1.5rem;
        line-height: 1.5;
    }
}

/* Mobile adjustments */
@media (max-width: 767px) {
    .example-container {
        height: 100vh;
        padding: 2rem;
    }

    .welcome-content {
        gap: 1.5rem;
    }

    /* Tutorial Typography - Mobile */
    .tutorial-step h3 {
        font-size: 1.125rem;
        line-height: 1.3;
        margin-bottom: 0.75rem;
    }

    .tutorial-step p {
        font-size: 14px;
        line-height: 1.5;
    }
}

/* Small mobile adjustments */
@media (max-width: 480px) {
    .example-container {
        padding: 1.5rem;
    }

    /* Tutorial Typography - Small Mobile */
    .tutorial-step h3 {
        font-size: 1rem;
        line-height: 1.2;
        margin-bottom: 0.5rem;
    }

    .tutorial-step p {
        font-size: 13px;
        line-height: 1.4;
    }
}