body {
    font-family: Arial, sans-serif;
    background-color: var(--pg-global-color-bg);
    color: var(--pg-global-color-text);
    margin: 0;
    padding: 0;
}

body,
html {
    overflow-x: hidden;
}

table {
    width:100%;
    border-collapse: collapse;
    margin: 25px 0;
    min-width: 400px;
    box-shadow: 0 0 20px rgb(255 255 255 / 7%);
}

table thead tr {
    background-color: #000;
    color: #ffffff;
    text-align: left;
}

table th,
table td {
    padding: 12px 15px;
}

table tbody tr {
    
}

table tbody tr:nth-of-type(even) {
    background-color: #ffffff0a;
}

table tbody tr:last-of-type {
    border-bottom: 2px solid var(--pg-global-color-primary);
}

table tbody tr.active-row {
    font-weight: bold;
    color: #009879;
}


input[type="text"],
input[type="search"],
input[type="email"],
input[type="password"],
input[type="number"],
select,
textarea,
.select2-container--default .select2-selection--multiple {
    height: 40px;
    padding: 5px 10px;
    box-sizing: border-box;
    border-radius: 7px;
    border: 1px solid rgba(255,255,255,0.1);
    font-size: 18px;
    background: #181b22;
    color: var(--pg-global-color-text);
}

input[disabled],
textarea[disabled],
select[disabled],
button[disabled] {
    opacity:0.3;
}

textarea {
    min-height:120px;
}

input[type="checkbox"],
input[type="radio"] {
  display: inline-block;
  height: 25px;
  width: 25px;
  border: 1px solid rgba(255,255,255,0.1);
  overflow: hidden;
  vertical-align: middle;
  -webkit-appearance: none;
    background-color: #181b22;
    background-size:0;
    background-position:center;
    background-repeat:no-repeat;
  text-decoration: none!important;
  -moz-border-radius:2px;
  -webkit-border-radius:2px;
  -o-border-radius:2px;
  -ms-border-radius:2px;
  border-radius:7px;
    font-size: 14px;
    line-height: 16px;
    cursor:pointer;
    transition:all 0.2s ease-in-out 0s;
}
input[type="checkbox"]:focus,
input[type="radio"]:focus {
    outline: 0;
}

@media (min-width:1025px) {

    input[type="checkbox"]:not(:checked):not(:indeterminate):hover,
    input[type="radio"]:not(:checked):not(:indeterminate):hover {
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='405.272' height='405.272'%3E%3Cpath d='M393.4 124.425L179.603 338.208c-15.832 15.835-41.514 15.835-57.36 0L11.878 227.836c-15.838-15.835-15.838-41.52 0-57.358s41.52-15.84 57.355-.006l81.698 81.7L336.037 67.064c15.84-15.84 41.523-15.83 57.358 0 15.835 15.838 15.835 41.514.006 57.36z' fill='%23999'/%3E%3C/svg%3E");
        background-size:12px;
    }

}

input[type="checkbox"]:checked,
input[type="checkbox"]:indeterminate,
input[type="radio"]:checked
{
    border-color: var(--pg-global-color-primary)!important;
    background-color: var(--pg-global-color-primary)!important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='405.272' height='405.272'%3E%3Cpath d='M393.4 124.425L179.603 338.208c-15.832 15.835-41.514 15.835-57.36 0L11.878 227.836c-15.838-15.835-15.838-41.52 0-57.358s41.52-15.84 57.355-.006l81.698 81.7L336.037 67.064c15.84-15.84 41.523-15.83 57.358 0 15.835 15.838 15.835 41.514.006 57.36z' fill='%23fff'/%3E%3C/svg%3E");
    background-size:12px;
    background-position:center;
    background-repeat:no-repeat;
    animation: 0.5s pulse;
}

button,
.button,
.swal2-styled.swal2-confirm,
.swal2-styled.swal2-cancel {
    background: #212121;
    color: #fff;
    padding: 10px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 11px;
    text-transform: uppercase;
    transition:background .2s ease-in-out;
    border: 1px solid #ffffff1f;
    line-height: 12px;
}

button:hover,
.button:hover  {
    background: #ffffff14;
}

button:focus,
.button:focus,
.swal2-styled:focus {
    outline: none;
    box-shadow: 0 0 0 1px #19191a, 0 0 0 2px var(--pg-global-color-primary);
}

button .icon,
.button .icon {
    width:13px;
    height:13px;
}

.button-icon {
    display: flex;
    align-items: center;
}

.button-icon .icon {
    padding: 10px;
    margin: -10px 10px -10px -10px;
    background: #ffffff0d;
    border-radius: 4px;
}

.button-icon-right {
    justify-content:space-between;
}

.button-icon-right .icon {
    order:2;
}

.button-primary {
    background: linear-gradient(122deg, var(--pg-global-color-bg-start) 0.01%, var(--pg-global-color-bg-end) 70%) !important;
    font-weight: 400;
    border-width: 0;
}

.button-primary:hover {
    box-shadow: rgba(var(--pg-global-color-primary-rgb), 0.3) 0 5px 1rem 0;
}

.button-lg {
    min-width:11.5rem;
    padding-inline-start: 3rem;
    padding-inline-end: 3rem;
    height:2.5rem;
    padding-top:0;
    padding-bottom:0;
    line-height: 1.5rem;
    font-size: 0.9375rem;
    vertical-align: middle;
    display: inline-flex;
    appearance: none;
    -webkit-box-align: center;
    align-items: center;
    -webkit-box-pack: center;
    justify-content: center;
    user-select: none;
    position: relative;
}

/* Base styles for range input */
input[type="range"] {
    -webkit-appearance: none; /* Override default look */
    appearance: none;
    width: 100%; /* Full-width */
    height: 10px; /* Height of the slider */
    background: none; /* Track background */
    outline: none; /* Remove outline */
    opacity: 0.7; /* Slider opacity */
    transition: opacity .15s ease-in-out;
    position: relative;
}

input[type="range"]:hover {
    opacity: 1; /* Fully opaque on hover */
}

/* Track styles */
input[type="range"]::-webkit-slider-runnable-track {
    width: 100%;
    height: 10px;
    cursor: pointer;
    background: none;
    border-radius: 5px;
    border: 1px solid #6a6a6a;
}

input[type="range"]::-moz-range-track {
    width: 100%;
    height: 10px;
    cursor: pointer;
    background: none;
    border-radius: 5px;
    border: 1px solid #6a6a6a;
}

/* Thumb styles */
input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px; /* Width of the thumb */
    height: 20px; /* Height of the thumb */
    background: var(--pg-global-color-primary); /* Thumb color */
    cursor: pointer;
    border-radius: 50%; /* Circular thumb */
    box-shadow: 0 0 2px rgba(0, 0, 0, 0.5); /* Subtle shadow */
    margin-top:-5px;
}

input[type="range"]::-moz-range-thumb {
    width: 20px;
    height: 20px;
    background: var(--pg-global-color-primary);
    cursor: pointer;
    border-radius: 50%;
    box-shadow: 0 0 2px rgba(0, 0, 0, 0.5);
    margin-top:-5px
}

/* Focus styles */
input[type="range"]:focus::-webkit-slider-runnable-track {
    background: rgba(255,255,255,0.1);;
}

input[type="range"]:focus::-moz-range-track {
    background: rgba(255,255,255,0.1);;
}

/* Tooltip styling */
.range-tooltip {
    display: none;
    position: absolute;
    top: -4px;
    background-color: var(--pg-global-color-primary);
    color: white;
    padding: 3px 5px;
    border-radius: 3px 3px 10px 10px;
    font-size: 11px;
    white-space: nowrap;
    transform: translateX(-50%);
    margin-left: 2px;
}

/* Form styles */

.form-group {
    position:relative;
}

/* Select2 */

.select2-container--default .select2-selection--multiple {
    box-sizing: content-box;
    min-height:32px;
    border: 1px solid rgba(255,255,255,0.1);
    height: auto;
}

.select2-dropdown {
    background-color: #333333;
    border-color: #333333;
}

.select2-container--default .select2-results__option--highlighted[aria-selected] {
    background-color:#212121;
}

.select2-container--default .select2-selection--multiple .select2-selection__choice {
    background-color: var(--pg-global-color-primary);
    border: 1px solid #212121;
    font-size: 14px;
    color: #fff;
    padding: 4px 10px;
    border-radius: 8px;
    display: flex;
    justify-content: space-between;
    grid-gap: 4px;
}

.select2-search__field {
    height:auto!important;
}

.select2-container--default .select2-selection--multiple .select2-selection__choice__remove {
    background: #fff;
    width: 15px;
    height: 15px;
    text-align: center;
    color: var(--pg-global-color-primary);
    border-radius: 100%;
    font-size: 11px;
    line-height: 15px;
}

.field-row {
    display:flex;
    align-items:center;
    grid-gap:20px;
}

.gallery {
    margin: 5px;
    transform-origin:top left;
    transition: all 0.2s ease-in-out;
}

.gallery-item {
    width: calc(33.3333333% - 10px);
    margin: 5px;
    background: #1e1e1e;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.6);
    position: relative;
}

.gallery-item .gallery-item-image {
    width: 100%;
    height: auto;
    display: block;
    opacity: 0; /* For lazyloading */
    transition: opacity 0.3s ease-in-out;
}

.gallery-item .gallery-item-image.loaded {
    opacity: 1;
}

.gallery-item .actions {
    position: absolute;
    top: 10px;
    right: 10px;
    bottom: 0;
}

/* Gallery Item Drop Zones Original and Upscaled images */

.gallery-item .drop-zone {
    position: absolute;
    width: 100%;
    height: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #fff;
    opacity: 0.8;
    font-size: 16px;
    pointer-events: none;
    transition: background-color 0.2s ease;
}

.gallery-item .drop-zone-original {
    top: 0;
    background-color: transparent;
}

.gallery-item .drop-zone-upscaled {
    bottom: 0;
    background-color: transparent;
}

.gallery-item .drop-zone-video {
    top:0;
    height:auto;
    bottom:0;
}

.gallery-item.drag-over .drop-zone-original.highlight {
    background-color: rgba(var(--pg-global-color-primary-rgb),0.6);
}

.gallery-item.drag-over .drop-zone-upscaled.highlight {
    background-color: #ff9415a1;
}

.gallery-item.drag-over .drop-zone-video.highlight {
    background-color: rgba(var(--pg-global-color-primary-rgb),0.8);
}

.drop-zone span {
    display: none;
}

.gallery-item.drag-over .drop-zone.highlight span {
    border: 2px dashed rgba(255, 255, 255, 0.4);
    background: rgba(0, 0, 0, 0.4);
    border-radius: 10px;
    height: 70%;
    width: 70%;
    text-align: center;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Gallery Item Actions */

.icon {
    width: 20px;
    height: 20px;
    fill: #fff;
    color: #fff;
    vertical-align: middle;
}

.hamburger svg {
    width: 16px;
    height: 16px;
}

.action-buttons {
    display: flex;
    grid-gap: 5px;
    position: absolute;
    top: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.8);
    border-radius: 8px;
    padding: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.6);
    flex-direction: column;
    bottom: 11px;
    overflow-y: auto;
    transform: translateX(200px);
    transition: transform 0.2s ease-in-out;
}

.actions-opened .action-buttons {
    transform: translateX(0);
}

.close-actions .icon {
    width: 13px;
    height: auto;
}

.gallery-item .actions button,
.gallery-item .actions .action-link {
    display: inline-flex;
    align-items: center;
    background: rgb(6, 6, 6, 0.64);
    border: 1px solid rgba(255,255,255,0.14);
    cursor: pointer;
    border-radius: 4px;
    padding: 0;
    flex-shrink: 0;
    grid-gap: 10px;
    text-decoration:none;
    font-size: 9px;
    color: #fff;
    text-transform: uppercase;
    padding:10px;
    text-align:left;
}

.gallery-item .actions button:hover,
.gallery-item .actions .action-link:hover {
    background: #000;
}

.gallery-item .actions button .icon,
.gallery-item .actions .action-link .icon {
    width:13px;
    height:13px;
    flex-shrink:0;
}

.gallery-item .actions .hamburger {
    background: rgba(0, 0, 0, 0.28);
    color: white;
    border: none;
    padding: 10px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    top: 5px;
    right: 5px;
}

.like-button .icon {
    fill: #ff0000; /* Red color for like button */
}

.unlike-button .icon {
    fill: #00ff00; /* Green color for unlike button */
}

.load-more {
    display: block;
    width: 200px;
    margin: 20px auto;
}

.modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: -100px;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.8);
    padding-top: 60px;
    opacity: 0;
    transition: opacity 0.3s ease, top 0.2s ease-in-out;
    backdrop-filter: blur(12px);
}

.modal.show {
    display: block;
    opacity: 1;
    top: 0;
}

#image-info-modal {
    z-index: 10001;
}

#image-info-modal #info-image,
#image-info-modal #info-video {
    border-radius: 8px;
}

.modal-content {
    background-color: var(--pg-global-color-bg);
    color: var(--pg-global-color-text);
    margin: 5% auto;
    padding: 30px;
    border: 1px solid #ffffff14;
    width: 80%;
    max-width: 700px;
    border-radius: 8px;
    box-shadow: 0 33px 96px -13px #b5620047, 0 0 20px #000;
    position: relative;
}

.modal-footer,
.tag-management-actions,
.label-management-actions {
    margin-top:20px;
    display: flex;
    grid-gap: 15px;
}

.modal-footer > .button-lg,
.tag-management-actions > .button-lg,
.label-management-actions > .button-lg {
    flex: 1 1 0;
    min-width:0;
}

.modal img {
    width: 100%;
    height: auto;
}

.modal-content h2 {
    margin-top: 0;
}

.modal .close {
    position: absolute;
    top: -17px;
    right: 10px;
    cursor: pointer;
    font-size: 26px;
    background: var(--pg-global-color-bg);
    border: 1px solid #444;
    width: 30px;
    height: 30px;
    line-height: 30px;
    text-align: center;
    border-radius: 100%;
}

/* Tags (Collections) and Labels */

.tags,
.labels {
    display: flex;
    grid-gap: 6px;
    flex-wrap: wrap;
}

#image-tags .tags,
#image-labels .labels {
    margin: 20px 0;
}

.tag,
.label {
    display: inline-flex;
    background: var(--pg-global-color-primary);
    color: #fff;
    padding: 5px 10px;
    border-radius: 7px;
    transition:background 0.1s ease, box-shadow 0.3s ease;
    align-items: center;
    justify-content: space-between;
    grid-gap: 5px;
}

.label {
    background:#000;
    font-size:10px;
    box-shadow: 0px 0px 1px 1px rgba(255,255,255,0.2) inset;
}

.tag:hover,
.label:hover {
    background: #242424;
    box-shadow: 0 0 0px 2px #ffffff1c inset;
}

.tag > .icon,
.label > .icon {
    width: 15px;
    height: 15px;
    fill: #ffffff5c;
    color: #ffffff5c;
}

.tag button,
.label button {
    background: transparent;
    border: none;
    color: #ddd;
    margin-left: 10px;
    cursor: pointer;
}

.tag .remove-img-tag-btn,
.label .remove-img-label-btn {
    fill:#fff;
    cursor:pointer;
    width:18px;
    height:18px;
}

.tag[data-tag-id],
.label[data-label-id] {
    cursor:pointer;
}

.download-tag-zip,
.download-label-zip {
    padding: 0;
    margin-left: 0!important;
    font-size: 9px;
    margin-top: 4px;
    text-align:left;
}

.tag .tag-images-count,
.label .label-images-count {
    display: block;
    font-size: 9px;
    text-transform: lowercase;
}

.tag-image-wrapper,
.label-image-wrapper {
    width: 35px;
    margin: -4px 0 -4px -7px;
    line-height: 0;
    flex-shrink:0;
}

.tag-image,
.label-image {
    width: 100%;
    height: 100%;
    border-radius: 3px 0 0 3px;
    object-fit: cover;
}

.tag-management-modal .tag-management-actions,
.label-management-modal .label-management-actions {
    margin-top:10px;
}

.tag-management-modal #tag-list,
.label-management-modal #label-list {
    margin-bottom:10px;
}

#open-tag-mappings,
#open-label-mappings {
    margin-top:20px;
}

#add-mapping-form {
    border: 1px solid #ffffff1f;
    border-radius: 5px;
    padding: 20px;
    margin-top: 10px;
}

#new-mapping-form {
    display:flex;
    grid-gap:10px;
    flex-wrap:wrap;
}

.new-mapping-form-field {
    display:flex;
    grid-gap:5px;
    align-items: center;
}

/* Overlay styles */
.image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.45);
    color: #fff;
    display: flex;
    justify-content: end;
    align-items: flex-start;
    padding: 10px;
    box-sizing: border-box;
    border-radius: 8px;
    z-index: 10;
    flex-direction: column;
}

.image-overlay .tags,
.image-overlay .labels,
.image-overlay .prompt {
    margin-bottom: 5px;
}

.image-overlay .close-overlay {
    position: absolute;
    top: 10px;
    left: 10px;
    background: transparent;
    border: none;
    color: #fff;
    font-size: 24px;
    cursor: pointer;
}

.image-overlay .close-overlay:hover {
    color: #ccc;
}

/* Additional CSS for info popup layout */
.info-content {
    display: flex;
    justify-content: space-between;
    grid-gap: 20px;
}

.info-content .tags,
.info-content .labels {
    margin-bottom:5px;
}

.modal-content img {
    max-width: 100%;
    height: auto;
}

#image-info ul {
    list-style: none;
    padding-left: 0;
    font-size: 14px;
}

#image-info ul li:not(:last-child) {
    margin-bottom:5px;
}

.tags-section svg,
.labels-section svg {
    color: rgb(255 255 255 / 14%);
    fill: rgb(255 255 255 / 14%);
}

.tags-section h3,
.labels-section h3 {
    margin-top: 20px;
    margin-bottom: 10px;
}

/* Type Badge */
.type-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.type-badge.image {
    color: #4CAF50;
}

.type-badge.video {
    color: #2196F3;
}

.type-badge svg {
    width: 18px;
    height: 18px;
}

/* CSS for copy button in popup layout */
.copy-btn {
    background: none;
    border: none;
    cursor: pointer;
    margin-left: 5px;
    width: 13px;
    height: 13px;
    fill: var(--pg-global-color-primary);
    vertical-align: text-bottom;
}

.copy-btn:hover {
    fill: rgba(var(--pg-global-color-primary-rgb),0.55);
}

/* CSS for scroll top button */
#scroll-to-top {
    display: none; /* Hidden by default */
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 99;
    border: none;
    outline: none;
    background: rgba(0, 0, 0, 0.28);
    color: white;
    cursor: pointer;
    padding: 10px;
    border-radius: 50%;
    line-height: 0;
}

#scroll-to-top svg {
    width: 16px;
    height: 16px;
}

#scroll-to-top:hover {
    background-color: #555;
}

/* CSS for hamburger menu and off-canvas menu */

#hamburger-menu {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1001;
    background-color: var(--pg-global-color-bg);
    color: white;
    border: none;
    padding: 10px;
    cursor: pointer;
    line-height: 0;
    border-radius: 0 0 8px 0;
}

#hamburger-menu svg {
    width: 16px;
    height: 16px;
    fill: var(--pg-global-color-text);
}

#off-canvas-menu {
    position: fixed;
    top: 0;
    left: -300px;
    width: 300px;
    height: 100%;
    background-color: var(--pg-global-color-bg);
    color: var(--pg-global-color-text);
    box-shadow: 2px 0 5px rgba(0, 0, 0, 0.5);
    z-index: 1001;
    transition: left 0.3s ease;
    box-sizing: border-box;
}

.off-canvas-menu-content {
    padding: 20px;
    overflow-y: auto;
    overflow-x: hidden;
    height: 100%;
    box-sizing: border-box;
    -ms-overflow-style: -ms-autohiding-scrollbar; /* Auto hide scrollbar in IE/Edge */
    -webkit-overflow-scrolling: touch; /* Smooth scrolling for iOS */
}

#off-canvas-menu hr {
    margin: 30px 0;
    border: none;
    height: 1px;
    background: #ffffff1a;
}

#off-canvas-menu .filters,
#off-canvas-menu .actions-buttons {
    display: flex;
    flex-direction: column;
    grid-gap:10px;
}

#off-canvas-menu .filters button {
    margin-top:20px;
}

#off-canvas-menu #close-menu {
    position: absolute;
    top: 0;
    right: 0;
    background: var(--pg-global-color-bg);
    border: none;
    cursor: pointer;
    padding: 10px;
    line-height: 0;
    transition: all 0.2s ease-in-out;
    width: 36px;
    height: 36px;
    border-radius: 0 0 8px 0;
}

#off-canvas-menu #close-menu svg {
    fill:var(--pg-global-color-text);
    width:16px;
}

#off-canvas-menu.opened #close-menu {
    right: -36px;
    box-shadow: 3px 0 5px rgba(0, 0, 0, 0.4);
}

#off-canvas-menu #close-menu:focus {
    box-shadow:none;
}

body.off-canvas-menu-opened > .gallery {
    transform: scale(1.2);
}

.overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.6);
    z-index: 999;
    backdrop-filter: blur(11px);
}

#limit-number {
    width: 72px;
}

/* Style for scrollbar */

/* For WebKit browsers (Chrome, Safari) */
::-webkit-scrollbar {
    width: 8px; /* Width of the scrollbar */
    height: 8px; /* Height of the scrollbar for horizontal scrolling */
}

::-webkit-scrollbar-track {
    background: var(--pg-global-color-bg); /* Background of the track */
    border-radius: 10px; /* Rounding the corners of the track */
}

::-webkit-scrollbar-thumb {
    background-color: var(--pg-global-color-text); /* Color of the scrollbar thumb */
    border-radius: 10px; /* Rounding the corners of the thumb */
}

::-webkit-scrollbar-thumb:hover {
    background-color: #555; /* Color when hovered */
}

/* Upload image modal */

#image-upload-modal {
    display: none;
    position: fixed;
    z-index: 1002;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.8);
    padding-top: 60px;
}

#image-upload-modal .modal-content {
    background-color: #171717;
    margin: 5% auto;
    padding: 20px;
    border: 1px solid #444;
    width: 80%;
    max-width: 500px;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.6);
}

#image-upload-form label,
#edit-image-form label,
.vertical-form label {
    display: block;
    margin-top: 10px;
}

#image-upload-form input:not([type="checkbox"]), 
#image-upload-form textarea,
#edit-image-form input:not([type="checkbox"]),
#edit-image-form textarea,
.vertical-form input:not([type="checkbox"]),
.vertical-form textarea,
.vertical-form select {
    width: 100%;
    margin-top: 5px;
}

.vertical-form button {
    margin-top: 15px;
}

#image-upload-form .drop-zone {
    border: 2px dashed rgba(255,255,255,0.1);
    padding: 20px;
    text-align: center;
    margin-bottom: 15px;
    cursor: pointer;
    transition: background-color 0.3s;
    border-radius: 10px;
    background: #181b22;
    margin-top: 10px;
}

#image-upload-form .drop-zone.dragover {
    background-color: #f0f8ff;
    border-color: #007bff;
}

#image-upload-form .drop-zone button {
    margin-top:0;
}

#image-upload-form .image-preview-item img {
    width: 50px;
    height: 50px;
    object-fit: cover;
    margin-right: 10px;
    border-radius: 4px;
    border: 1px solid #ccc;
}

#image-upload-form .image-preview-item {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

/* Loading indicator */

.loading-indicator-center {
    position: fixed;
    top: 0;
    left: 0;
    bottom:0;
    right:0;
    background: rgba(0, 0, 0, 0.2);
    z-index: 10070;
    -webkit-backdrop-filter: blur(17px);
    backdrop-filter: blur(17px);
}

.loading-indicator-content {
    color: #fff;
    padding: 20px;
    border-radius: 5px;
    background: rgba(0, 0, 0, 0.8);
    font-size: 18px;
    display: flex;
    align-items: center;
}

.loading-indicator-content-center {
    position:absolute;
    top:50%;
    left:50%;
    transform: translate(-50%, -50%);
    z-index: 11002;
}

.loading-indicator-bottom-right {
    background: none;
}

#loading-container-bottom-right {
    top: auto;
    left: auto;
    bottom: 10px;
    right: 20px;
    position:fixed;
    z-index: 11000;
    display: flex;
    flex-direction: column;
    grid-gap: 10px;
}

.loading-indicator-content-bottom-right {

}

.close-loading {
    margin-left: 20px;
    width: 30px;
    height: 30px;
    flex-shrink: 0;
    cursor:pointer;
}

.spinner {
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top: 4px solid #fff;
    width: 20px;
    height: 20px;
    animation: spin 1s linear infinite;
    margin-right: 10px;
    flex-shrink: 0;
}

/* Gallery select and massive actions */

.selection-active .gallery-item {
    cursor:pointer;
}

.gallery-item.selected {
    position: relative;
}

.gallery-item.selected::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(181,98,0,0.52);
    pointer-events: none;
}

/* Massive action container */
.massive-action-container {
    display: none;
    position: fixed;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    background: #171717;
    padding: 10px;
    border-radius: 0 0 5px 5px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.6);
}

.massive-action-container select {
    padding: 5px;
    font-size: 16px;
}

/* statistics */

.statistics dl {
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
}

.statistics dt {
    font-weight: bold;
    float: left;
    clear: left;
    width: 60%;
    margin: 0;
    padding: 0;
    color: #333;
}

.statistics dd {
    margin: 0 0 10px 0;
    padding: 0;
    float: right;
    width: 40%;
    text-align: right;
    color: #666;
}

/* Tag Cloud */

#new-tag,
#new-label {
    width:100%;
}

#tag-cloud-content,
#label-cloud-content {
    display: flex;
    flex-wrap: wrap;
    grid-gap: 5px;
}

.tag-cloud h3,
.label-cloud h3 {
    margin-bottom: 10px;
}

.tag-cloud .tag,
.label-cloud .label {
    display: inline-flex;
    padding: 4px 7px;
    margin-right: 0;
    margin-bottom: 0;
    font-size: 9px;
    justify-content: space-between;
    grid-gap: 6px;
    width: calc(50% - 19px);
    background: #181b22;
    align-items: normal;
}

.tag-cloud .tag:hover,
.label-cloud .label:hover {
    box-shadow:none;
}

.label-cloud .label-content {
    word-break: break-word;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.label-cloud .label .delete-label {
    background: #0006;
    margin-top: -4px;
    display: inline-flex;
    margin-bottom: -4px;
    margin-right: -7px;
    line-height: 18px;
    padding-left: 6px;
    padding-right: 6px;
    cursor:pointer;
    border-radius:0 4px 4px 0;
    align-items: center;
    flex-shrink: 0;
}

.tag-cloud .tag .delete-tag:hover,
.label-cloud .label .delete-label:hover  {
    background: rgba(255,255,255,0.3);
}

#tag-search-box,
#label-search-box {
    margin-bottom: 10px;
    width: 100%;
}

/*  errors styles */

.error, .success {
    color: red;
    margin-bottom: 10px;
    text-align: center;
}

.success {
    color: green;
}

/* Off-canvas User info */ 

.user-info {
    margin-bottom: 20px;
    padding: 10px;
    background-color: #181b22;
    border-radius: 5px;
    border: 1px solid #ffffff1a;
}

.user-info p {
    margin-top:0;
}

/* Off-canvas zip files */

.zip-file-item {
    border: 1px solid #ffffff2e;
    border-radius: 5px;
    padding: 10px;
    font-size: 10px;
    list-style:none;
    margin-left:0;
}

.zip-file-item li:not(:last-child) {
    margin-bottom:4px;
}

.zip-file-item-actions {
    margin-top:10px;
}

/* Blacklist management */

.blacklist-item-image {
    width:50px;
    position: relative;
}

.blacklist-item-title,
.blacklist-item-date {
    font-size:12px;
}

.blacklist-item-actions > button {
    width:100%;
}

.blacklist-item-actions > button:not(:last-child) {
    margin-bottom:5px;
}

.blacklist-item-img-wrapper {
    /* border-radius: 5px; */
    display: block;
    /* height: 100%; */
    position: absolute;
    top: 5px;
    left: 5px;
    right: 0;
    bottom: 5px;
}

.blacklist-item-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 5px;
}

/* sweetalert2 */

.swal2-container {
    z-index:30000;
}

.swal2-timer-progress-bar {
    background: rgba(225,225,225,0.10);
}

.swal2-icon.swal2-info {
    border-color: rgba(var(--pg-global-color-primary-rgb),0.3);
    color: var(--pg-global-color-primary);
}

.swal2-container.swal2-backdrop-show, .swal2-container.swal2-noanimation {
    background: rgba(0, 0, 0, 0.8);
}

.swal2-popup {
    background: rgba(0, 0, 0, 0.8);
}

.swal2-title {
    font-size:20px;
}

/* table responsive */

.table-responsive {
    width: 100%;
    overflow-x: auto;
}

.table-responsive table {
    width: 100%;
    border-collapse: collapse;
}

/* Custom DataTables styling */

table.dataTable {
    width: 100%;
    border-collapse: collapse;
}

table.dataTable th,
table.dataTable td {
    padding: 12px;
    text-align: left;
    border: 1px solid #ddd;
}

table.dataTable th {
    background-color: #f4f4f4;
}

/* Images Diffs */

#diffs-modal .diffs-images {
    display: flex;
    justify-content: space-between;
    margin-bottom:20px;
}

#diffs-modal .diffs-images img {
    max-width: 100%;
    height: auto;
}

#diffs-modal .diff-container {
    position: relative;
    width: 100%;
    overflow: hidden;
    margin-bottom:20px;
}

#diffs-modal .diff-container img {
    display: block;
    width: 100%;
    pointer-events: none;
}

#diffs-modal .diff-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 50%;
    height: 100%;
    overflow: hidden;
}

#diffs-modal .diff-overlay img {
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: auto !important;
    max-width: none;
}

#diffs-modal .slider {
    position: absolute;
    z-index: 1001;
    left: 50%;
    top: 0;
    width: 5px;
    height: 100%;
    background-color: rgba(255,255,255,0.7);
    cursor: ew-resize;
}

/* Video Gallery */

#uploadVideoPopup {
    z-index: 10001;
}

#videoGalleryContent {
    display:flex;
    grid-gap:20px;
    flex-wrap:wrap;
}

.video-item {
    display: flex;
    flex-direction: column;
    grid-gap: 20px;
}

.video-item-title {
    margin: 0;
    position: absolute;
    left: 0;
    top: 0;
    right: 0;
    padding: 13px;
    color: #fff;
    font-size: 15px;
    line-height: 19px;
    z-index: 4;
    font-weight: normal;
}

.video-item-poster {
    display: block;
    position: relative;
    line-height:0;
}

.video-item-poster .icon-play {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 30px;
    height: 30px;
    transform: translate(-50%, -50%);
    z-index:3;
    fill: rgba(255, 255, 255, 0.7);
}

.video-item-poster:before {
    content:"";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 90px;
    height: 90px;
    background:linear-gradient(122deg, var(--pg-global-color-bg-start) 0.01%, var(--pg-global-color-bg-end) 70%);
    transform: translate(-50%, -50%);
    z-index:2;
    animation: 1.5s infinite pulse;
    border-radius:100%;
}

.video-item-poster:after {
    content:"";
    position: absolute;
    top:0;
    left:0;
    right:0;
    bottom:0;
    display:block;
    background: linear-gradient(to bottom, rgba(0,0,0,0.8) 0%, transparent 30%, rgba(var(--pg-global-color-primary-rgb), 0.6) 50%, transparent 100%);
    border-radius:2px;
}

.video-item-poster-img {
    border-radius:4px;
}

#videoGalleryContent video {
    width:100%;
}

/* Video Items */

.gallery-item-video {
    width: 100%;
    height: auto;
    object-fit: cover;
    display: block;
}

.video-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: rgba(0, 0, 0, 0.4);
    border-radius: 50%;
    padding: 10px;
    pointer-events: none;
}

.play-icon {
    width: 32px;
    height: 32px;
    fill: white;
}

.video-duration {
    position: absolute;
    bottom: 5px;
    right: 8px;
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    padding: 2px 6px;
    font-size: 12px;
    border-radius: 3px;
    pointer-events: none;
}


/* Skeleton (content placeholder) */
.skeleton-wrapper {
    display: flex;
    flex-wrap: wrap;
}
.skeleton {
    display: inline-block;
    /*height: 90vh;*/ /* Adjust height as needed */
    animation: shimmer 1.2s infinite;
    width: calc(33.3333333% - 10px);
    margin: 5px;
    background: #222222;
    background: linear-gradient(to right, #1e1e1e 0%, #2a2a2a 30%, #1e1e1e 40%, #1e1e1e 100%);
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.6);
    max-width: 1024px; /* Maximum width */
    aspect-ratio: 2 / 3;
    position:relative;
    z-index:1;
    background-size: 1024px;
    background-repeat: repeat-x;
    background-position: 0 0;
    transition: all 0.2s ease-in-out;
}

.skeleton-text {
    background-color: #eee;
    border-radius: 4px;
    height: 16px;
    margin-top: 8px;
    width: 80%;
    animation: shimmer 1.2s infinite;
}

/* Avatar */

#userAvatarImg {
    border-radius: 100%;
    width: 50px;
}

.crop-save-avatar-btn {
    display:none;
}

.user-info-head {
    display:flex;
    align-items:center;
    grid-gap:10px;
}

#user-email {
    text-overflow: ellipsis;
    display: inline-block;
    max-width: 165px;
    white-space: nowrap;
    overflow: hidden;
}

.user-info-actions {
    margin-top:5px;
    display: flex;
    grid-gap: 5px;
    flex-wrap: wrap;
}

/* User Config */

#galleryColumnsWrapper {
    display:flex;
    grid-gap:20px;
}

#galleryColumnsWrapper > div {
    width:33.3333333%;
}

/* Upscaler service popup */

#upscale-service-popup .upscale-service-head {
    display:flex;
    align-items:center;
    justify-content:space-between;
    grid-gap:20px;
}

#upscale-service-popup .upscale-service-heading {
    margin:0;
    margin-right: auto;
}

#upscale-service-popup .upscale-service-logo {
    width: 45px;
    vertical-align:middle;
    flex-shrink:0;
}

#upscale-service-popup .upscale-service-admin {
    flex-shrink:0;
}

/* Image variations */

.variation-item {
    margin: 5px;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.6);
    position:relative;
}

.variation-item-image {
    border-radius: 8px;
}

.variation-item-delete {
    position: absolute;
    z-index: 1;
    top: -3px;
    right: -3px;
    color: #fb5454;
    fill: #fb5454;
    width: 30px;
    height: 30px;
    background: #08080a;
    border-radius: 100%;
    cursor: pointer;
}

/* jQueryUI autocomplete */

.ui-autocomplete.ui-front {
    z-index:100001;
    border-radius: 7px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 18px;
    background: #181b22;
    color: var(--pg-global-color-text);
    transform: translateY(10px);
}

.ui-menu .ui-menu-item-wrapper {
    padding: 5px 10px;
}

.ui-menu .ui-menu-item:not(:last-child) .ui-menu-item-wrapper {
    border-bottom:1px solid rgba(255, 255, 255, 0.1);
}

/* Social Publications */

#social-publications-modal .social-network-item-icon {
    width: 15px;
    background: #fff;
    border-radius: 100%;
    padding: 11px;
    height: 15px;
    margin-right: 5px;
}

.selected-images-thumbnails {
    display: flex;
    gap: 20px;
    margin-bottom:20px;
}

.selected-images-thumbnails .img-thumbnail {
    border-radius: 6px;
    max-width:12%;
    width:12%;
    height:auto;
}

/* Estilos para el selector de tipo de publicación */
.create-publication-form-post-type-wrapper {
    margin: 20px 0;
    display: flex;
    flex-direction: column;
}

.create-publication-form-post-type-wrapper label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
}

.create-publication-form-post-type-wrapper select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.create-publication-form-post-type-wrapper .form-text {
    margin-top: 6px;
    font-size: 12px;
    color: #666;
    font-style: italic;
}

/* Badges para tipos de publicación */
.badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-info {
    background-color: #17a2b8;
    color: white;
}

.badge-primary {
    background-color: #007bff;
    color: white;
}

.badge-warning {
    background-color: #ffc107;
    color: #212529;
}

.badge-secondary {
    background-color: #6c757d;
    color: white;
}

.badge-success {
    background-color: #28a745;
    color: white;
}

/* Responsive */
@media (max-width: 767px) {
    .create-publication-form-post-type-wrapper label {
        width: 100%;
        margin-bottom: 10px;
    }
}

/* Social networks */

.social-network-header {
    display: flex;
    align-items: center;
    grid-gap: 10px;
}

.social-network-header svg {
    fill: currentColor;
    width: 20px;
    height: 20px;
}

.social-network-status {
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 8px;
    padding: 20px;
    margin: 15px 0;
    transition: border-color 0.3s;
}

.social-network-status:hover {
    border-color: rgba(255,255,255,0.4);
}

.social-account-info {
    background: rgba(0,0,0,0.3);
    padding: 15px;
    border-radius: 6px;
    margin: 10px 0;
}

.social-account-info p {
    margin: 8px 0;
    font-size: 14px;
}

.social-account-info strong {
    min-width: 120px;
    display: inline-block;
}

.btn-connect-social {
    color: white !important;
    border: none;
    padding: 12px 24px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: bold;
    transition: opacity 0.3s, transform 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-connect-social:hover {
    opacity: 0.9;
    transform: translateY(-2px);
}

.btn-disconnect-social,
.btn-refresh-token {
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.3);
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-disconnect-social:hover {
    background: rgba(220, 53, 69, 0.2);
    border-color: #dc3545;
}

.btn-refresh-token:hover {
    background: rgba(40, 167, 69, 0.2);
    border-color: #28a745;
}

.social-network-content .loading {
    color: rgba(255,255,255,0.6);
    font-style: italic;
}

@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@-webkit-keyframes pulse {
    0% {
        -webkit-box-shadow: 0 0 0 0 var(--pg-global-color-primary)
    }

    70% {
        -webkit-box-shadow: 0 0 0 20px rgba(var(--pg-global-color-primary-rgb), 0)
    }

    100% {
        -webkit-box-shadow: 0 0 0 0 rgba(var(--pg-global-color-primary-rgb), 0)
    }
}

@keyframes pulse {
    0% {
        -moz-box-shadow: 0 0 0 0 var(--pg-global-color-primary);
        box-shadow: 0 0 0 0 var(--pg-global-color-primary)
    }

    70% {
        -moz-box-shadow: 0 0 0 20px rgba(var(--pg-global-color-primary-rgb), 0);
        box-shadow: 0 0 0 20px rgba(var(--pg-global-color-primary-rgb), 0)
    }

    100% {
        -moz-box-shadow: 0 0 0 0 rgba(var(--pg-global-color-primary-rgb), 0);
        box-shadow: 0 0 0 0 rgba(var(--pg-global-color-primary-rgb), 0)
    }
}

/* Media Queries */
@media (min-width:768px) {
    
    .info-image {
        max-width: 45%;
        margin-right: 20px;
    }
    
    .info-details {
        max-width: 50%;
    }

    /* Diffs images */

    #diffs-modal .diffs-images .diffs-original,
    #diffs-modal .diffs-images .diffs-upscaled {
        width: 48%;
    }

    /* Video Gallery */

    #videoGalleryContent > div {
        width:calc(50% - 10px);
    }

    /* Image variations */

    .variation-item {
        width:calc(50% - 10px);
    }

}
@media (max-width: 1024px) {


}

@media (max-width: 767px) {

    .info-content {
        flex-direction:column;
    }
    .info-image {
        margin-bottom:20px;
    }
    #off-canvas-menu {
        width: min(80%, 300px);
        left:-80%;
    }

    /* table responsive */

    .table-responsive table {
        box-shadow:none;
    }

    .table-responsive table,
    .table-responsive th,
    .table-responsive td {
        display: block;
        min-width: 0;
    }

    .table-responsive th,
    .table-responsive td {
        padding: 12px;
        text-align: left;
        border: 1px solid #dddddd21;
    }

    .table-responsive th {
        position: absolute;
        top: -9999px;
        left: -9999px;
    }

    .table-responsive tbody tr {
        margin-bottom: 5px;
        box-shadow: 0 0 20px rgb(255 255 255 / 7%);
    }

    .table-responsive td {
        position: relative;
        text-align: left;
    }

    .table-responsive td:before {
        content: attr(data-label);
        display: block;
        padding-right: 10px;
        white-space: nowrap;
        font-weight: bold;
    }

    /* manage blacklist */

    .table-responsive #blacklist-table {
        box-shadow:none;
    }

    .table-responsive #blacklist-table-body tr {
        display: grid;
        grid-template-columns: 0.6fr 1.4fr;
        grid-template-rows: repeat(3, 1fr);
        grid-column-gap: 0px;
        grid-row-gap: 0px;
    }

    .table-responsive .blacklist-item-image {
        width:auto;
        grid-area: 1 / 1 / 4 / 2;
    }

    .table-responsive .blacklist-item-img-wrapper {
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
    }

    .table-responsive .blacklist-item-img-wrapper img {
        border-radius:0;
    }

    .table-responsive .blacklist-item-title {
        grid-area: 1 / 2 / 2 / 3;
        max-height: 50px;
        overflow-y: auto;
    }

    .table-responsive .blacklist-item-date {
        grid-area: 2 / 2 / 3 / 3;
    }

    .table-responsive .blacklist-item-actions {
        grid-area: 3 / 2 / 4 / 3;
    }

    .table-responsive .blacklist-item-actions:before {
        display:none;
    }

    .table-responsive .blacklist-item-actions > button {
        width:auto;
    }

    /* Tags (Collections) */

    .table-responsive #tag-mappings-list-table tr {
        display: grid;
        grid-template-columns: 2fr 1fr;
        grid-template-rows: repeat(2, 1fr);
        grid-column-gap: 0px;
        grid-row-gap: 0px;
    }

    .table-responsive #tag-mappings-list-table .mapping-item-string {
        grid-area: 1 / 1 / 2 / 2;
        font-size: 12px;
    }

    .table-responsive #tag-mappings-list-table .mapping-item-tag {
        grid-area: 2 / 1 / 3 / 2;
        font-size: 12px;
    }

    .table-responsive #tag-mappings-list-table .mapping-item-actions {
        grid-area: 1 / 2 / 3 / 3;
    }

    .table-responsive  .delete-mapping .icon {
        display: block;
        margin:0 auto 7px auto;
    }

    .new-mapping-form-field {
        align-items: start;
        flex-direction: column;
        width: 100%;
    }

    #new-mapping-string,
    #new-mapping-tag {
        width:100%;
    }

    /* Diff images */

    #diffs-modal .diffs-images {
        flex-direction:column;
    }

    /* Video Gallery */

    #videoGalleryContent > div {
        width:100%%;
    }

    /* Image variations */

    .variation-item {
        width:calc(100% - 10px);
    }
    
}