/* Base layout */
html, body {
    height: 100%;
    margin: 0;
    padding: 0;
    display: flex;    
    flex-direction: column;
    overflow: auto;
    background-color: #e6e6e6;
}

/* Grid container */
#grid-container {
    flex: 1;
    width: 100%;
    display: flex;
    flex-direction: column;
    overflow: auto;
    margin: 0 0 0 10px;
}

#grid {    
    flex: 1;
    width: 100%;
    overflow: auto;
}

/* Pagination */
#pager {
    height: 50px;
    text-align: left;
    padding-right: 20px;
    margin-right: 0;
}

/* Grid header alignment */
.ui-jqgrid .ui-jqgrid-htable th {
    text-align: left !important;
}

/* Container layout */
.container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 10px;
}

/* Basic elements */
h1 {
    margin: 0;
}

button {
    margin: 0;
}

/* Toolbar styling */
#toolbar {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 10px;
    background-color: #8a0707;
    border-bottom: 1px solid #ccc;
}

.toolbar-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.toolbar-row2 {
    background-color: #800000;
    color: #ffffff;
    padding: 10px;
    display: flex;
    gap: 20px;
    flex-shrink: 0;
    align-items: center;
}

/* Toolbar images */
.toolbar-image {
    height: 60px;
    margin-right: 10px;
}

.toolbar-image-wide {
    height: 40px;
    margin-right: 20px;
    cursor: pointer;
}

/* Toolbar buttons */
.toolbar-button {
    padding: 12px 25px;
    border: 1px solid #ccc;
    border-radius: 4px;
    background-color: #c72323;
    color: white;
    cursor: pointer;
}

.toolbar-button:hover {
    background-color: #f30808;
}

/* Input styling */
.styled-input-column {
    padding: 2px 3px;
    margin: 2px 5px;
    border: 1px solid #ccc;
    border-radius: 4px;
    width: 200px;
    box-sizing: border-box;
}

.styled-input-year {
    padding: 2px 3px;
    margin: 2px 5px;
    border: 1px solid #ccc;
    border-radius: 4px;
    width: 80px;
    box-sizing: border-box;
}

/* Filter groups */
.filter-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 4px 8px;
    border: 1px solid #4e4d4d;
    border-radius: 4px;
    margin: 5px;
    background-color: #c72323;
    min-height: 60px;
    height: auto;
    justify-content: center;
}

.filter-row {
    display: flex;
    align-items: center;
    gap: 4px;
    min-height: 25px;
}

.filter-group .filter-row:empty {
    display: none;
}

.filter-group label {
    white-space: nowrap;
    color: white;  
}

.filter-group > .filter-label {
    color: #fff;
    font-weight: bold;
    margin-bottom: 2px;
    margin-top: 2px;
    font-size: 1em;
    letter-spacing: 0.02em;
    display: block;
    line-height: 1.2;
}

/* Add a subtle separator between filter groups */
.filter-group + .filter-group {
    border-left: 1px solid rgba(255, 255, 255, 0.2);
    padding-left: 15px;
}

/* Secondary toolbar */
#toolbar2 {
    margin-left: 15px;
}

/* Sticky jqGrid header (med white istället för #fff) */
.ui-jqgrid .ui-jqgrid-htable {
    position: sticky;
    top: 0;
    z-index: 2;
    background: white;
}

/* Sticky headers */
.ui-jqgrid .ui-jqgrid-hdiv,
.ui-jqgrid .ui-search-toolbar {
    position: sticky;
    top: 0;
    z-index: 10;
    background: white;
}

/* Export Modal Styles */
.modal {
    position: fixed;
    z-index: 1000;
    left: 0; top: 0; width: 100vw; height: 100vh;
    background: rgba(0,0,0,0.4);
    display: flex; justify-content: center; align-items: center;
}
.modal-content {
    background: #fff;
    padding: 30px 20px;
    border-radius: 8px;
    min-width: 250px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.2);
    position: relative;
}
.close {
    position: absolute;
    top: 10px; right: 15px;
    font-size: 22px;
    cursor: pointer;
}
