/* ============================================
   SKELETON LOADER
   ============================================ */

@keyframes skeleton-pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.skeleton-pulse {
    animation: skeleton-pulse 1.5s ease-in-out infinite;
}

.skeleton-line {
    height: 16px;
    border-radius: 4px;
    background-color: var(--neutral-300);
}

.skeleton-label {
    height: 12px;
}

.skeleton-value {
    height: 16px;
}

.dark .skeleton-line {
    background-color: var(--neutral-600);
}

.tabsDetalhar {
    @apply flex flex-row flex-wrap mb-5 pl-0 border-b-0 w-full list-none;
}


#tabelaDetalhar * {
    @apply text-[14px];
}

.ui-dialog .ui-dialog-title {
    @apply m-0 dark:text-complement;
}

.detail-header {
    @apply flex w-full h-[100px] font-semibold;
}

.detail-title {
    @apply font-medium text-[3.4375rem];
}

.ui-dialog .ui-dialog-title {
    @apply m-0;
}

.left {
    @apply flex items-center content-end bg-green-700 w-[10.3125rem] h-auto text-white;
}

.right {
    @apply flex justify-end items-center w-full;
}

#boxDetalhar {
    @apply flex !p-0;
    min-width: 600px;
    min-height: 400px;
    max-width: 100%;
    max-height: 100%;
    width: 100% !important;
    height: 100% !important;
    overflow: hidden;
    position: relative;
    box-sizing: border-box;
    display: none !important;
    flex-direction: row !important;
}

div[id^="flowbite-dialog-"] #boxDetalhar {
    display: flex !important;
}

.ui-dialog #boxDetalhar {
    width: 100% !important;
    height: 100% !important;
    max-width: 100%;
    max-height: 100%;
}

[data-modal-target] + div[id^="flowbite-dialog-"] > div {
    display: flex !important;
    flex-direction: column !important;
    height: 100% !important;
    max-height: 100% !important;
}

div[id^="flowbite-dialog-"]:has(#boxDetalhar) > div:not([style*="height"]) {
    height: 100vh;
    max-height: 100vh;
}

div[id^="flowbite-dialog-"] > div[style*="height"] {
    /* Inline style tem prioridade natural, não precisa fazer nada */
}

div[id^="flowbite-dialog-"]:not(:has(#boxDetalhar)) > div:not([style*="height"]) {
    height: auto;
    max-height: 100vh;
}

div[id^="flowbite-dialog-"]:has(#boxDetalhar) .ds-fk-modal-body {
    flex: 1 !important;
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden !important;
    min-height: 100% !important;
    height: 100% !important;
    max-height: 100% !important;
}

div[id^="flowbite-dialog-"]:has(#boxDetalhar) .ds-fk-modal-content {
    flex: 1 !important;
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden !important;
    min-height: 100% !important;
    height: 100% !important;
    max-height: 100% !important;
}

div[id^="flowbite-dialog-"] .ds-fk-modal-content #boxDetalhar {
    flex: 1 !important;
    display: flex !important;
    flex-direction: row !important;
    min-height: 100% !important;
    overflow: hidden !important;
    height: 100% !important;
    max-height: 100% !important;
}

.ds-fk-modal-footer {
    flex-shrink: 0 !important;
}

div[id^="flowbite-dialog-"]:has(#boxDetalhar) #boxDetalhar .left-detalhar,
div[id^="flowbite-dialog-"]:has(#boxDetalhar) #boxDetalhar .left {
    flex: 0 0 200px !important;
    min-height: 100% !important;
    height: 100% !important;
    max-height: 100% !important;
    align-self: stretch !important;
    background-color: var(--color-bg-dark) !important;
    justify-content: space-between !important;
    display: flex !important;
    flex-direction: column !important;
}

div[id^="flowbite-dialog-"]:has(#boxDetalhar) #boxDetalhar .right {
    flex: 1 !important;
    min-height: 100% !important;
    height: 100% !important;
    max-height: 100% !important;
    display: flex !important;
    flex-direction: column !important;
}

#boxDetalhar .left,
#boxDetalhar .left-detalhar {
    @apply flex flex-col items-center;
    flex-shrink: 0;
    width: 200px;
    height: 100% !important;
    align-self: stretch !important;
    padding: 2rem 1rem 1.5rem;
}

div[id^="flowbite-dialog-"] #boxDetalhar .left-detalhar,
div[id^="flowbite-dialog-"] #boxDetalhar .left {
    justify-content: space-between !important;
}

.detail-sidebar-header {
    @apply text-center w-full;
    flex-shrink: 0;
    background: transparent !important;
    background-color: transparent !important;
}

.detail-sidebar-title {
    font-family: "Space Grotesk", sans-serif;
    font-size: 20px;
    font-style: normal;
    font-weight: 500;
    line-height: 30px; /* 150% */
    color: var(--color-text-light) !important;
    margin-bottom: 0.25rem;
    background: transparent !important;
    background-color: transparent !important;
    padding: 0 !important;
    text-align: center !important;
}

.detail-sidebar-header h2,
.detail-sidebar-header .detail-sidebar-title {
    background: transparent !important;
    background-color: transparent !important;
}

#boxDetalhar .detail-sidebar-header,
div[id^="flowbite-dialog-"] .detail-sidebar-header {
    background: transparent !important;
    background-color: transparent !important;
    border: none !important;
}

#boxDetalhar [class*="sidebar"],
div[id^="flowbite-dialog-"] #boxDetalhar [class*="sidebar"] {
    background: transparent !important;
    background-color: transparent !important;
    border: none !important;
}

.detail-sidebar-subtitle {
    font-family: "Inter", sans-serif;
    font-size: 14px;
    font-style: normal;
    font-weight: 400;
    line-height: 21px; /* 150% */
    color: var(--color-text-secondary) !important;
    text-align: center !important;
    margin: 0 !important;
    padding: 0 !important;
    background: transparent !important;
    background-color: transparent !important;
}

#boxDetalhar .left .icon-detail-left,
#boxDetalhar .left-detalhar .icon-detail-left {
    @apply flex items-center justify-center;
    width: 91.14px;
    height: 91.14px;
    flex-shrink: 0;
    margin-top: auto;
    margin-bottom: 0;
    margin-left: auto;
    margin-right: auto;
}

#boxDetalhar .left-detalhar .icon-detail-left i,
#boxDetalhar .left .icon-detail-left i {
    color: var(--color-neutral-700) !important;
    font-size: 91.14px !important;
    width: 91.14px !important;
    height: 91.14px !important;
    line-height: 91.14px !important;
}

div[id^="flowbite-dialog-"] #boxDetalhar .left-detalhar .icon-detail-left i,
div[id^="flowbite-dialog-"] #boxDetalhar .left .icon-detail-left i {
    color: var(--color-neutral-700) !important;
    font-size: 91.14px !important;
    width: 91.14px !important;
    height: 91.14px !important;
    line-height: 91.14px !important;
}

#boxDetalhar .right {
    @apply flex flex-1 justify-center p-[.94rem];
    overflow: hidden !important;
    position: relative;
    display: flex;
    flex-direction: column;
    width: 100% !important;
    max-width: 100% !important;
    height: 100% !important;
    max-height: 100% !important;
    box-sizing: border-box !important;
    flex: 1 1 auto !important;
    background-color: var(--color-bg-secondary);
    color: var(--color-text-primary);
}

.ui-dialog #boxDetalhar .right {
    width: calc(100% - 200px) !important;
    max-width: calc(100% - 200px) !important;
}

#tabelaDetalhar {
    overflow: auto !important;
    overflow-x: hidden !important;
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    min-height: 400px !important;
    max-height: 100% !important;
    position: relative !important;
    flex: 1 1 auto !important;
    z-index: 10004 !important;
    background-color: transparent !important;
    opacity: 1 !important;
    visibility: visible !important;
    box-sizing: border-box !important;
    color: var(--color-text-primary);
}

#tabelaDetalhar strong,
#tabelaDetalhar b,
#tabelaDetalhar label,
#tabelaDetalhar .label,
#tabelaDetalhar th {
    color: var(--color-text-secondary);
    font-weight: 600;
}

#tabelaDetalhar td:not(:first-child),
#tabelaDetalhar span:not(strong):not(b),
#tabelaDetalhar p {
    color: var(--color-text-primary);
}

.dark #tabelaDetalhar strong,
.dark #tabelaDetalhar b,
.dark #tabelaDetalhar label,
.dark #tabelaDetalhar .label,
.dark #tabelaDetalhar th {
    color: var(--color-text-secondary) !important;
}

.dark #tabelaDetalhar td:not(:first-child),
.dark #tabelaDetalhar span:not(strong):not(b),
.dark #tabelaDetalhar p,
.dark #tabelaDetalhar div:not(.badge):not([class*="badge"]) {
    color: var(--color-text-primary) !important; /* Texto claro - DARK MODE */
}

.dark #tabelaDetalhar span[style*="background-color: #D1FAE5"],
.dark #boxDetalhar span[style*="background-color: #D1FAE5"] {
    background-color: #50D890 !important;
    border-color: #50D890 !important;
    color: #0A3D29 !important;
}

.dark #tabelaDetalhar span[style*="background-color: #FEE2E2"],
.dark #boxDetalhar span[style*="background-color: #FEE2E2"] {
    background-color: #FF5449 !important;
    border-color: #FF5449 !important;
    color: #1F2937 !important;
}

.dark #tabelaDetalhar .badge-success,
.dark #boxDetalhar .badge-success {
    background-color: #50D890 !important;
    border-color: #50D890 !important;
    color: #0A3D29 !important;
}

.ui-dialog #tabelaDetalhar {
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    max-height: 100% !important;
}

#tabelaDetalhar * {
    position: relative !important;
    z-index: inherit !important;
    opacity: 1 !important;
    visibility: visible !important;
}

#tabelaDetalhar table {
    width: 100% !important;
    border-collapse: collapse !important;
    background-color: transparent !important;
}

#tabelaDetalhar td {
    padding: 8px !important;
    vertical-align: top !important;
}

.modal-detail-content {
    @apply p-0 !border-none;
}

.modal-detail-titlebar {
    @apply p-0 !border-none;
}

.modal-detail-buttonpane {
    @apply hidden;
}

.detail-close {
    @apply top-[.9375rem] right-[.9375rem] z-50 absolute cursor-pointer;
}

#boxDetalhar {
    @apply overflow-hidden;
}

.ContentControl {
    @apply border-none w-full h-full overflow-hidden;
}

.ContentControl #header {
    @apply border-none w-full h-10 overflow-hidden text-white dark:text-gray-200;
}

.ContentControl #content {
    @apply w-full h-full overflow-hidden;
}

.ContentControl .abas {
    @apply inline;
}

.ContentControl .abas li {
    @apply float-left font-semibold list-none;
}

.aba {
    @apply bg-gray-700 m-1 px-3 py-1 w-[36rem] h-9 font-semibold text-xs md:text-sm text-center cursor-pointer;
}

.ativa {
    @apply bg-primary dark:bg-complement m-1 px-3 py-1 w-[36rem] h-9 font-semibold text-xs md:text-sm text-center cursor-pointer;
}

.ContentControl .conteudo {
    @apply w-full h-full;
}

.conteudo {
    @apply h-screen text-sm;
    background-color: var(--color-bg-primary);
    color: var(--color-text-primary);
}

.selected {
    @apply bg-white w-[36rem] h-9 font-semibold text-green-600 text-xs md:text-sm text-center cursor-pointer;
}

.abas span {
    @apply block bg-gray-700 m-1 px-3 py-1 w-[36rem] font-semibold text-xs md:text-sm text-center cursor-pointer;
}

.div-table-ultima-prorpiedade {
    @apply block ml-1 p-2 w-[93%];
}

.div-table {
    @apply m-6 border-2 border-solid w-[30%] table-fixed;
}

.div-table-row {
    @apply border-gray-700 dark:border-black-700 w-full text-md;
}

.div-table-col {
    @apply block py-1 px-1 p-2 border-b border-black-900/20 dark:border-black-700/20 w-[97%] ml-1;
}

.div-table ul {
    list-style-type: circle !important;
}

.div-table-col::after {
    @apply w-full;
}

.div-table-grid {
    @apply flex flex-wrap;
}

.table-pga {
    @apply ml-1 w-[95px];
}

.title {
    @apply ml-1 font-semibold text-2xl text-left;
}

.aviso {
    @apply block w-11/12 text-black-900 text-sm my-4 mx-1 p-4 overflow-hidden;
}

.div-card {
    @apply float-left flex justify-center items-center m-6 w-[96px] text-center;
}

.card-icon {
    @apply bg-green-600 p-3 w-12 h-12;
}

.card-string {
    @apply bg-gray-700 p-3 w-[200px];
}

.card-info {
    @apply bg-gray-200 p-3 w-[50px] font-semibold !text-gray-700;
}

.scroll {
    @apply overflow-y-auto;
}

.custom-scrollbar {
    @apply [&::-webkit-scrollbar]:size-[0.3rem] [&::-webkit-scrollbar-track]:rounded-full [&::-webkit-scrollbar-track]:p-1 [&::-webkit-scrollbar-thumb]:rounded-full [&::-webkit-scrollbar-thumb]:bg-neutral-400/35 [&::-webkit-scrollbar-thumb:hover]:bg-neutral-500/50 [&::-webkit-scrollbar-thumb:active]:bg-neutral-500;
}

#boxDetalhar .left-detalhar {
    background-color: var(--color-bg-dark) !important;
    border-top-left-radius: 5px;
    border-bottom-left-radius: 5px;

    &:where(.dark, .dark *) {
        background-color: var(--color-bg-dark) !important;
    }
}

.detail-sidebar {
    width: 200px;
    height: 100%;
    background-color: var(--color-bg-dark);
    border-top-left-radius: 8px;
    border-bottom-left-radius: 8px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.detail-header {
    display: flex;
    flex-direction: column;
    padding-top: 0;
    padding-bottom: 16px;
}

.detail-title {
    font-family: 'Space Grotesk', sans-serif;
    color: var(--color-text-light);
    font-size: 20px;
    font-weight: 500;
    margin: 0;
}

.detail-subtitle {
    font-family: 'Inter', sans-serif;
    color: var(--color-text-secondary);
    font-size: 14px;
    margin-top: 4px;
}

.detail-footer-icon img {
    display: block;
    margin-top: auto;
}

.detail-footer-icon {
    display: flex;
    justify-content: center;
    align-items: center;
}

#boxDetalhar .right {
    display: flex;
    flex: 1;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    padding: 1.5rem 2rem;
    min-width: 600px;
}

.mdl-tooltip {
    -webkit-transform: scale(0);
    transform: scale(0);
    -webkit-transform-origin: top center;
    transform-origin: top center;
    z-index: 999;
    background: rgba(97, 97, 97, 0.9);
    border-radius: 2px;
    color: rgb(255, 255, 255);
    display: inline-block;
    font-size: 10px;
    font-weight: 500;
    line-height: 14px;
    max-width: 170px;
    position: fixed;
    top: -500px;
    left: -500px;
    padding: 8px;
    text-align: center;
}

.mdl-tooltip.is-active {
    -webkit-animation: pulse 200ms cubic-bezier(0, 0, 0.2, 1) forwards;
    animation: pulse 200ms cubic-bezier(0, 0, 0.2, 1) forwards;
}

.mdl-tooltip--large {
    line-height: 14px;
    font-size: 14px;
    padding: 16px;
}

.ui-dialog {
    padding: 0px !important;
    border-radius: 8px !important;
    border: none !important;
    overflow: hidden !important;
    position: relative !important;
    z-index: 10000 !important;
    max-width: 100vw !important;
    max-height: 100vh !important;
    box-sizing: border-box !important;
    min-width: 800px !important;
    min-height: 500px !important;
}

.ui-dialog.ui-draggable {
    max-width: 100vw !important;
    max-height: 100vh !important;
    min-width: 800px !important;
    min-height: 500px !important;
}

.ui-dialog .ui-dialog-content {
    overflow: hidden !important;
    padding: 0 !important;
    position: relative !important;
    z-index: 10001 !important;
    max-width: 100% !important;
    max-height: 100% !important;
    box-sizing: border-box !important;
    contain: layout style paint !important;
}

.ui-widget-overlay {
    z-index: 9999 !important;
}

#boxDetalhar {
    z-index: 10002 !important;
    position: relative !important;
}

#boxDetalhar .left-detalhar {
    z-index: 10003 !important;
    position: relative !important;
}

#boxDetalhar .right {
    z-index: 10003 !important;
    position: relative !important;
}

#tabelaDetalhar {
    z-index: 10004 !important;
    position: relative !important;
}

.ui-dialog .ui-button {
    margin: unset;
    padding: 10px 32px;

    background: transparent !important;
    border: 1px solid #ced3e2 !important;
    border-radius: 8px !important;

    width: unset !important;
    height: unset !important;
}

.ui-dialog>.ui-dialog-titlebar {
    padding: 16px 24px 24px !important;
}
.ui-dialog>.ui-dialog-titlebar .ui-dialog-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 20px;
    line-height: 30px;
    font-weight: 500;
    color: var(--color-text-primary);
    margin: 0 !important;
}

.ui-dialog>.ui-dialog-titlebar>.ui-dialog-titlebar-close>.ui-button-icon span {
    position: static !important;
    display: block;
}

.ui-dialog>.ui-dialog-titlebar>.ui-dialog-titlebar-close {
    top: 0px;
    right: 0px;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 8px !important;
    margin: 0px !important;
}

.ui-dialog>.ui-dialog-titlebar>.ui-dialog-titlebar-close>.ui-button-icon {
    position: static !important;
    width: 18px !important;
    height: 18px !important;
    margin: unset;
    padding: unset;
}

.ui-dialog>.ui-dialog-titlebar {
    padding: 16px 24px 24px !important;
    border: none !important;
}

.ui-dialog>.ui-dialog-content {
    padding: 0px 24px !important;
    border: none !important;
}

.ui-dialog>.ui-dialog-buttonpane {
    margin: 0 !important;
    padding: 56px 24px 16px !important;
    border: none !important;
}

.ui-dialog>.ui-dialog-buttonpane>.ui-dialog-buttonset {
    width: 100% !important;
    display: flex !important;
    justify-content: flex-end !important;
    gap: 8px !important;
}

.ui-dialog>.ui-dialog-buttonpane>.ui-dialog-buttonset>.ui-button {
    margin: 0 !important;
}
