/* Hide the embedded PDF player ONLY on Item pages */
.item.show .media.application-pdf, 
.item.show iframe[src*="pdf"], 
.item.show .pdf-embed {
    display: none !important;
}

/* Ensure the file/download link remains visible on Item pages */
.item.show .media-render a, 
.item.show .file-link {
    display: inline-block !important;
}

/* Force the PDF player to show up normally on Media pages */
.media.show .media.application-pdf,
.media.show iframe[src*="pdf"],
.media.show .pdf-embed {
    display: block !important;
}

/* Adjust the height of embedded JPEG images on item pages */
.media.image-jpeg img, 
.media-render img[src*=".jpg"], 
.media-render img[src*=".jpeg"] {
    max-height: 400px !important; /* Change 400px to your preferred height */
    width: auto !important;       /* Keeps the image aspect ratio perfect */
    object-fit: contain;          /* Prevents the image from distorting */
}

/* Tighten spacing between metadata fields */
.property {
    margin-bottom: 0.25rem !important; /* Reduces space below each field */
    padding-bottom: 0.20rem !important;
}

.property .value {
    margin-bottom: 0.20rem !important; /* Tightens space between multiple values */
}

.property .property-label {
    margin-bottom: 0.125rem !important; /* Brings the label closer to its value */
}


/* Hide the text header that reads Item above the metadata */
.item.show h3,
.resource.show h3,
.block h3 {
    display: none !important;
}

/* Style the toggle button box */
.property:has(dt:has-text("Extracted Text")),
#values-description {
    display: block !important;
}

/* Turn the field container into a clean, clickable toggle look */
details.extracted-text-toggle {
    background: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 10px;
    margin-top: 10px;
}

/* Style the clickable button head */
details.extracted-text-toggle summary {
    font-weight: bold;
    cursor: pointer;
    color: #0056b3; /* Changes text to a link blue */
    outline: none;
    user-select: none;
}

/* Add a hover effect to show it is interactive */
details.extracted-text-toggle summary:hover {
    text-decoration: underline;
}

/* Style the expanded inner text block */
details.extracted-text-toggle .toggle-content {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #eee;
    white-space: pre-wrap; /* Keeps line breaks intact */
}
