/*
    Page
*/

.page {
    max-width: 400px;
    width: 100%;
    margin: 0 auto;
    border-radius: 8px;
    min-height: calc(100svh - 32px);
    background-color: var(--color-black);

    display: flex;
    flex-direction: column;
}

.page-section {
    padding: 1rem;
    gap: 1rem;
}

.page-cta {
    margin-top: auto;
    padding: 1rem 1rem 2rem;
    gap: 1rem;
}

.page-countdown {
    height: 100%;
    margin: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

/* 
    Modal
*/

.modal-wrapper {
    position: fixed;
    inset: 0;
    padding: 2rem 1rem;
    display: flex;
    justify-content: center;
    align-items: center;
    max-height: 100svh;
    background-color: rgba(0, 0, 0, 0.8);
}

.modal-close-target {
    position: fixed;
    inset: 0;
}

.modal {
    background-color: var(--color-surface);
    border-radius: 1rem;
    max-width: 400px;
    z-index: 1;
}

.modal-title,
.modal-text,
.modal-consents {
    padding: 1rem;
}

/* 
    Form 
*/

.form-consents {
    padding: 1rem;
}


.form-hr {
    margin: 1rem 0;
    height: 1px;
    border: 0;
    background-color: rgba(255, 255, 255, 0.25);
}

.form-fields {
    padding: 0.5rem 1rem;
}

.form-error {
    color: var(--color-red);
    padding: 0.5rem 1rem;
}

.form-actions {
    display: flex;
    padding: 1rem;
    gap: 1rem;
}

.form-actions .button {
    width: 100%;
}

/* Button */
.button {
    padding: 0.5rem 0.75rem;
    border-radius: 8px;
    text-align: center;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    transition: background-color 200ms ease, color 200ms ease, opacity 200ms ease;
    cursor: pointer;
    background-color: var(--color-surface);
    font-weight: 500;
    
    display: flex;
    align-items: center;
}

.button:hover,
.button:focus-visible {
    background-color: var(--color-black-deep);
}

.button.button--icon {
    padding: 0.25rem;
    aspect-ratio: 1/1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.button.button--icon svg {
    width: 1.5rem;
    height: 1.5rem;
}

/* Button: Primary */
.button.primary {
    background-color: var(--color-white);
    color: var(--color-black);
}

.button.primary:hover,
.button.primary:focus-visible {
    background-color: var(--color-gray);
    outline: none;
}

.button.primary:active {
    background-color: var(--color-gray);
}

/* Button: Pink */
.button.pink {
    background-color: rgba(255, 92, 233, 1);
    color: white;
}

.button.pink:hover,
.button.pink:focus-visible {
    background-color: rgba(255, 92, 233, 0.75);
    color: white;
}

.button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

/* Button: Ghost */
.button.ghost {
    background-color: transparent;
    color: var(--color-white);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.3);
}

.button.ghost:hover,
.button.ghost:focus-visible {
    background-color: rgba(255, 255, 255, 0.08);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.6);
    outline: none;
}

.button.ghost:active {
    background-color: rgba(255, 255, 255, 0.15);
}

/* 
    Checkbox 
*/
.checkbox {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--color-gray);
}

.checkbox input {
    border: 0;
    background-color: rgba(0, 0, 0, 1);
}


/* Field */
.field {
    display: block;
    background-color: var(--color-black-deep);
    padding: 0.5rem;
    border-radius: 4px;
}

.field-input {
    background-color: transparent;
    border: 0;
    color: inherit;
    width: 100%;
    outline: none;
    transition: opacity 200ms ease, color 200ms ease;
}

.field-input:hover {
    opacity: 0.8;
}

.field-input:focus,
.field-input:focus-visible {
    outline: none;
    opacity: 1;
}

.field:has(.field-input:focus-visible) {
    outline: 2px solid var(--color-white);
    outline-offset: 2px;
}

.field-input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.field-input:autofill,
.field-input:-webkit-autofill,
.field-input:-internal-autofill-selected {
    -webkit-text-fill-color: var(--color-white);
    caret-color: var(--color-white);
    box-shadow: 0 0 0 1000px var(--color-black-deep) inset;
    -webkit-box-shadow: 0 0 0 1000px var(--color-black-deep) inset;
    transition: background-color 9999s ease-in-out 0s;
}


/*
    Consent Modal
*/

.consent {
    position: fixed;
    inset: 0;
    z-index: 1000;
    padding: 1rem;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    max-height: 100svh;
    overflow-y: auto;
}

.consent[hidden] {
    display: none;
}
 
.consent-container {
    width: 400px;
    max-width: 100vw;
    padding: 1rem;
}

.consent-title {
    font-size: 24px;
    margin-bottom: 2rem;
}

.consent-instructions {
    width: 100%;
    line-height: 1.4;
}

.consent-actions {
    margin-top: 2rem;
    width: 400px;
    max-width: 100vw;
    padding: 1rem;
}

.consent-item {
    padding-top: 0.5rem;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    font-size: 13px;
    line-height: 1.4;
    border-top: 1px solid rgba(255, 255, 255, 0.25);
    color: rgba(255, 255, 255, 0.75);
}

.consent-item input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    width: 1.25rem;
    height: 1.25rem;
    flex-shrink: 0;
    margin-top: 0.15rem;
    border-radius: 4px;
    background-color: var(--color-black-deep);
    border: 1px solid rgba(255, 255, 255, 0.2);
    cursor: pointer;
    display: grid;
    place-content: center;
    transition: background-color 150ms ease, border-color 150ms ease;
}

.consent-item input[type="checkbox"]:hover {
    border-color: rgba(255, 255, 255, 0.4);
}

.consent-item input[type="checkbox"]:checked {
    background-color: var(--color-surface);
    border-color: rgba(255, 255, 255, 0.5);
}

.consent-item input[type="checkbox"]:checked::after {
    content: '';
    width: 0.7rem;
    height: 0.7rem;
    background-color: var(--color-white);
    border-radius: 2px;
}

.consent-confirm {
    margin-top: 2rem;
    margin-left: auto;
}

/*
    Claim Modal
*/

.claim {
    position: fixed;
    inset: 0;
    z-index: 1000;
    padding: 2rem 1rem;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    max-height: 100svh;
    overflow-y: auto;
}

.claim[hidden] {
    display: none;
}

.claim-number {
    text-align: center;
    font-size: 24px;
}

.claim-number,
.claim-entity-content,
.claim-enter {
    width: 400px;
    max-width: 100vw;
    margin-bottom: 1rem;
    padding: 1rem;
}

.claim-enter {
    margin-top: 2rem;
    display: flex;
    justify-content: center;
}

/*
    Entity
*/

.entity {
    display: flex;
    gap: 1rem;
}

.entity.open {
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--color-surface);
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
    max-width: 400px;
}

.entity-cover {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.entity-info {
    text-align: left;
}

.entity-content {
    display: none;
    flex-direction: column;
    text-align: left;
}

.entity.open .entity-content {
    display: block;
}


/* Notification */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background-color: #fff;
    border: 1px solid #ccc;
    padding: 10px;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    z-index: 1000;
}

.notification--success {
    background-color: #d4edda;
    border-color: #c3e6cb;
    color: #155724;
}

.notification--error {
    background-color: #f8d7da;
    border-color: #f5c6cb;
    color: #721c24;
}

.notification--warning {
    background-color: #fff3cd;
    border-color: #ffeaa7;
    color: #856404;
}

.notification--info {
    background-color: #d1ecf1;
    border-color: #bee5eb;
    color: #0c5460;
}

/*
    Performer Prompt
*/

.performer-prompts {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    display: flex;
    flex-direction: column;
}

.performer-prompt {
    position: relative;
    padding: 1rem;
    position: fixed;
    inset: 0;

    background-color: var(--color-red);
    color: var(--color-white);
    display: flex;
    align-items: center;
    animation: performer-prompt-in 200ms ease;
    overflow: hidden;
    transition: padding 300ms ease, opacity 300ms ease;
}

.performer-prompt--minimized {
    position: static;
    padding: 0.75rem 0.5rem;
    z-index: 100;
}

.performer-prompt-title {
    font-size: 26px;
    font-weight: 600;
    line-height: 1.2;
}

.performer-prompt-message {
    font-size: 20px;
    font-weight: 400;
    line-height: 1.2;
}

.performer-prompt-progress {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background-color: white;
    animation: performer-prompt-progress linear forwards;
    transform-origin: left;
}

@keyframes performer-prompt-progress {
    from { transform: scaleX(1); }
    to   { transform: scaleX(0); }
}

.performer-prompt-close {
    position: absolute;
    top: 0;
    right: 0;
}

@keyframes performer-prompt-in {
    from {
        opacity: 0; transform: translateY(-8px);
    }

    to {
        opacity: 1; transform: translateY(0);
    }
}

.performer-prompt-close {
    background: none;
    border: none;
    color: inherit;
    cursor: pointer;
    padding: 0.5rem;
    width: 3rem;
    height: 3rem;
    font-size: 32px;
    text-align: center;
    flex-shrink: 0;
    transition: opacity 150ms ease;
}

.performer-prompt-close:hover,
.performer-prompt-close:focus-visible {
    opacity: 0.8;
}

/*
    Default page (e.g. Privacy Policy)
*/

.default {
    padding: 1rem;
    line-height: 1.5;
}

.default-title {
    font-size: 24px;
    margin-bottom: 1.5rem;
}

.default-content {
    color: rgba(255, 255, 255, 0.85);
}

.default-heading {
    font-size: 14px;
    margin-top: 1.75rem;
    margin-bottom: 0.5rem;
    color: var(--color-white);
}

.default-text {
    margin-bottom: 0.75rem;
    font-size: 14px;
}

.default-text p {
    margin-bottom: 0.75rem;
}

.default-text a {
    color: var(--color-white);
    text-decoration: underline;
}

/*
    Instructions (API reference)
*/

.instructions {
    max-width: 760px;
}

.instructions-main {
    padding: 1.5rem 1rem 4rem;
    display: flex;
    flex-direction: column;
    gap: 3rem;
}

.instructions-header {
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    padding-bottom: 1.5rem;
}

.instructions-title {
    font-size: 28px;
    margin-bottom: 0.75rem;
}

.instructions-subtitle {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 0.5rem;
}

.instructions-note {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.4);
}

.instructions-section {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.instructions-section p {
    font-size: 14px;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.8);
}

.instructions-section-title {
    font-size: 18px;
    font-weight: 600;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.instructions-sub {
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: rgba(255, 255, 255, 0.5);
    margin-top: 0.5rem;
}

.instructions-tag {
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.1em;
    padding: 0.2em 0.6em;
    border-radius: 4px;
    width: fit-content;
}

.instructions-tag--get {
    background-color: rgba(0, 200, 120, 0.15);
    color: rgb(0, 200, 120);
}

.instructions-tag--post {
    background-color: rgba(100, 150, 255, 0.15);
    color: rgb(120, 160, 255);
}

.instructions-code {
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    padding: 1rem;
    overflow-x: auto;
    font-size: 12px;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.85);
}

.instructions-code code {
    font-family: monospace;
}

.instructions-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.instructions-table th {
    text-align: left;
    padding: 0.5rem 0.75rem;
    background-color: rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.5);
    font-weight: 600;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.instructions-table td {
    padding: 0.5rem 0.75rem;
    border-top: 1px solid rgba(255, 255, 255, 0.07);
    color: rgba(255, 255, 255, 0.75);
    vertical-align: top;
    line-height: 1.5;
}

.instructions-table code {
    font-family: monospace;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.9);
}

.instructions-section code {
    font-family: monospace;
    font-size: 12px;
    background-color: rgba(255, 255, 255, 0.08);
    padding: 0.1em 0.35em;
    border-radius: 3px;
}

