/*
 * This is a manifest file that'll be compiled into application.css.
 *
 * With Propshaft, assets are served efficiently without preprocessing steps. You can still include
 * application-wide styles in this file, but keep in mind that CSS precedence will follow the standard
 * cascading order, meaning styles declared later in the document or manifest will override earlier ones,
 * depending on specificity.
 *
 * Consider organizing styles into separate files for maintainability.
 */


* {
    font-family: "Segoe UI", sans-serif;
    font-size: 14px;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --navbar-height: 50px;
    --color-button: #0070F2;
    --color-link: #0064D9;

    --color-input-border: #556B8140;
    --color-input-border-bottom: #556B81;

    --color-background: #F5F6F7;

    --color-background-light: #EBF8FF;
    --color-background-light-hovered: rgba(0, 112, 242, 0.2);

    --color-font: #1D2D3E;
    --color-font-light: #556B82;

    --color-gray: #E5E5E5; /*#3C3C434D*/

    --color-gray-2: #D9D9D9;

    --color-green: #009933;
    --color-red: #FF0000;
    --color-yellow: #FFCC00;
    --color-orange: #FF9900;
    --color-blue: #0064D9;
    --color-purple: #800080;
    --color-pink: #FF00FF;
    --color-brown: #8B4513;

    --opacity-disable: 0.4;

    --button-radius: 5px;
}

h1 {
    font-size: 24px;
    font-weight: 900;
}

h2 {
    font-size: 20px;
    font-weight: 700;
}

h3 {
    font-size: 16px;
    font-weight: 700;
}

a {
    color: var(--color-link);
    text-decoration: none;
}

a[disabled="disabled"], a:disabled {
    opacity: var(--opacity-disable);
    cursor: not-allowed;
    pointer-events: none;
}

a img {
    vertical-align: middle;
}

hr {
    height: 1px;
    border: none;
    border-bottom: solid 1px var(--color-input-border);
}

input[type="text"],
input[type="number"],
input[type="email"],
input[type="password"],
input[type="date"],
textarea,
select {
    border: 1px solid var(--color-input-border) !important;
    border-bottom: 1px solid var(--color-input-border-bottom) !important;
    border-radius: 4px;

    padding: 5px 8px;
}

select {
    height: fit-content;
    width: 100%
}

input[type="date"] {
  width: 100%;
}

input[type="checkbox"],
input[type="radio"] {
    width: 20px !important;
    height: 20px;
    accent-color: var(--color-link);
}


/*filters*/
.filters-container {
    width: 100%;
    display: flex;
    justify-content: space-between;
    gap: 20px;
}

.filters-inputs {
    display: flex;
    align-items: flex-end;
    gap: 20px;
    row-gap: 5px;
    flex-wrap: wrap;
}

/*TODO - input field with label - poprawić, dać do środka wrap class*/
.filters-inputs .form-group-column,
.filters-inputs .form-group-row {
    width: fit-content !important;
}


.filters-buttons {
    display: flex;
    align-items: flex-end;
    gap: 20px;
}

/*end-filters*/


.input-with-icon {
    padding-right: 35px;
}

input[type="date"]::-webkit-calendar-picker-indicator {
    opacity: 0;
}
/*end-form inputs*/


button[disabled="disabled"] {
    opacity: var(--opacity-disable);
    cursor: not-allowed;
    pointer-events: none;
}

body {
    height: min(100vh, 100dvh);
    display: grid;
    grid-template-columns: 210px auto;
    grid-template-rows: auto 1fr;
    grid-template-areas:
    "sidebar navbar"
    "sidebar main"
}

body.sidebar-collapsed {
    grid-template-columns: 50px auto;
}

body.sidebar-collapsed .sidebar-button span {
    display: none;
}


/* Grid elements */
nav {
    grid-area: navbar
}

aside {
    grid-area: sidebar
}

main {
    grid-area: main
}

/* End - Grid elements */

nav {
    height: var(--navbar-height);
    padding: 1rem 25px 1rem 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

aside {
    background: white;
    border-right: 1px solid var(--color-gray);
    transition: transform 0.3s ease;
}

main {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* END - Grid */

/* Containers */
.nav-container {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.aside-container {
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 0;
}

.main-container {
    height: 100%;
    display: grid;
    grid-template-rows: auto 1fr;
    overflow: hidden;
}

/* END - Containers */

.modules-buttons {
    display: flex;
    flex-direction: column;
}

.aside-logo-div {
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    height: 85px;
}

.aside-logo {
    width: 85%;
}

.small-aside-logo {
    display: none;
}

body.sidebar-collapsed .aside-logo {
    display: none;
}

body.sidebar-collapsed .small-aside-logo {
    display: inline-block;
    /*width: 50%;*/
}


.login-form-div {
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}
.login-form-div form {
    width: 300px;
    height: fit-content;
    display: flex;
    gap: 10px;
    flex-direction: column;
    padding-bottom: 150px;
}

.top-main {
    border-bottom: solid 1px var(--color-gray);
}

.page-top-div {
    padding: 20px 20px 20px 25px;
    border-top: solid 1px var(--color-gray);

    display: flex;
    position: relative;
    justify-content: space-between;
    min-width: 0; /* Allows container to be smaller than content */
    overflow: visible; /* Allows children to overflow outside container */
}

.page-top-content {
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 1;
    flex-shrink: 0; /* Prevents shrinking when container gets small */
}

.page-top-actions {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;

    position: absolute; /* Create stacking context */
    right: 20px;
    z-index: 2;
    flex-shrink: 0; /* Prevents shrinking when container gets small */
}

.page-top-header {
    margin-bottom: 20px;
}

.page-top-header p {
    color: var(--color-font-light);
}

.page-top-actions-buttons {
    display: flex;
    gap: 10px;
}


.page-cards {
    display: flex;
    gap: 40px;
}


.page-data-card p:nth-child(1) {
    font-size: 16px;
    font-weight: 400;
}

.page-data-card p:nth-child(2),
.page-data-card p:nth-child(2) span {
    max-width: 330px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 24px;
    font-weight: 600;
    color: var(--color-font-light);
}
.page-data-card p:nth-child(2) a {
    font-size: 24px;
    font-weight: 600;
}

.page-data-card .green {
    color: var(--color-green) !important;
}

.page-data-card p:has(img) {
    text-align: center;
}

.bottom-main {
    display: grid;
    grid-template-rows: auto 1fr;
    overflow: hidden;
    padding: 12px 12px 16px 12px;
    background: var(--color-background);
}

.bottom-main-content {
    height: 100%;
    display: flex;
    flex-direction: column;
    background: white;
    border-radius: 10px;
    overflow: hidden;
}

.table-row-stats {
    color: var(--color-font-light);
    margin-left: 20px;
    margin-right: 30px;
    /* position: relative; */
    /* bottom: -1px; */
    /* height: 5px; */
    position: absolute;
    bottom: 0px;
    font-size: smaller;
    /*width: calc(100% - 300px); */
    /* Accounts for your left (20px) and right (30px) margins */
    display: inline-flex;
    justify-content: space-between;
}

.table-container {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.above-table-div {
    border-bottom: solid 1px var(--color-gray);
}

.actions-top-div {
    width: 100%;
    padding: 15px;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
}


.left-actions {
    display: inline-flex;
    gap: 20px;
    align-items: center;
}


.right-actions {
    display: inline-flex;
    gap: 10px;
    align-items: center;
}

.data-div-scrollable {
    overflow: auto;
    height: 100%;
    min-height: 60px;
}

.data-summary-div {
    padding: 15px;
}

.bookmark-buttons-div {
    min-height: 45px; /*also when no content*/
    padding-left: 25px;
    display: flex;
    gap: 30px;
}

.bookmark-buttons-div a {
    display: flex;
    align-items: center;
}

.bookmark-buttons-div a.disabled {
    opacity: var(--opacity-disable);
    cursor: not-allowed;
    pointer-events: none;
}


aside ul {
    list-style: none;
    padding: 0;
}

aside ul li {
    margin: 10px 0;
}

aside ul li a {
    color: white;
    text-decoration: none;
}


.menu-toggle {
    background: none;
    border: none;
    color: var(--color-font);
    cursor: pointer;
    display: none;
}

@media (max-width: 768px) {
    .menu-toggle {
        display: block;
    }

    body {
        min-height: min(100vh, 100dvh);
        display: grid;
        grid-template-columns: 1fr;
        grid-template-areas:
    "navbar"
    "main"
    }

    aside {
        border-right: 1px solid var(--color-gray);
        border-bottom: 1px solid var(--color-gray);
        z-index: 99;
        width: 100%;
        transform: translateX(-100%);
        position: fixed;
        top: var(--navbar-height);
    }

    aside.active {
        transform: translateX(0);
    }

    .current-user-div {
        display: none;
    }
}


.path-row {

}

.header-row {
}

.buttons-row {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.filters-row {
    padding: 15px;
    border-top: 1px solid var(--color-gray);
    display: inline-flex;
    flex-wrap: wrap;
    width: 100%;
    gap: 20px;
    justify-content: flex-end;
}


.hidden {
    display: none;
}

.current-user-div {
    display: flex;
    align-items: center;
    gap: 10px;
}
.app-dev-env{
    font-size: x-large;
    color: red;
    border: 2px solid red;
    border-radius: 5px;
    padding: 0 10px;
}
.app-demo{
    font-size: x-large;
    font-weight: bold;
    color: green;
    border: 2px solid green;
    border-radius: 5px;
    padding: 0 10px;
}
.app-name {
    margin-right: 50px;
    font-size: x-large;
    color: var(--color-font-light);
}
.current-user {
    padding-right: 50px;
    font-size: x-large;
}


/*  BUTTONS   */

.sidebar-button {
    display: flex;
    align-items: center;
    font-weight: 400;
    font-size: medium;
    text-decoration: none;
    padding: 7px 12px;
    border-bottom: solid 1px var(--color-gray);
    background: white;
    color: var(--color-font);
}

.sidebar-button span {
    font-size: medium;
    display: inline;
}


.sidebar-button img {
    margin-right: 8px;
}

.sidebar-button:hover {
    background: var(--color-background-light);
}

.sidebar-button.active {
    background: var(--color-background-light);
    color: var(--color-link);
    border-bottom: solid 1px var(--color-link);
}

input[type="submit"] {
    color: white;
}

button, input[type="submit"] {
    /*min-height: 36px;*/
    padding: 5px 8px 5px 8px;
    font-weight: 600;
    font-size: medium;
    border: 1px solid;
    border-radius: var(--button-radius);
    /*default*/
    cursor: pointer;
    background: var(--color-button);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
}

a.button-color, a.button-white {
    display: flex;
    align-items: center;
    justify-content: center;
}

.button-color {
    padding: 5px 8px 5px 8px;
    font-weight: 600;
    font-size: medium;
    border-radius: var(--button-radius);
    cursor: pointer;
    background: var(--color-button);
    border: 1px solid var(--color-button);
    color: white;
}

.button-white {
    padding: 5px 8px 5px 8px;
    font-weight: 600;
    font-size: medium;
    border-radius: var(--button-radius);
    cursor: pointer;
    background: white;
    border: 1px solid var(--color-input-border);
    color: var(--color-link);
}


/*live search*/
.live-search-container {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
    max-width: 220px;
}

.live-search-input {
    width: 100%;
    padding: 8px 30px 8px 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 14px;
    outline: none;
}

.clear-x-button {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    color: var(--color-font-light);
    padding: 0;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}


/* X button hover effect */
.clear-x-button:hover {
    color: #333;
}

/* Hide the X button when the input is empty (optional) */
.live-search-input:placeholder-shown + .clear-x-button {
    display: none;
}

/*end live search*/


input[type="submit"].button-white {
    background: white;
    border: 1px solid var(--color-input-border);
    color: var(--color-link);
}


.dark-font {
    color: var(--color-font) !important;
}

.button-link {
    background: none;
    color: var(--color-link);
    border: 1px solid white;
}

.button-link:hover {
    background: var(--color-gray);
    border: 1px solid darkgray;
}

.collapse-side-button {
    background: none;
    color: var(--color-link);
    border: 1px solid white;
    cursor: pointer;
    text-align: end;
}

.toggle-show {
    min-width: 140px;
    display: flex;
    gap: 5px;
    align-items: center;
}

.button-bookmark {
    padding: 3px 3px;
    background: none;
    font-weight: 600;
    font-size: medium;
    border-radius: 0;
    color: var(--color-font);
    position: relative; /* Added for positioning the pseudo-element */
    border-bottom: none;
}

.button-bookmark:hover {
    color: var(--color-link);
}

.button-bookmark.active {
    color: var(--color-link);
    border-bottom: none;
}

.button-bookmark.active::after {
    content: "";
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    height: 3px;
    background-color: var(--color-link);
    border-top-left-radius: 2px;
    border-top-right-radius: 2px;
}

/*bulk actions*/
.bulk-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.bulk-actions button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

.bulk-actions [data-table-selection-target="selectedCount"] {
    padding: 5px 10px;
    background-color: #f0f0f0;
    border-radius: var(--button-radius);
    font-size: 0.9em;
}

/* Style for inline forms used in table actions */
.inline-form {
    display: inline-block;
}

.vertical-separator {
    border-left: 1px solid var(--color-gray);
    height: 24px;
}

/* END - bulk actions*/


/* Breadcrumbs */
.breadcrumbs {
    font-size: 20px;
    font-weight: 400;
    margin: 0;
    padding: 0;
    color: var(--color-font-light);
}

.breadcrumbs a, .breadcrumbs span {
    font-size: 20px;
    font-weight: 400;
}

.breadcrumbs a:hover {
}

/* END - Breadcrumbs */


/*serach dropdown*/
.select-dropdown-display-input {
    cursor: pointer;
    padding-right: 24px;
    width: 100%;
    background: #ffffff00;
}

.search-select-svg-div {
    position: absolute;
    right: 2px;
    top: 3px;
    z-index: -1;
}

.dropdown-panel {
    position: absolute;
    width: 100%;
    z-index: 10;
}

.search-input-div {

}

.search-input {
    width: 100%;
    padding: 8px 10px;
}

.search-dropdown-results {
    max-height: 200px;
    width: max-content;
    min-width: 100%;
    overflow-y: auto;
    border: 1px solid #ccc;
    position: absolute;
    z-index: 99;
    background: white;
}

.search-input-row {
    padding: 8px 10px;
    cursor: pointer;
    border-bottom: 1px solid #eee;
}

.search-input-row:hover {
    background-color: #f0f0f0;
}

.lead-more {
    color: gray;
    text-align: center;
    padding: 2px;
}


.print-buttons-div {
    display: flex;
    gap: 10px;
    padding: 15px;
    border-bottom: 1px solid var(--color-gray);
}

.print-page {
    padding: 60px;
    width: min-content;
    border: solid 1px var(--color-gray);
}

.print-div {
    width: 794px;
    height: auto;
    margin: 0 auto;
    border: dashed 1px var(--color-gray);
}

.info-icon {
    display: inline-block;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background-color: var(--color-button);
    color: white;
    text-align: center;
    line-height: 24px;
    font-weight: bold;
    font-size: 14px;
    user-select: none;
    margin-right: 8px;
}
