/*
 * OPEN WEB PAGE SPECIFIC STYLES
 * Extends global.css
 */

/* 0. GLOBE VISUALIZATION */
#globe-canvas {
    width: 100%;
    height: 100%;
    display: block;
}

.header-media-wrapper {
    height: 60dvh;
    height: 60svh; /* fallback */
    max-width: none !important;
}

/* 1. TECH STACK - Visual flow of technologies (single horizontal line) */
.tech-stack {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    gap: 0.5rem;
    margin: 2rem 0;
    padding: 1.5rem 1rem;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    flex-wrap: nowrap;
}

.tech-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 0.75rem 0.5rem;
    flex: 1;
    max-width: 180px;
}

.tech-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 255, 255, 0.08);
    border: 1px solid rgba(0, 255, 255, 0.2);
    border-radius: 10px;
    margin-bottom: 0.75rem;
    color: #00ffff;
}

.tech-icon svg {
    width: 24px;
    height: 24px;
}

.tech-card h4 {
    font-family: 'Andale Mono', monospace;
    font-size: 0.7rem;
    color: var(--text-primary);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin: 0 0 0.35rem 0;
    white-space: nowrap;
}

.tech-card p {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin: 0;
    line-height: 1.35;
}

.tech-text {
    display: contents;
}

.tech-arrow {
    font-size: 1.25rem;
    color: var(--text-muted);
    opacity: 0.4;
    padding-top: 1rem;
    flex-shrink: 0;
}

/* 2. WORKFLOW DEMO - Visual step-by-step guide */
.workflow-demo {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin: 2rem 0;
}

.workflow-step {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
}

.workflow-step-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.25rem;
    background: rgba(255, 255, 255, 0.03);
    border-bottom: 1px solid var(--border-color);
}

.workflow-step-number {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 255, 255, 0.1);
    border: 1px solid rgba(0, 255, 255, 0.3);
    border-radius: 50%;
    font-family: 'Fira Code', monospace;
    font-size: 0.8rem;
    color: #00ffff;
    flex-shrink: 0;
}

.workflow-step-title {
    font-family: 'Andale Mono', monospace;
    font-size: 0.8rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Content Preview with MODIFIED badges */
.workflow-content-preview {
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    position: relative;
}

.preview-paragraph {
    position: relative;
    padding: 0.75rem 1rem;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 4px;
    border: 1px dashed transparent;
}

.preview-paragraph.modified {
    border-color: rgba(255, 165, 0, 0.5);
    background: rgba(255, 165, 0, 0.03);
}

.preview-paragraph p {
    margin: 0;
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

.preview-badge {
    position: absolute;
    top: -8px;
    left: 8px;
    font-family: 'Andale Mono', monospace;
    font-size: 0.6rem;
    color: #ffa500;
    background: #1a1a1a;
    border: 1px solid rgba(255, 165, 0, 0.5);
    border-radius: 3px;
    padding: 0.15rem 0.4rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.workflow-content-preview.clean .preview-paragraph {
    border-color: rgba(50, 205, 50, 0.3);
    background: rgba(50, 205, 50, 0.03);
}


/* Dev Buttons Demo */
.workflow-buttons {
    display: flex;
    gap: 1rem;
    padding: 1.25rem;
    flex-wrap: wrap;
}

.workflow-button-card {
    flex: 1;
    min-width: 240px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1rem 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    cursor: pointer;
    transition: border-color 0.2s ease, background 0.2s ease;
}

.workflow-button-card:hover {
    border-color: rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.05);
}

.workflow-button-card:active {
    background: rgba(255, 255, 255, 0.08);
}

.workflow-button-card.copied {
    border-color: rgba(50, 205, 50, 0.5);
    background: rgba(50, 205, 50, 0.05);
}

.workflow-button-card.copied .workflow-button-title {
    color: #32cd32;
}

.workflow-button-card.copied .workflow-button-command {
    color: #32cd32;
}

.workflow-button-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.workflow-button-title {
    font-family: 'Andale Mono', monospace;
    font-size: 0.75rem;
    color: var(--text-primary);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.workflow-button-icon {
    font-size: 1rem;
}

.workflow-button-command {
    font-family: 'Fira Code', monospace;
    font-size: 0.8rem;
    color: var(--text-muted);
    background: rgba(0, 0, 0, 0.3);
    padding: 0.5rem 0.75rem;
    border-radius: 4px;
    display: block;
}

.workflow-button-note {
    font-size: 0.7rem;
    color: var(--text-muted);
    opacity: 0.7;
}

/* 3. GIST LINKS */
.gist-links {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin: 1.5rem 0;
}

.gist-item {
    padding: 1.25rem;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    transition: border-color 0.2s ease;
}

.gist-item:hover {
    border-color: rgba(255, 255, 255, 0.2);
}

.gist-item h4 {
    font-family: 'Fira Code', monospace;
    font-size: 0.9rem;
    color: var(--text-primary);
    margin: 0 0 0.5rem 0;
}

.gist-item p {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin: 0 0 0.75rem 0;
    line-height: 1.5;
}

.gist-link {
    font-family: 'Andale Mono', monospace;
    font-size: 0.75rem;
    color: #00ffff;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    transition: opacity 0.2s ease;
}

.gist-link:hover {
    opacity: 0.7;
}

/* 4. DS LABEL & DS NOTE - reuse from design-system */
.ds-label {
    font-family: 'Andale Mono', monospace;
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-top: 1.75rem;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    word-spacing: -0.4em;
    display: block;
    letter-spacing: 0.05em;
}

.ds-note {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

/* 5. COMPONENT DEMO - reuse from design-system */
.component-demo {
    position: relative;
    margin-bottom: 2rem;
}

.component-demo-preview {
    padding: 1.5rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background: var(--bg-color);
    overflow: hidden;
}

/* 6. LOCALIZATION DEMO CONTAINER */
.localization-demo-container {
    width: 100%;
    max-width: 320px;
    margin: 0 auto !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    position: relative !important;
    text-align: center !important;
}

.localization-demo-container .language-dropdown {
    position: relative !important;
    top: auto !important;
    right: auto !important;
    left: auto !important;
    bottom: auto !important;
    width: 100% !important;
    margin: 1.5rem 0 0 0 !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    border-color: var(--border-color);
    background: #0a0a0a !important;
    display: flex !important;
    flex-direction: column !important;
    opacity: 1 !important;
    visibility: visible !important;
    transform: none !important;
    pointer-events: all !important;
    padding: 0 !important;
    z-index: auto !important;
}

.localization-demo-container .language-list {
    max-height: 220px;
    width: 100% !important;
}

.localization-demo-container .language-search-container {
    position: relative !important;
    z-index: 1 !important;
    background: #0a0a0a !important;
}

.localization-demo-container .language-search {
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
}

.localization-demo-container .flag-toggle {
    position: relative !important;
    margin: 0 auto !important;
    background: rgba(255, 255, 255, 0.05) !important;
    opacity: 1 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: default !important;
    border: 1px solid var(--border-color) !important;
    box-shadow: none !important;
}

.localization-demo-container .language-flag {
    background: none !important;
    background-color: transparent !important;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    display: inline-block !important;
    line-height: 1 !important;
    font-family: "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji", sans-serif !important;
    padding: 0 !important;
    margin: 0 !important;
    border: none !important;
    box-shadow: none !important;
}

.localization-demo-container .language-item span.language-flag {
    background: none !important;
    background-color: transparent !important;
    box-shadow: none !important;
}

/* 8. INLINE STYLE REPLACEMENTS (for l10n compatibility) */

/* Interactive toggle label variant - ow-30 */
.ds-label--interactive-toggle {
    margin-top: 0;
    margin-bottom: 1.5rem;
    opacity: 0.5;
}

/* 7. RESPONSIVE ADJUSTMENTS */
@media (max-width: 768px) {
    .tech-stack {
        flex-direction: column;
        gap: 0.5rem;
        padding: 1.5rem 1rem;
        flex-wrap: wrap;
    }

    .tech-arrow {
        transform: rotate(90deg);
        font-size: 1rem;
        padding: 0;
        width: 100%;
        text-align: center;
    }

    .tech-card {
        width: 100%;
        max-width: none;
        flex-direction: row;
        text-align: left;
        padding: 0.75rem;
        gap: 1rem;
    }

    .tech-icon {
        margin-bottom: 0;
        width: 44px;
        height: 44px;
        flex-shrink: 0;
    }

    .tech-text {
        display: flex;
        flex-direction: column;
        flex: 1;
    }

    .tech-card h4 {
        margin-bottom: 0.2rem;
        white-space: normal;
    }

    .tech-card p {
        font-size: 0.7rem;
    }

    .workflow-step-header {
        padding: 0.75rem 1rem;
    }

    .workflow-step-number {
        width: 24px;
        height: 24px;
        font-size: 0.7rem;
    }

    .workflow-step-title {
        font-size: 0.7rem;
    }

    .workflow-content-preview {
        padding: 1rem;
    }

    .preview-paragraph {
        padding: 0.5rem 0.75rem;
    }

    .preview-paragraph p {
        font-size: 0.8rem;
    }

    .preview-badge {
        font-size: 0.55rem;
        padding: 0.1rem 0.3rem;
    }

    .workflow-buttons {
        flex-direction: column;
    }

    .workflow-button-card {
        min-width: auto;
        max-width: 100%;
    }

    .workflow-button-command {
        font-size: 0.7rem;
        overflow-x: auto;
        white-space: nowrap;
    }

    .gist-item {
        padding: 1rem;
    }

    /* Globe responsive adjustments */
    .header-media-wrapper {
        height: 50dvh;
        height: 50svh;
    }
}
