/*
 * Project Photo - Public Electronic Release
 *
 * Dedicated document presentation. The surrounding public site shell
 * remains responsible for site-wide navigation and branding.
 */

.public-release-page {
    position: relative;
    z-index: 2;
    width: min(100% - 2rem, 960px);
    margin: 0 auto;
    padding: 3rem 0 5rem;
}

.release-paper {
    box-sizing: border-box;
    width: 100%;
    max-width: 860px;
    margin: 0 auto;
    padding: clamp(1.5rem, 4vw, 4rem);
    background: #fff;
    color: #202020;
    border: 1px solid rgba(0, 0, 0, 0.12);
    border-radius: 3px;
    box-shadow: 0 1.5rem 4rem rgba(0, 0, 0, 0.18);
}

.release-document-header {
    padding-bottom: 2rem;
    border-bottom: 2px solid #202020;
}

.release-document-logo {
    margin: 0 0 1.75rem;
}

.release-document-logo img {
    display: block;
    width: auto;
    max-width: min(200px, 55%);
    max-height: 90px;
    object-fit: contain;
    object-position: left center;
}

.release-document-eyebrow,
.release-section-kicker {
    margin: 0 0 0.45rem;
    font-size: 0.75rem;
    font-weight: 700;
    line-height: 1.4;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: #666;
}

.release-document-header h1 {
    margin: 0;
    font-size: clamp(2rem, 5vw, 3.4rem);
    line-height: 1.05;
    color: #111;
}

.release-document-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem 1.5rem;
    margin-top: 1.25rem;
    font-size: 0.82rem;
    color: #666;
}

.release-document-section {
    padding: 2rem 0;
    border-bottom: 1px solid #ddd;
}

.release-document-section h2 {
    margin: 0;
    font-size: clamp(1.25rem, 3vw, 1.65rem);
    line-height: 1.2;
    color: #171717;
}

.release-section-copy {
    margin-top: 0.9rem;
    max-width: 72ch;
    color: #444;
}

.release-section-copy p {
    margin: 0 0 0.9rem;
    line-height: 1.65;
}

.release-section-copy p:last-child {
    margin-bottom: 0;
}

.release-section-fields {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.25rem 1.5rem;
    margin-top: 1.5rem;
}

.release-field {
    min-width: 0;
}

.release-field-checkbox_group,
.release-field-radio,
.release-field-textarea,
.release-field-declaration {
    grid-column: 1 / -1;
}

.release-field-label {
    display: block;
    margin-bottom: 0.45rem;
    font-size: 0.9rem;
    font-weight: 700;
    color: #202020;
}

.release-required {
    color: #8a2525;
}

.release-field-help {
    margin: 0.45rem 0 0;
    font-size: 0.82rem;
    line-height: 1.45;
    color: #666;
}

.release-field input[type="text"],
.release-field input[type="email"],
.release-field input[type="date"],
.release-field input[type="number"],
.release-field input[type="tel"],
.release-field input[type="url"],
.release-field textarea {
    box-sizing: border-box;
    width: 100%;
    min-height: 2.9rem;
    padding: 0.72rem 0.8rem;
    border: 1px solid #aaa;
    border-radius: 3px;
    background: #fff;
    color: #171717;
    font: inherit;
}

.release-field textarea {
    min-height: 7rem;
    resize: vertical;
}

.release-field input:focus,
.release-field textarea:focus {
    outline: 2px solid currentColor;
    outline-offset: 2px;
}

.release-choice-group {
    display: grid;
    gap: 0.65rem;
    margin-top: 0.5rem;
}

.release-choice {
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
    line-height: 1.45;
    cursor: pointer;
}

.release-choice input {
    flex: 0 0 auto;
    width: 1.15rem;
    height: 1.15rem;
    margin: 0.12rem 0 0;
}

.release-choice-single {
    font-weight: 600;
}

.release-disclosure {
    margin-top: 1rem;
    border: 1px solid #d2d2d2;
    border-radius: 3px;
    background: #fafafa;
}

.release-disclosure summary {
    padding: 0.9rem 1rem;
    font-weight: 700;
    cursor: pointer;
    user-select: none;
}

.release-disclosure[open] summary {
    border-bottom: 1px solid #ddd;
}

.release-disclosure .release-section-copy {
    padding: 0 1rem 1rem;
}

.release-document-footer {
    padding-top: 2rem;
}

.release-draft-notice {
    margin: 0;
    padding: 0.9rem 1rem;
    border-left: 3px solid #777;
    background: #f4f4f4;
    color: #555;
    font-size: 0.88rem;
    line-height: 1.5;
}

.release-signature-section {
    margin-top: 2.25rem;
    padding-top: 2rem;
    border-top: 2px solid #202020;
}

.release-signature-help {
    margin: 0 0 1rem;
    color: #555;
    line-height: 1.55;
}

.release-signature-pad {
    position: relative;
    width: 100%;
    height: 190px;
    overflow: hidden;
    border: 1px solid #888;
    border-radius: 3px;
    background: #fff;
}

.release-signature-canvas,
.release-signature-existing {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
}

.release-signature-canvas {
    z-index: 2;
    touch-action: none;
    cursor: crosshair;
}

.release-signature-existing {
    z-index: 1;
    object-fit: contain;
    object-position: left center;
}

.release-signature-existing[hidden] {
    display: none;
}

.release-signature-controls {
    display: flex;
    justify-content: flex-end;
    margin-top: 0.75rem;
}

.release-signature-controls button {
    min-height: 2.6rem;
    padding: 0.6rem 1rem;
    border-radius: 3px;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}

.release-signature-details {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(180px, 1fr);
    gap: 1.25rem 1.5rem;
    margin-top: 1.5rem;
}

.release-signature-date {
    box-sizing: border-box;
    min-height: 2.9rem;
    margin: 0;
    padding: 0.72rem 0.8rem;
    border: 1px solid #bbb;
    border-radius: 3px;
    background: #f5f5f5;
    color: #555;
}

.release-field-error {
    margin: 0.45rem 0 0;
    color: #8a2525;
    font-size: 0.84rem;
    font-weight: 600;
}

.release-document-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    margin-top: 1.5rem;
}

.release-document-actions button {
    min-height: 2.8rem;
    padding: 0.7rem 1.15rem;
    border-radius: 3px;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}

.release-secondary-button {
    border: 1px solid #555;
    background: #fff;
    color: #222;
}

.release-primary-button {
    border: 1px solid #222;
    background: #222;
    color: #fff;
}

.release-primary-button:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

@media (max-width: 680px) {
    .public-release-page {
        width: 100%;
        padding: 0;
    }

    .release-paper {
        padding: 1.35rem;
        border-right: 0;
        border-left: 0;
        border-radius: 0;
        box-shadow: none;
    }

    .release-section-fields {
        grid-template-columns: 1fr;
    }

    .release-field-checkbox_group,
    .release-field-radio,
    .release-field-textarea,
    .release-field-declaration {
        grid-column: auto;
    }

    .release-signature-details {
        grid-template-columns: 1fr;
    }

    .release-signature-pad {
        height: 165px;
    }

    .release-document-actions {
        flex-direction: column;
    }

    .release-document-actions button {
        width: 100%;
    }
}


.release-verification-section {
    margin-top: 2rem;
    padding: 1.35rem;
    border: 1px solid rgba(0, 0, 0, 0.14);
    border-radius: 0.5rem;
    background: rgba(0, 0, 0, 0.025);
}

.release-verification-header h2 {
    margin-top: 0.25rem;
    margin-bottom: 0.5rem;
}

.release-verification-header p:last-child {
    margin-bottom: 0;
}

.release-verification-status {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    margin-top: 1rem;
}

.release-verification-status.is-verified {
    padding: 0.85rem 1rem;
    border: 1px solid currentColor;
    border-radius: 0.4rem;
}

.release-verification-actions {
    display: grid;
    gap: 1rem;
    margin-top: 1.25rem;
}

.release-verification-code {
    display: grid;
    grid-template-columns: minmax(0, 14rem) auto;
    gap: 0.75rem;
    align-items: end;
}

.release-verification-code label {
    grid-column: 1 / -1;
    font-weight: 600;
}

.release-verification-code input {
    width: 100%;
    box-sizing: border-box;
    padding: 0.75rem;
    border: 1px solid rgba(0, 0, 0, 0.25);
    border-radius: 0.35rem;
    font: inherit;
    font-size: 1.1rem;
    letter-spacing: 0.18em;
}

.release-verification-help {
    margin: 0;
    font-size: 0.9rem;
    opacity: 0.72;
}

@media (max-width: 640px) {
    .release-verification-code {
        grid-template-columns: 1fr;
    }

    .release-verification-code input,
    .release-verification-code button {
        width: 100%;
        max-width: none;
    }
}

@media print {
    .release-document-logo img {
        max-width: 40mm;
        max-height: 22mm;
    }

    @page {
        margin: 14mm;
    }

    body {
        background: #fff !important;
    }

    .public-site-header,
    .public-site-footer,
    .public-site-background,
    .release-document-actions,
    .release-draft-notice,
    .release-signature-controls,
    .release-signature-canvas {
        display: none !important;
    }

    .public-release-page {
        width: 100%;
        margin: 0;
        padding: 0;
    }

    .release-paper {
        max-width: none;
        margin: 0;
        padding: 0;
        border: 0;
        box-shadow: none;
    }

    .release-document-section,
    .release-signature-section {
        break-inside: avoid;
    }

    .release-signature-pad {
        height: 32mm;
        border-color: #777;
    }


    .release-disclosure {
        border: 0;
        background: transparent;
    }

    .release-disclosure summary {
        display: none;
    }

    .release-disclosure .release-section-copy {
        display: block !important;
        padding: 0;
    }
}


/*
 * Completed release evidence
 */

.release-completed-value {
    box-sizing: border-box;
    min-height: 2.9rem;
    padding: 0.72rem 0.8rem;
    border: 1px solid #bbb;
    border-radius: 3px;
    background: #f5f5f5;
    color: #202020;
    line-height: 1.5;
    overflow-wrap: anywhere;
}

.release-completed-signature {
    box-sizing: border-box;
    width: 100%;
    height: 190px;
    margin-top: 1rem;
    padding: 0.75rem;
    border: 1px solid #888;
    border-radius: 3px;
    background: #fff;
}

.release-completed-signature img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: left center;
}

.release-completed-notice {
    margin: 0;
    padding: 0.9rem 1rem;
    border-left: 3px solid #376c46;
    background: #f2f7f3;
    color: #294f34;
    font-size: 0.88rem;
    line-height: 1.5;
}

@media print {
    .release-completed-signature {
        height: 32mm;
    }

    .release-completed-notice {
        border-left: 0;
        padding: 0;
        background: transparent;
        color: #444;
    }
}
