/* Duck Egg pages. Loads after the Digimill site stylesheet (styles.css, a copy of digimill.ie's) and adds only what those pages need. */

:root {
    --color-duckegg: #bfd6cf;
    --color-duckegg-deep: #34454a;
}

/* Product hero: app icon beside the text */
.app-icon img {
    display: block;
    width: 100%;
    max-width: 260px;
    height: auto;
    margin: 0 auto;
    border-radius: 22%;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.store-button {
    display: inline-block;
    margin-top: var(--spacing-sm);
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    background: var(--color-duckegg-deep);
    color: #fff;
    font-weight: 600;
}

.store-button:hover {
    text-decoration: none;
    opacity: 0.9;
}

.store-note {
    margin-top: var(--spacing-xs);
    font-size: 0.9rem;
    color: var(--color-text-light);
}

/* Page title band for the policy, terms and support pages */
.page-title {
    padding: var(--spacing-xl) 0 var(--spacing-lg);
    background: var(--color-background-alt);
}

.page-title h1 {
    margin-bottom: var(--spacing-xs);
}

.page-title p {
    color: var(--color-text-light);
    margin: 0;
}

/* Readable body text */
.doc {
    padding: var(--spacing-lg) 0 var(--spacing-xl);
}

.doc .container > * {
    max-width: 760px;
}

.doc h2 {
    font-size: 1.4rem;
    margin: var(--spacing-md) 0 var(--spacing-sm);
}

.doc h3 {
    margin-top: var(--spacing-md);
}

.doc p,
.doc li,
.doc td {
    color: var(--color-text-light);
}

.doc ol,
.doc ul {
    margin-bottom: var(--spacing-sm);
}

ol {
    padding-left: 1.5rem;
}

.doc .container > h2:first-child {
    margin-top: 0;
}

.steps li {
    margin-bottom: var(--spacing-sm);
}

/* Data table in the privacy policy */
.table-wrap {
    overflow-x: auto;
    margin-bottom: var(--spacing-md);
}

.doc .table-wrap {
    max-width: 100%;
}

table {
    border-collapse: collapse;
    width: 100%;
    font-size: 0.95rem;
}

th,
td {
    text-align: left;
    vertical-align: top;
    padding: 0.6rem 0.75rem;
    border-bottom: 1px solid var(--color-border);
}

th {
    font-weight: 600;
    background: var(--color-background-alt);
}

/* Short facts on the product page */
.facts {
    padding: var(--spacing-xl) 0;
}

.facts-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-md);
}

.fact {
    background: var(--color-background);
    padding: var(--spacing-md);
    border-radius: 8px;
    border: 1px solid var(--color-border);
}

.fact p {
    color: var(--color-text-light);
    margin: 0;
}

/* Open items for Chris. Every one must go before the pages are published. */
.todo {
    background: #fde68a;
    color: #1a1a1a;
    padding: 0 0.25rem;
    border-radius: 3px;
}

/* Footer links */
.footer-links {
    margin-bottom: var(--spacing-xs) !important;
}

footer a {
    color: #fff;
    text-decoration: underline;
}

/* On a phone, each table row becomes a short card with labels */
@media (max-width: 600px) {
    thead {
        display: none;
    }

    table,
    tbody,
    tr,
    td {
        display: block;
        width: 100%;
    }

    tr {
        border-bottom: 2px solid var(--color-border);
        padding: var(--spacing-xs) 0;
    }

    td {
        border-bottom: none;
        padding: 0.25rem 0;
    }

    td::before {
        content: attr(data-label);
        display: block;
        font-weight: 600;
        color: var(--color-text);
    }
}

@media (max-width: 768px) {
    .facts-grid {
        grid-template-columns: 1fr;
    }

    .page-title {
        padding: var(--spacing-lg) 0 var(--spacing-md);
    }

    .app-icon img {
        max-width: 180px;
    }
}
