/*
Base styles shared by every demo page. The file defines the two layouts:
`show-page` for a plain chart and `integrate-page` for charts with copy
instructions. All sizing relies on flex utilities and grid so the pages
adapt naturally without media queries. The CSS stays lightweight and easy
to maintain.
*/
@import url('https://fonts.googleapis.com/css2?family=Work+Sans:wght@300;400;500;600;700&display=swap');

* { box-sizing: border-box; }

body {
    font-family: 'Work Sans', sans-serif;
    margin: 0;
    line-height: 1.6;
    color: #2c3e50;
    background: #f8fafc;
}

.show-page,
.integrate-page {
    display: flex;
    justify-content: center;
    min-height: 100vh;
}

.show-page { 
    align-items: center; 
    background: transparent;
    padding: 0;
    overflow-y: auto;
}

.integrate-page {
    align-items: flex-start;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 40px 20px;
}

.integrate-layout {
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
    max-width: 1100px;
    width: 100%;
    align-items: flex-start;
}

.instructions {
    background: #ffffff;
    padding: 24px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    max-width: 460px;
    width: 100%;
    flex: 1 1 300px;
}

.instructions h2 {
    margin-top: 0;
    font-size: 24px;
    font-weight: 600;
    color: #2c3e50;
}

.instructions p { color: #64748b; }

.back-home {
    display: inline-flex;
    align-items: center;
    margin-right: 24px;
    text-decoration: none;
    color: white;
    font-weight: 500;
    font-size: 16px;
    padding: 12px 20px;
    background: rgba(255,255,255,0.1);
    border-radius: 8px;
}

.home-page {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 60px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    color: white;
}

.home-header { text-align: center; margin-bottom: 60px; }
.home-header h1 { margin: 0 0 16px; font-size: 48px; }
.home-header p { margin: 0; font-size: 20px; opacity: 0.9; max-width: 600px; }

.home-content { max-width: 800px; width: 100%; }
.home-list { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 24px; }
.home-list a { display: flex; align-items: center; justify-content: space-between; padding: 24px 28px; background: white; border-radius: 16px; text-decoration: none; color: #2c3e50; font-weight: 500; box-shadow: 0 10px 30px rgba(0,0,0,0.1); }


/*
Styles for the iframe snippet and copy button shown on each integrate
page. The snippet uses a monospace font and sits next to the button so
users can copy the code easily on any screen size. The button turns
green when the code has been copied.
*/
.code-container {
    display: flex;
    align-items: stretch;
    margin-top: 20px;
    gap: 8px;
}

.copy-snippet {
    flex: 1;
    resize: none;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    padding: 12px;
    font-family: monospace;
    font-size: 14px;
    background: #f8fafc;
    color: #0f172a;
}

.copy-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border: none;
    border-radius: 8px;
    background: #667eea;
    color: #ffffff;
    font-size: 14px;
    font-weight: 500;
    padding: 0 16px;
    cursor: pointer;
    transition: background 0.2s;
}

.copy-btn.copied { background: #22c55e; }
