@media print {
 #mb-plugin-wrapper,
 #board-wrapper,
 #puzzle_container {
    width: auto;
    height: auto;
 }
 .puzzle_block {
    page-break-inside: avoid;
 }
}

    /* Base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Arial",-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif;
}

#accept-marketing-text {
  font-size: 12px;       /* mindre end normal tekst */
  color: #666;           /* afdæmpet grå */
  margin-top: 6px;       /* lidt luft over */
  line-height: 1.4;      /* gør teksten mere læsbar */
}

#accept-marketing-text a {
  color: #925c3a;        /* samme brunlige nuance som knappen */
  text-decoration: underline;
}

#mb-plugin-wrapper  {
    display: flex;
    min-height: 50vh;
    max-height: 75vh;
    
    max-width: 1050px;
    background-color: #E2E9ED; /* Light background color */
    position: relative
}

h1, h2, h3, h4, h5, h6 {
    font-family: "Arial",-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif;
}

.icon {
    aspect-ratio: 1/1;
    height: 22px;
}

#controls-icon {
    position: absolute;
    top: 12px; /* Juster efter behov */
    left: 5%; /* Juster efter behov */
}

#controls-content {
    padding: 10px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 20px;
    width: 100%;
}

#controls-content > div {
    display: flex;
    align-items: center;
    gap: 10px;
}


#controls-content.hidden {
    display: none;
}

#board-wrapper {
    position: absolute;
    left: 62%;
    transform: translateX(-50%);
    height: 70%;
}

/* mb-sidebar styles */
.mb-sidebar-container {
    width: 24%;
    background-color: #e2e9ed;
    box-shadow: 2px 0 10px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    overflow-y: auto;
    height: 100%;
    position: relative;
    z-index: 100;
}

.mb-sidebar-container.minimized {
    width: 60px;
}

.mb-sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    border-bottom: 1px solid #E2E9ED;
    background-color: #243b4c; /* Dark blue header */
    color: white;
}

.mb-sidebar-title {
    font-size: 18px;
    font-weight: 600;
    color: #fff;
    transition: opacity 0.3s;
    font-family: "Arial",-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif;
}

/* Filter section styles */
.filter-section {
    padding: 15px;
    border-bottom: 1px solid #E2E9ED;
    transition: opacity 0.3s;
    background-color: #e2e9ed; 
}

.filter-toggle {
    width: 100%;
    background: none;
    border: none;
    color: #243b4c;
    font-size: 16px;
    font-weight: 600;
    font-family: "Arial",-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    padding: 0;
    text-align: left;
    gap: 8px;
}

.filter-toggle:focus-visible {
    outline: 2px solid #243b4c;
    outline-offset: 2px;
}

.filter-toggle::after {
    content: '\25BC';
    font-size: 0.9em;
    transition: transform 0.2s ease;
}

.filter-toggle[aria-expanded="false"]::after {
    transform: rotate(-90deg);
}

.filter-body {
    margin-top: 12px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.filter-section.collapsed .filter-body {
    display: none;
}

.filter-title {
    font-size: 16px;
    font-weight: 500;
    margin-bottom: 15px;
    color: #243b4c;
    font-family: "Arial",-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif;
}

.filter-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
    transition: ease-in;
    transition-duration: 0.4ms;
    font-size: 16px;
    font-weight: 500;
    margin-bottom: 15px;
    color: #243b4c;
    font-family: "Arial",-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif;
}


.filter-options select,
.filter-options input {
    padding: 8px;
    border-radius: 4px;
    border: 1px solid #E2E9ED;
    font-size: 14px;
    margin-bottom: 8px;
    background-color: #fff;
}

.filter-multiselect {
    position: relative;
}

.filter-multiselect__toggle {
    width: 100%;
    padding: 8px 32px 8px 12px;
    border-radius: 4px;
    border: 1px solid #E2E9ED;
    background-color: #fff;
    font-size: 14px;
    color: #243b4c;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    text-align: left;
    gap: 8px;
}

.filter-multiselect__toggle::after {
    content: '\25BC';
    font-size: 0.8rem;
    color: #243b4c;
    margin-left: auto;
    display: inline-block;
    transition: transform 0.2s ease;
}

.filter-multiselect.is-open .filter-multiselect__toggle::after {
    transform: rotate(-180deg);
}

.filter-multiselect__toggle:focus-visible {
    outline: 2px solid #243b4c;
    outline-offset: 2px;
}

.filter-multiselect__dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    background-color: #fff;
    border: 1px solid #d0dbe3;
    border-radius: 6px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.08);
    max-height: 220px;
    overflow-y: auto;
    padding: 6px 0;
    z-index: 200;
}

.filter-multiselect.is-open .filter-multiselect__dropdown {
    display: block;
}

.filter-multiselect__option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 12px;
    font-size: 14px;
    color: #243b4c;
    cursor: pointer;
}

.filter-multiselect__option:hover {
    background-color: #f3f7f9;
}

.filter-multiselect__option input {
    cursor: pointer;
}

.filter-options button {
    padding: 8px 12px;
    background-color: #87624e;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    margin-bottom: 8px;
    transition: background-color 0.2s;
    color: #e2e9ed;
    font-family: "Arial",-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif;
}

.filter-options button:hover {
    background-color: #996f58;
}

/* Product list styles */
#mb-sidebar {
    padding: 15px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    transition: opacity 0.3s;
    background-color: #E2E9ED; /* Light background */
}

.produkt-item {
    cursor: pointer;
    transition: transform 0.2s;
    /* background-color: #fff; */
    border-radius: 8px;
    padding: 10px;
    outline: none; 

}

.produkt-item:hover {
    transform: scale(1.12);
}

.produkt-item.selected {
    transform: scale(1.12);
    outline: none;

}
.produkt-item.selected img {
    box-shadow: 0 4px 15px rgba(153, 111, 88, 0.4);

}

.produkt-item:focus {
    /* Forbedret tilgængelighed: bevarer fokusstaten, men fjerner den grimme sorte kant */
    outline: none; 
}

.produkt-item img {
    width: 100%;
    object-fit: cover;
    border-radius: 6px;
    margin-bottom: 8px;
}

.produkt-item .produkt-image-container {
    position: relative;
}











/* Controls styles */
#controls {
    margin-bottom: 20px;
    padding: 15px;
    background-color: #243b4c; 
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    font-family: "Arial",-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif;
    display: flex;
    justify-content: center;

    width: 100%;
    position: relative;
    min-height: 45px;

}

#reset-grid {
    aspect-ratio: 1/1;
}

.button-icon {
    font-size: 16px;
}

#controls label {
    color: #e2e9ed;
    font-weight: bold;
}

#controls select,
#controls button {
    margin: 0;
    padding: 8px 12px;
    border-radius: 4px;
    border: 1px solid #E2E9ED;
    font-family: "Arial",-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif;
}

#controls select {
    background-color: white;
}

#controls button {
    background-color: #85604c;
    color: white;
    border: none;
    cursor: pointer;
    transition: background-color 0.2s;
}

#controls button:hover {
    background-color: #996f58;
}


.floating-export-button {
    position: absolute;
    bottom: 32px;
    right: 32px;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background-color: #996F58;
    color: #fff;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    cursor: pointer;
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.2);
    transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
    z-index: 1000;
}

.floating-export-button:hover,
.floating-export-button:focus {
    transform: translateY(-2px);
    box-shadow: 0 16px 30px rgba(0, 0, 0, 0.25);
    background-color: #85604c;
    outline: none;
}

.floating-export-button:active {
    transform: translateY(0);
}

.export-modal {
    position: fixed;
    inset: 0;
    background: rgba(14, 27, 36, 0.65);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
    z-index: 1100;
}

.export-modal.open {
    opacity: 1;
    pointer-events: auto;
}

.export-modal__content {
    background: #e2e7e9;
    padding: 32px;
    width: min(400px, 100%);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    font-family: "Arial",-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif;
}

.export-modal__content h2 {
    margin-top: 0;
    margin-bottom: 20px;
    color: #243b4c;
    font-size: 22px;
}

.export-modal__close {
    position: absolute;
    top: 12px;
    right: 12px;
    background: transparent;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: #7c8a96;
}

.export-modal__close:hover,
.export-modal__close:focus {
    color: #243b4c;
    outline: none;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 16px;
}

.form-group label {
    font-weight: 600;
    color: #243b4c;
}

.form-group input {
    padding: 10px 12px;
    border: 1px solid #d3dde3;
    border-radius: 6px;
    font-family: "Arial",-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif;
    font-size: 14px;
}

.form-group input:focus {
    border-color: #996F58;
    outline: none;
    box-shadow: 0 0 0 3px rgba(153, 111, 88, 0.2);
}

.form-group input.input-error {
    border-color: #c0392b;
    box-shadow: 0 0 0 3px rgba(192, 57, 43, 0.15);
}

.form-error {
    font-size: 12px;
    color: #c0392b;
    min-height: 16px;
    margin: 0;
}

.export-modal__submit {
    width: 100%;
    padding: 12px 18px;
    border-radius: 6px;
    border: none;
    background-color: #996F58;
    color: #fff;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.export-modal__submit:hover,
.export-modal__submit:focus {
    background-color: #85604c;
    outline: none;
}

body.export-modal-open {
    overflow: hidden;
}



/* Puzzle grid styles */
#puzzle_container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(3, 1fr);
    gap: 1px; /*mellem fliserne*/
    background-color: #243b4c; /* farven mellem fliserne */
    margin-top: 20px;
    padding: 3px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    aspect-ratio: 1/1;
    width: 100%;
    height: 100%;
}

.puzzle_block {
    background-color: #E2E9ED;
    border-radius: 2px;
    display: flex;
    justify-content: center;
    align-items: center;
    background-size: cover;
    background-position: center;
    position: relative;
    aspect-ratio: 1/1;
}

.puzzle_block.empty {
    background-image: none;
    user-drag: none;
}

/* Tooltip styling */
.puzzle_block .tooltip {
    position: absolute;
    bottom: 5px;
    left: 5px;
    background: rgba(35, 60, 77, 0.85); /* Dark blue with opacity */
    color: #fff;
    padding: 4px 8px;
    border-radius: 4px;
    opacity: 0;
    transition: opacity 0.3s;
    font-size: 12px;
    pointer-events: none;
    font-family: "Arial",-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif;
}

.puzzle_block:hover .tooltip, .puzzle_block:active .tooltip {
    opacity: 1;
}

/* Remove button styling */
.remove-btn {
    opacity: 0;
    position: absolute;
    top: 5px;
    right: 5px;
    background-color: #996F58; /* Brown accent */
    border: none;
    border-radius: 50%;
    width: 25px;
    height: 25px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    font-weight: bold;
    color: white;
}

.puzzle_block:not(.empty):hover > .remove-btn {
    opacity: 1;
}

/* Hide elements when mb-sidebar is minimized */
.mb-sidebar-container.minimized .mb-sidebar-title,
.mb-sidebar-container.minimized .filter-section,
.mb-sidebar-container.minimized #mb-sidebar {
    opacity: 0;
    height: 0;
    overflow: hidden;
}

.content-wrapper {
    width: 80vw;
    height:95vh;
    
}
