/**
 * global.css — helpers de layout y dropzones específicas del SaaS.
 * Theming editorial (tipografía, paleta, radius=0) vive en brand-overrides.css.
 * Este archivo sólo conserva utilities estructurales que no encajan en el sistema.
 */

.navbar-nav {
    font-weight: 500;
}

.progressbg {
    padding: 0.15rem 0.5rem !important;
}

tr:hover {
    cursor: pointer;
}

.btn-transparent {
    background-color: transparent;
    border-color: transparent;
    padding: 0.4375rem 0.625rem;
    cursor: pointer;
    border: none;
    box-shadow: none;
    color: var(--foreground);
    transition: background-color 0.15s ease;
}

.btn-transparent:hover {
    background-color: color-mix(in oklab, var(--foreground) 5%, transparent);
}

/* Image selector grid (property images) */
#selected-images {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 8px;
    width: 100%;
}

.img-added-dpz,
.add-file-element {
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 20px;
    position: relative;
    aspect-ratio: 1;
}

.img-added-dpz img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    background-color: var(--secondary);
}

.dz-preview {
    display: none;
}

#selected-images .img-added-dpz:nth-child(1) {
    grid-column: span 2;
    grid-row: span 2;
}

.file-item {
    width: 100px;
    height: 100px;
    object-fit: contain;
    background-color: var(--card);
    border: 1px solid var(--grid-line);
}

.add-file-element {
    background-color: var(--card);
    border: 1px dashed var(--grid-color-strong);
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    color: var(--muted-foreground);
    transition: background-color 0.15s ease;
}

.add-file-element:hover {
    background-color: color-mix(in oklab, var(--foreground) 4%, transparent);
}

.select-categories-item:hover {
    background-color: color-mix(in oklab, var(--foreground) 4%, transparent);
    cursor: pointer;
}

.selected-category {
    background-color: color-mix(in oklab, var(--foreground) 6%, transparent);
}

#product-category-ts-dropdown > .selected.active,
#product-category-ts-dropdown > .active {
    background-color: color-mix(in oklab, var(--foreground) 4%, transparent);
}

#product-category-ts-dropdown > .selected {
    background-color: color-mix(in oklab, var(--foreground) 6%, transparent);
}

.dp-header-categories:hover {
    background-color: color-mix(in oklab, var(--foreground) 4%, transparent);
    cursor: pointer;
}

.horizontal-divider {
    width: 1px;
    height: 1.5rem;
    background-color: var(--grid-line);
}

/* Card header tabs — underline editorial */
.card-header-tabs .nav-link.active {
    background-color: transparent !important;
    border-width: 0 0 2px 0 !important;
    border-bottom-color: var(--foreground);
}

.card-header-tabs .nav-link:hover {
    background-color: transparent !important;
    border-width: 0 0 2px 0 !important;
    border-bottom-color: color-mix(in oklab, var(--foreground) 25%, transparent);
}

.card-header-tabs {
    background-color: transparent;
    font-weight: 500;
}

.link-button {
    background-color: transparent;
    border: none;
    color: var(--foreground);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 4px;
    transition: color 0.15s ease;
}

.link-button:hover .link-text {
    text-decoration: underline;
    text-underline-offset: 4px;
}

.link-button i {
    font-size: 1.05em;
}

.form-control,
.form-select {
    padding-left: 0.75rem !important;
    padding-right: 0.75rem !important;
}

/* Dropzone variants — cuadrados, dashed brand */
.dropzone-60,
.dropzone-50,
.dropzone-40,
.dropzone-30,
.dropzone-20 {
    border: 1px dashed var(--grid-color-strong);
    background-color: var(--card);
    transition: background-color 0.15s ease;
    cursor: pointer;
}

.dropzone-60 {
    height: 60px;
    width: 60px;
}
.dropzone-50 {
    height: 50px;
    width: 50px;
}
.dropzone-40 {
    height: 40px;
    width: 40px;
}
.dropzone-30 {
    height: 30px;
    width: 30px;
}
.dropzone-20 {
    height: 20px;
    width: 20px;
}

.dropzone-60:hover,
.dropzone-50:hover,
.dropzone-40:hover,
.dropzone-30:hover,
.dropzone-20:hover {
    background-color: color-mix(in oklab, var(--foreground) 5%, transparent);
}

.pac-icon {
    display: none;
}

.pac-item {
    border: 0;
    cursor: pointer;
    padding: 0.4375rem 0.625rem;
    color: var(--foreground);
}

.pac-item:hover {
    border: 0;
    background-color: color-mix(in oklab, var(--foreground) 4%, transparent);
}

.pac-item-selected {
    background-color: color-mix(in oklab, var(--foreground) 6%, transparent);
}

.pac-container {
    background-color: var(--card);
    border: 1px solid var(--grid-line);
    padding: 0.25rem;
    margin-top: 4px;
    box-shadow: 0 6px 16px -8px rgba(0, 0, 0, 0.12);
}

.iti {
    width: 100%;
}

/* Responsive borders helpers — sin radius, sólo hairlines */
.border-bottom-sm {
    border-bottom: 1px solid var(--grid-line);
}

@media (min-width: 768px) {
    .border-bottom-sm {
        border-bottom: 0;
    }
}

.border-bottom-md {
    border-bottom: 0;
}

@media (min-width: 768px) {
    .border-bottom-md {
        border-bottom: 1px solid var(--grid-line);
    }
}

.border-end-sm {
    border-right: 1px solid var(--grid-line);
}

@media (min-width: 768px) {
    .border-end-sm {
        border-right: 0;
    }
}

.border-end-md {
    border-right: 0;
}

@media (min-width: 768px) {
    .border-end-md {
        border-right: 1px solid var(--grid-line);
    }
}

.dropdown-toggle:after {
    margin-top: -0.3em !important;
}

.ts-control {
    padding-left: 0.75rem !important;
    padding-right: 0.75rem !important;
}

.ts-control > .item {
    text-overflow: unset !important;
    overflow: visible !important;
    max-width: none !important;
    white-space: nowrap !important;
}

.ts-wrapper {
    min-height: 0 !important;
}

div.dts div.dt-scroll-body,
div.dts div.dataTables_scrollBody {
    background: none !important;
}

td {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Lightbox container — sin radius, hairline */
.lb-outerContainer {
    border: 1px solid var(--grid-line);
    overflow: hidden;
}

.lb-image {
    border: 0 !important;
}

div.dts div.dt-scroll-body table,
div.dts div.dataTables_scrollBody table {
    background-color: transparent !important;
}

.sys-notification:hover {
    background-color: color-mix(in oklab, var(--foreground) 4%, transparent);
}

/* Table compactness — preserva legibilidad sin colapsar */
.table td,
.table th {
    padding-left: 0.75rem !important;
    padding-right: 0.75rem !important;
    padding-top: 0.4rem;
    padding-bottom: 0.4rem;
}

.dataTables_scrollHead tr {
    border-bottom: 0 !important;
}

.dataTables_paginate {
    padding-top: 0 !important;
}

.dataTables_paginate .pagination {
    margin-bottom: 0;
    justify-content: end;
}

.footer {
    padding: 0.5em 0 !important;
    margin-top: auto;
}

.bottom-table {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-right: 0.75rem !important;
    padding-left: 0.75rem !important;
    margin-top: 0.5rem !important;
}
