/* Pico.css customizations */

:root {
    --pico-font-size: 100%; /* stop pico scaling text */
}

html, body {
    height: 100%;
}

/* Center body content */
body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

main.container {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

/* Center the base.html header */
main.container > h1 {
    text-align: center;
    margin-bottom: 2.5rem;
    font-weight: 500;
}

/* Center card content */
article {
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
    padding: var(--pico-spacing);
    border: 1px solid color-mix(in srgb, var(--pico-secondary-border) 25%, transparent);
    border-radius: 0.5rem;
}

/* Add spacing for card content */
article > * + * {
    margin-top: 1rem;
}

/* Center card paragraphs */
article > p {
    text-align: center;
}

/* Buttons */
button[type="button"], button[type="submit"] {
    margin-bottom: 0;
}

button.full-width, a.full-width {
    width: 100%;
}

button.copy-btn {
    padding: 0 1rem;
    width: auto;
}

/* Copy button positioned in textarea */
.textarea-wrapper {
    position: relative;
}

.textarea-wrapper textarea {
    padding-right: 3.5rem; /* Space for button */
}

.copy-btn-overlay {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    padding: 0.5rem;
    margin-bottom: 0;
}

/* Expired icon - uses CSS mask for theme adaptation */
.expired-icon {
    width: 100px;
    height: 100px;
    margin: 0 auto;
    background-color: black;
    -webkit-mask: url('../../images/link-break.svg') center/contain no-repeat;
    mask: url('../../images/link-break.svg') center/contain no-repeat;
}

@media (prefers-color-scheme: dark) {
    .expired-icon {
        background-color: white;
    }
}

/* Arrow icon - uses CSS mask colored with primary theme color */
.arrow-icon {
    display: inline-block;
    width: 24px;
    height: 24px;
    vertical-align: middle;
    margin-left: 0.25rem;
    background-color: currentColor;
    -webkit-mask: url('../../images/arrow-right-md.svg') center/contain no-repeat;
    mask: url('../../images/arrow-right-md.svg') center/contain no-repeat;
}

/* GitHub footer - uses CSS mask for theme adaptation */
.github-footer {
    text-align: center;
    padding: 1rem;
    flex-shrink: 0;
}

.github-icon {
    width: 1.4rem;
    height: 1.4rem;
    margin: 0 auto;
    background-color: black;
    opacity: 0.2;
    -webkit-mask: url('../../images/github.svg') center/contain no-repeat;
    mask: url('../../images/github.svg') center/contain no-repeat;
    transition: opacity 0.2s ease;
}

.github-icon:hover {
    opacity: 0.4;
}

@media (prefers-color-scheme: dark) {
    .github-icon {
        background-color: white;
    }
}

/* Miscellaneous */
.red {
    color: #e74c3c;
}
