/* ── DOI Content Unlock – Frontend Styles ────────────────────────────────── */

:root {
    --dcu-primary:     #2563eb;
    --dcu-primary-dk:  #1d4ed8;
    --dcu-success:     #16a34a;
    --dcu-error:       #dc2626;
    --dcu-info:        #0284c7;
    --dcu-border:      #e2e8f0;
    --dcu-bg:          #f8fafc;
    --dcu-radius:      0.5rem;
    --dcu-shadow:      0 2px 12px rgba(0,0,0,.08);
}

/* ── Shared form base ── */
.dcu-signup-wrap,
.dcu-access-wrap {
    max-width: 520px;
    margin: 2rem auto;
}

.dcu-field { margin-bottom: 1rem; }

.dcu-field label {
    display: block;
    font-weight: 600;
    margin-bottom: .3rem;
    font-size: .9rem;
}

.dcu-field input,
.dcu-gate__fields input {
    width: 100%;
    padding: .65rem .85rem;
    border: 1px solid var(--dcu-border);
    border-radius: var(--dcu-radius);
    font-size: 1rem;
    box-sizing: border-box;
    transition: border-color .2s;
}

.dcu-field input:focus,
.dcu-gate__fields input:focus {
    outline: none;
    border-color: var(--dcu-primary);
    box-shadow: 0 0 0 3px rgba(37,99,235,.15);
}

.dcu-field-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: .75rem;
}

@media (max-width: 480px) {
    .dcu-field-row { grid-template-columns: 1fr; }
}

/* ── Button ── */
.dcu-btn {
    display: inline-block;
    padding: .7rem 1.5rem;
    background: var(--dcu-primary);
    color: #fff !important;
    border: none;
    border-radius: var(--dcu-radius);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background .2s, transform .1s;
    text-decoration: none;
}

.dcu-btn:hover  { background: var(--dcu-primary-dk); }
.dcu-btn:active { transform: scale(.98); }
.dcu-btn:disabled { opacity: .6; cursor: not-allowed; }

/* ── Notices ── */
.dcu-notice,
.dcu-message {
    padding: .8rem 1rem;
    border-radius: var(--dcu-radius);
    margin-bottom: 1rem;
    font-size: .95rem;
}

.dcu-notice.dcu-success, .dcu-message.is-success { background: #dcfce7; color: #15803d; border: 1px solid #86efac; }
.dcu-notice.dcu-info,    .dcu-message.is-info    { background: #e0f2fe; color: #0369a1; border: 1px solid #7dd3fc; }
.dcu-notice.dcu-error,   .dcu-message.is-error   { background: #fee2e2; color: #b91c1c; border: 1px solid #fca5a5; }

/* ── Privacy note ── */
.dcu-privacy-note {
    font-size: .8rem;
    color: #64748b;
    margin: .5rem 0 1rem;
}

/* ── Content gate ── */
.dcu-gate {
    border: 2px dashed var(--dcu-border);
    border-radius: var(--dcu-radius);
    padding: 2.5rem 2rem;
    text-align: center;
    background: var(--dcu-bg);
    margin: 2rem 0;
}

.dcu-gate__icon { font-size: 2.5rem; margin-bottom: .75rem; }

.dcu-gate__title {
    font-size: 1.3rem;
    font-weight: 700;
    margin: 0 0 .5rem;
}

.dcu-gate__text {
    color: #475569;
    margin-bottom: 1.5rem;
    max-width: 420px;
    margin-left: auto;
    margin-right: auto;
}

.dcu-gate__fields {
    display: flex;
    gap: .5rem;
    max-width: 480px;
    margin: 0 auto 1rem;
    flex-wrap: wrap;
}

.dcu-gate__fields input {
    flex: 1;
    min-width: 160px;
}

.dcu-gate__btn { width: auto; }

.dcu-gate__already {
    margin-top: 1rem;
    font-size: .85rem;
    color: #64748b;
}

.dcu-gate__login-link {
    color: var(--dcu-primary);
    text-decoration: underline;
}

/* ── Content list ── */
.dcu-content-list { margin: 1.5rem 0; }
.dcu-content-list h3 { margin-bottom: .75rem; }

.dcu-post-list,
.dcu-file-list {
    list-style: none;
    padding: 0;
    margin: 0 0 1rem;
}

.dcu-post-list li,
.dcu-file-list li {
    padding: .5rem .75rem;
    border: 1px solid var(--dcu-border);
    border-radius: var(--dcu-radius);
    margin-bottom: .4rem;
    background: #fff;
}

.dcu-post-list a,
.dcu-file-list a {
    color: var(--dcu-primary);
    font-weight: 500;
    text-decoration: none;
}

.dcu-post-list a:hover,
.dcu-file-list a:hover { text-decoration: underline; }

.dcu-locked-notice {
    padding: .8rem 1rem;
    background: #fef9c3;
    border: 1px solid #fde047;
    border-radius: var(--dcu-radius);
    color: #854d0e;
    font-size: .9rem;
}

/* ── Gate tabs ── */
.dcu-gate__tabs {
    display: flex;
    gap: .5rem;
    justify-content: center;
    margin: 0 0 1.25rem;
    flex-wrap: wrap;
}

.dcu-tab-btn {
    padding: .45rem 1.1rem;
    border: 2px solid var(--dcu-border);
    background: #fff;
    border-radius: 999px;
    font-size: .9rem;
    cursor: pointer;
    transition: border-color .2s, background .2s, color .2s;
    color: #475569;
}

.dcu-tab-btn--active {
    border-color: var(--dcu-primary);
    background: var(--dcu-primary);
    color: #fff;
}

.dcu-tab-btn:hover:not(.dcu-tab-btn--active) {
    border-color: var(--dcu-primary);
    color: var(--dcu-primary);
}

/* ── Newsletter opt-in checkbox ── */
.dcu-field--checkbox { margin: .75rem 0; }

.dcu-checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: .6rem;
    cursor: pointer;
    line-height: 1.45;
    font-size: .9rem;
    color: #374151;
}

.dcu-checkbox-label input[type="checkbox"] {
    width: 1.1rem;
    height: 1.1rem;
    flex-shrink: 0;
    margin-top: .15rem;
    accent-color: var(--dcu-primary);
    cursor: pointer;
}

.dcu-checkbox-label span a {
    color: var(--dcu-primary);
}

/* ── Newsletter opt-in highlight box ── */
.dcu-newsletter-optin-box {
    background: linear-gradient(135deg, #eff6ff 0%, #f0fdf4 100%);
    border: 1.5px solid #93c5fd;
    border-radius: var(--dcu-radius);
    padding: .9rem 1rem;
    margin: .75rem 0 1rem;
}

.dcu-newsletter-optin-box__inner {
    display: flex;
    align-items: center;
    gap: .5rem;
    margin-bottom: .55rem;
}

.dcu-newsletter-optin-box__icon {
    font-size: 1.3rem;
    line-height: 1;
    flex-shrink: 0;
}

.dcu-newsletter-optin-box__text strong {
    font-size: .95rem;
    color: #1e40af;
}

.dcu-newsletter-optin-box .dcu-checkbox-label {
    font-size: .88rem;
    color: #374151;
    align-items: flex-start;
}

.dcu-newsletter-optin-box .dcu-checkbox-label input[type="checkbox"] {
    margin-top: .1rem;
    accent-color: var(--dcu-primary);
}
