/* Certificate detail page */

.cert-detail-section {
    padding-top: 2rem;
    padding-bottom: 3rem;
}

/* Breadcrumb link color — override Bulma default blue */
.cert-detail-section .breadcrumb a {
    color: #daa520;
}

.cert-detail-section .breadcrumb a:hover {
    color: #f0c040;
}

.cert-detail-section .breadcrumb li.is-active a {
    color: #ccc;
}

.cert-detail-title {
    margin-bottom: 0.25rem !important;
}

.cert-detail-subtitle {
    color: #aaa;
    margin-bottom: 1.5rem !important;
}

/* PDF preview */
.cert-pdf-wrapper {
    background: #111;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    overflow: hidden;
    aspect-ratio: 11 / 8.5;
    width: 100%;
}

.cert-pdf-iframe {
    width: 100%;
    height: 100%;
    border: none;
    display: block;
}

.cert-download-row {
    margin-top: 1rem;
    text-align: center;
}

.cert-download-btn {
    font-weight: 600;
}

/* Sharing panel */
.cert-share-panel {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.cert-share-heading {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: #f0f0f0;
}

.cert-share-toggle-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.75rem;
}

.cert-toggle-label {
    font-weight: 600;
    font-size: 0.95rem;
}

/* Toggle switch */
.switch {
    position: relative;
    display: inline-block;
    width: 48px;
    height: 26px;
    flex-shrink: 0;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #555;
    transition: 0.3s;
}

.slider:before {
    position: absolute;
    content: '';
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background-color: #fff;
    transition: 0.3s;
}

.switch input:checked + .slider {
    background-color: #3fb950;
}

.switch input:checked + .slider:before {
    transform: translateX(22px);
}

.slider.round {
    border-radius: 26px;
}

.slider.round:before {
    border-radius: 50%;
}

.cert-share-help {
    font-size: 0.9rem;
    color: #888;
    margin-bottom: 1rem;
    line-height: 1.5;
}

.cert-share-url-row {
    margin-bottom: 0.75rem;
}

.cert-share-url-input {
    background: rgba(0, 0, 0, 0.3) !important;
    border-color: rgba(255, 255, 255, 0.15) !important;
    color: #ccc !important;
    font-size: 0.8rem !important;
}

.cert-share-divider {
    border-color: rgba(255, 255, 255, 0.1);
    margin: 1rem 0;
}

.cert-share-subheading {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: #f0f0f0;
}

.cert-linkedin-help {
    font-size: 0.9rem;
    color: #888;
    margin-bottom: 0.75rem;
    line-height: 1.5;
}

.cert-linkedin-btn {
    width: 100%;
    font-weight: 600;
}

.cert-share-off-message {
    margin-top: 0.75rem;
}

/* LinkedIn teaser — shown when sharing is off */
.cert-linkedin-teaser {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    background: rgba(10, 102, 194, 0.1);
    border: 1px solid rgba(10, 102, 194, 0.25);
    border-radius: 8px;
    padding: 0.85rem 1rem;
}

.cert-linkedin-teaser-icon {
    font-size: 1.6rem;
    color: #0a66c2;
    flex-shrink: 0;
    line-height: 1;
    margin-top: 0.1rem;
}

.cert-linkedin-teaser-text strong {
    display: block;
    font-size: 0.9rem;
    margin-bottom: 0.2rem;
}

.cert-linkedin-teaser-text p {
    font-size: 0.85rem;
    color: #999;
    line-height: 1.45;
    margin: 0;
}

/* Certificate info card */
.cert-info-card {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 1.5rem;
}

.cert-info-heading {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    color: #f0f0f0;
}

.cert-info-table {
    width: 100%;
    font-size: 0.9rem;
}

.cert-info-table td {
    padding: 0.35rem 0;
    vertical-align: top;
}

.cert-info-label {
    color: #888;
    white-space: nowrap;
    padding-right: 0.75rem !important;
    width: 1%;
}

.cert-info-id {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.8rem;
    color: #b8860b;
    word-break: break-all;
}

/* ===== Public shared certificate page ===== */

.cert-shared-section {
    padding-bottom: 100px;
}

.cert-verified-banner {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1rem;
    font-weight: 600;
    color: #3fb950;
    margin-bottom: 1rem;
}

.cert-shared-card {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    overflow: hidden;
}

.cert-shared-header {
    padding: 1.5rem 2rem 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.cert-shared-header .title {
    margin-bottom: 0.25rem !important;
}

.cert-shared-body {
    padding: 1.5rem 2rem;
}

.cert-shared-field {
    display: flex;
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.cert-shared-field:last-child {
    border-bottom: none;
}

.cert-shared-label {
    color: #888;
    width: 130px;
    flex-shrink: 0;
    font-size: 0.9rem;
}

.cert-shared-value {
    font-size: 0.95rem;
}

.cert-shared-name {
    font-weight: 700;
    font-size: 1.1rem;
}

.cert-shared-footer {
    padding: 1rem 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    justify-content: center;
}

.cert-shared-brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #888;
    font-size: 0.85rem;
}

.cert-shared-brand:hover {
    color: #daa520;
}

.cert-shared-logo {
    height: 28px;
    width: auto;
}

/* Responsive */
@media screen and (max-width: 768px) {
    .cert-pdf-wrapper {
        aspect-ratio: auto;
        height: 350px;
    }

    .cert-shared-field {
        flex-direction: column;
        gap: 0.15rem;
    }

    .cert-shared-label {
        width: auto;
    }

    .cert-shared-body {
        padding: 1rem 1.25rem;
    }

    .cert-shared-header,
    .cert-shared-footer {
        padding-left: 1.25rem;
        padding-right: 1.25rem;
    }
}
