/* IP Research record page: what differs from the Innovation Hub detail page (detail.css). */

/* Patent titles are long sentences; keep them to about three lines. */
.bambu-detail-page.ip-record .hero-title {
    max-width: 30ch;
    font-size: clamp(28px, 3.4vw, 44px);
    line-height: 1.15;
    text-wrap: balance;
}

/* Up to four tabs: scroll sideways on phones instead of widening the card. */
.ip-record .article-card {
    align-self: stretch;
    min-width: 0;
}

.ip-record .tab-bar {
    overflow-x: auto;
    scrollbar-width: none;
}

.ip-record .tab-bar::-webkit-scrollbar {
    display: none;
}

.ip-record .tab-btn {
    flex-shrink: 0;
}

/* The record in place of a cover image. */
.ip-record .ip-cert {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    flex-wrap: wrap;
    margin-bottom: 32px;
    padding: 28px 32px;
    border: 1px solid #dbe7e5;
    border-radius: 16px;
    background:
        radial-gradient(120% 140% at 100% 0%, rgba(59, 162, 149, 0.12) 0%, rgba(59, 162, 149, 0) 55%),
        linear-gradient(180deg, #f8fafc 0%, #eef5f4 100%);
}

.ip-record .ip-cert-main {
    display: grid;
    gap: 6px;
    min-width: 0;
}

.ip-record .ip-cert-label {
    color: #0f766e;
    font-size: 13px;
    font-weight: 600;
}

.ip-record .ip-cert-number {
    color: #08162d;
    font-size: clamp(30px, 4vw, 44px);
    font-weight: 700;
    line-height: 1.05;
    letter-spacing: -0.02em;
    font-variant-numeric: tabular-nums;
}

.ip-record .ip-cert-date {
    color: #64748b;
    font-size: 13px;
    font-variant-numeric: tabular-nums;
}

.ip-record .ip-cert-side {
    display: grid;
    justify-items: end;
    gap: 8px;
}

.ip-record .ip-cert-status {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    border: 1px solid #a7f3d0;
    border-radius: 9999px;
    background: #fff;
    color: #047857;
    font-size: 13px;
    font-weight: 600;
}

.ip-record .ip-cert-status i {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: currentColor;
}

.ip-record .ip-cert-status.is-expired {
    border-color: #cbd5e1;
    color: #64748b;
}

.ip-record .ip-cert-verified {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #0f766e;
    font-size: 12px;
}

.ip-record.is-expired .ip-cert-number {
    color: #475569;
}

.ip-record .ip-record-source {
    display: inline-block;
    margin-top: 14px;
    color: #0f766e;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
}

.ip-record .ip-record-source:hover,
.ip-record .ip-record-source:focus-visible {
    text-decoration: underline;
    text-underline-offset: 3px;
}

.ip-record .ip-record-pdf {
    display: block;
    width: 100%;
    height: 720px;
    margin-top: 16px;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
}

.ip-record a.save-btn {
    text-decoration: none;
}

.ip-record a.save-btn:hover {
    border-color: #3ba295;
    color: #0f766e;
}

/* Related records: the number is the picture. */
.ip-record .ip-rel-cover {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    gap: 4px;
    padding: 18px 20px;
    background: linear-gradient(180deg, #f8fafc 0%, #eef5f4 100%);
    text-decoration: none;
}

.ip-record .ip-rel-label {
    color: #0f766e;
    font-size: 12px;
    font-weight: 600;
}

.ip-record .ip-rel-number {
    color: #08162d;
    font-size: 24px;
    font-weight: 700;
    letter-spacing: -0.01em;
    font-variant-numeric: tabular-nums;
}

.ip-record .ip-rel-cover.is-expired .ip-rel-number,
.ip-record .ip-rel-cover.is-expired .ip-rel-label {
    color: #64748b;
}

@media (max-width: 767px) {
    /* Record card on phones: register + status on one line, the number, then date and check. */
    .ip-record .ip-cert {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        grid-template-areas:
            "label status"
            "number number"
            "date date"
            "check check";
        align-items: center;
        gap: 2px 12px;
        margin-bottom: 24px;
        padding: 18px;
    }

    .ip-record .ip-cert-main,
    .ip-record .ip-cert-side {
        display: contents;
    }

    .ip-record .ip-cert-label { grid-area: label; }
    .ip-record .ip-cert-number { grid-area: number; margin-top: 4px; font-size: 32px; }
    .ip-record .ip-cert-date { grid-area: date; }

    .ip-record .ip-cert-status {
        grid-area: status;
        padding: 3px 10px;
        font-size: 12px;
    }

    .ip-record .ip-cert-verified {
        grid-area: check;
        margin-top: 10px;
        padding-top: 10px;
        border-top: 1px solid #dbe7e5;
    }

    .ip-record .ip-record-pdf {
        height: 480px;
    }
}

/* Hero on phones: full-width title, compact facts. The number is already in the breadcrumb and the record card. */
@media (max-width: 560px) {
    .bambu-detail-page.ip-record .hero-title {
        max-width: none;
        font-size: 26px;
        line-height: 1.25;
        letter-spacing: -0.01em;
        text-wrap: pretty;
    }

    .bambu-detail-page.ip-record .meta-bar {
        gap: 12px;
        padding: 14px;
    }

    .bambu-detail-page.ip-record .host-avatar {
        width: 36px;
        height: 36px;
        flex-shrink: 0;
    }

    .bambu-detail-page.ip-record .host-name {
        font-size: 14px;
        line-height: 1.35;
    }

    .bambu-detail-page.ip-record .meta-pills {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 6px;
    }

    .bambu-detail-page.ip-record .meta-pill {
        flex: 0 1 auto;
        gap: 6px;
        padding: 6px 10px;
        border-radius: 9999px;
    }

    .bambu-detail-page.ip-record .meta-pill.is-number {
        display: none;
    }

    .bambu-detail-page.ip-record .pill-text {
        font-size: 12px;
    }
}

