/* azureplace: originals live in Azure and are read through a read-only mount, so "Replace file" can never work.
   The server side refuses it too (HookAzureplaceAllBeforeuploadfile); this only hides the link. */
#view_replace_link { display: none !important; }
li:has(> #view_replace_link) { display: none !important; }

/* Tags panel on the resource page (hooks/view.php) */
.azureplace-tags { clear: both; width: 100%; margin-top: 16px; }
.azureplace-tags .RecordPanel { padding: 16px 20px; }
.azureplace-tags h2 { margin: 0 0 10px; }
.azureplace-chips { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 12px; }
.azureplace-chip { display: inline-flex; align-items: center; gap: 2px; background: #1a73e8; border-radius: 4px; padding: 2px 4px 2px 10px; }
.azureplace-chip a { color: #fff !important; text-decoration: none; font-weight: 600; }
.azureplace-remove { display: inline; margin: 0; }
.azureplace-remove button { background: transparent; border: 0; color: #fff; cursor: pointer; font-size: 16px; line-height: 1; padding: 2px 6px; }
.azureplace-remove button:hover, .azureplace-remove button:focus-visible { background: rgba(255,255,255,.25); border-radius: 3px; }
.azureplace-empty { color: #666; font-style: italic; }
.azureplace-add { display: flex; gap: 8px; max-width: 520px; }
.azureplace-add input[type=text] { flex: 1; min-width: 0; padding: 8px 10px; }
.azureplace-hint { margin: 6px 0 0; font-size: 12px; color: #666; }

/* "+ Nueva carpeta" under the Folder field (hooks/edit.php). Aligned with the field column like RS's .FormHelp. */
.azureplace-nf { margin-top: -6px; }
.azureplace-nf-body { margin-left: 210px; max-width: 520px; }
.azureplace-nf-open, .azureplace-nf-create, .azureplace-nf-cancel { cursor: pointer; padding: 6px 12px; border-radius: 4px; font-weight: 600; }
.azureplace-nf-open { background: #fff; border: 1px solid #1a73e8; color: #1a73e8; }
.azureplace-nf-open:hover, .azureplace-nf-open:focus-visible { background: #e8f0fe; }
.azureplace-nf-form { border: 1px solid #c6d4ea; border-radius: 6px; background: #f7f9fd; padding: 10px 12px; }
.azureplace-nf-where { margin: 0 0 8px; font-weight: 600; }
.azureplace-nf-row { display: flex; gap: 8px; }
.azureplace-nf-row input[type=text] { flex: 1; min-width: 0; padding: 7px 10px; }
.azureplace-nf-create { background: #1a73e8; border: 1px solid #1a73e8; color: #fff; }
.azureplace-nf-create:disabled { opacity: .5; cursor: not-allowed; }
.azureplace-nf-cancel { background: transparent; border: 1px solid #aab; color: #333; }
.azureplace-nf-hint { margin: 6px 0 0; font-size: 12px; color: #666; }
.azureplace-nf-msg { margin: 6px 0 0; min-height: 1em; }
.azureplace-nf-msg.is-ok { color: #137333; font-weight: 600; }
.azureplace-nf-msg.is-error { color: #b3261e; font-weight: 600; }
@media (max-width: 900px) { .azureplace-nf-body { margin-left: 0; } }

/* RS's own "Delete" on the resource page: replaced by "Eliminar (a la Papelera)" (hooks/view.php), so a delete can
   never skip the folder manager's trash. (RS renders that link's id literally as delete_link_" . $ref . ".) */
a[id^="delete_link_"] { display: none !important; }
li:has(> a[id^="delete_link_"]) { display: none !important; }

/* "Eliminar (a la Papelera)" on the resource page */
.azureplace-del-confirm { margin: 6px 0; padding: 8px 10px; border: 1px solid #f1b7b2; background: #fdf1f0; border-radius: 6px; }
.azureplace-del-confirm p { margin: 0 0 6px; }
.azureplace-del-msg { margin: 4px 0 0; font-size: 12px; }
.azureplace-del-msg:empty { display: none; }
.azureplace-del-msg.is-error { color: #b3261e; font-weight: 600; }

/* Papelera page (pages/trash.php) and the folder modal (pages/folder_modal.php) */
.azureplace-fm { --fm-line: #d7dde6; --fm-accent: #1a73e8; --fm-danger: #b3261e; --fm-muted: #5f6368; }
.azureplace-fm-intro { color: var(--fm-muted); margin: 0 0 14px; }
.azureplace-fm-btn { cursor: pointer; padding: 7px 14px; border-radius: 4px; font-weight: 600; border: 1px solid #aab4c3; background: #fff; color: #222; }
.azureplace-fm-btn:hover:not(:disabled), .azureplace-fm-btn:focus-visible { border-color: var(--fm-accent); }
.azureplace-fm-btn:disabled { opacity: .45; cursor: not-allowed; }
.azureplace-fm-btn.is-primary { background: var(--fm-accent); border-color: var(--fm-accent); color: #fff; }
.azureplace-fm-btn.is-danger { background: var(--fm-danger); border-color: var(--fm-danger); color: #fff; }
.azureplace-fm-btn.is-small { padding: 4px 10px; font-size: 12px; }
.azureplace-fm-banner { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; padding: 10px 14px; border-radius: 6px; margin-bottom: 14px; border: 1px solid var(--fm-line); background: #f4f7fb; }
.azureplace-fm-banner[hidden] { display: none; }
.azureplace-fm-banner.is-info { border-color: #b6ccf2; background: #eef4fe; }
.azureplace-fm-banner.is-ok { border-color: #a8dab5; background: #edf7ef; color: #137333; font-weight: 600; }
.azureplace-fm-banner.is-error { border-color: #f1b7b2; background: #fdf1f0; color: var(--fm-danger); font-weight: 600; }
.azureplace-fm-banner-text { flex: 1 1 300px; }
.azureplace-fm-progress, .azureplace-md-progress { flex: 1 1 200px; height: 8px; border-radius: 4px; background: #d6e2f7; overflow: hidden; }
.azureplace-fm-progress[hidden], .azureplace-md-progress[hidden] { display: none; }
.azureplace-fm-progress > div, .azureplace-md-progress > div { height: 100%; width: 0; background: var(--fm-accent, #1a73e8); transition: width .3s; }
.azureplace-fm-confirm { border: 1px solid #f1b7b2; background: #fdf1f0; border-radius: 6px; padding: 10px 12px; margin: 8px 0; max-width: 620px; white-space: normal; }
.azureplace-fm-confirm p { margin: 0 0 8px; }
.azureplace-fm-row { display: flex; flex-wrap: wrap; gap: 8px; }
.azureplace-fm-empty { color: var(--fm-muted); font-style: italic; }
.azureplace-fm-trash-tools { margin-bottom: 10px; }
.azureplace-fm-table { width: 100%; border-collapse: collapse; background: #fff; }
.azureplace-fm-table th, .azureplace-fm-table td { text-align: left; padding: 8px; border-bottom: 1px solid var(--fm-line); vertical-align: top; }
.azureplace-fm-table th { font-size: 12px; text-transform: uppercase; color: var(--fm-muted); }
.azureplace-fm-kind { display: inline-block; font-size: 11px; padding: 1px 6px; border-radius: 3px; background: #eef1f5; color: var(--fm-muted); }
.azureplace-fm-path { word-break: break-word; color: var(--fm-muted); }
.azureplace-fm-actions { white-space: nowrap; }
.azureplace-fm-actions .azureplace-fm-btn + .azureplace-fm-btn { margin-left: 6px; }
@media (max-width: 800px) {
    .azureplace-fm-table thead { display: none; }
    .azureplace-fm-table tr { display: block; border-bottom: 1px solid var(--fm-line); padding: 6px 0; }
    .azureplace-fm-table td { display: block; border: 0; padding: 2px 8px; }
}
.azureplace-md-progress { margin: 10px 0 0; }
.azureplace-md-msg { min-height: 1em; margin: 8px 0; }
.azureplace-md-msg.is-ok { color: #137333; font-weight: 600; }
.azureplace-md-msg.is-error { color: #b3261e; font-weight: 600; }
.azureplace-md input.is-danger { background: #b3261e; border-color: #b3261e; }

/* Subfolders row above a folder's files (hooks/search.php) */
.azureplace-subfolders { margin: 0 0 8px; }
.azureplace-subfolders > h2 { margin: 16px 20px 0; font-size: 18px; }
.azureplace-subfolders > .FeaturedSimpleLinks { margin-top: 0; padding-top: 12px; }

/* The second tile of a folder that RS splits in two (files + subfolders): hidden, the files page lists the subfolders */
#CentralSpace a.FeaturedSimpleTile.azureplace-twin { display: none !important; }

/* Folder action buttons above the tiles on Colecciones destacadas pages (hooks/all.php): RS's own bar markup */
#CentralSpace .azureplace-actionbar { margin: 20px 0 0; padding: 0 32px; }
#CentralSpace .azureplace-actionbar + .FeaturedSimpleLinks { padding-top: 12px; }
@media (max-width: 1100px) { #CentralSpace .azureplace-actionbar { padding: 0 16px; } }

/* "Versiones" panel on the resource page (hooks/view.php) */
.azureplace-versions-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.azureplace-versions-head h2 { margin: 0; }
a.azureplace-fm-btn { display: inline-block; text-decoration: none; }
.azureplace-versions-table tr.is-current td { background: #f4f7fb; }
.azureplace-versions-table td { font-size: 14px; }
/* RS styles links inside record panels: keep the panel's primary button readable */
#azureplace-versions a.azureplace-fm-btn.is-primary, #azureplace-versions a.azureplace-fm-btn.is-primary:visited { background: #1a73e8 !important; border-color: #1a73e8 !important; color: #fff !important; }
#azureplace-versions a.azureplace-fm-btn:not(.is-primary) { color: #222 !important; }
