/* Stylesheet for the application */

body {
    max-width: 1000px;
    margin: 20px auto;
    padding: 0 20px;
}

header {
    padding: 20px 40px;
    background: #3c1361;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-sizing: border-box;
    gap: 20px;
}

.headerLogo {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex-shrink: 1;
    min-width: 0;
}

.logo {
    fill: white;
    width: clamp(40px, 8vw, 75px);
    height: auto;
    margin-bottom: 10px;
}

.logoTextTop {
    font-weight: bold;
    font-size: clamp(20px, 4vw, 32px);
}

.logoTextMiddle {
    font-weight: bold;
    font-size: clamp(16px, 3vw, 24px);
}

.logoTextBottom {
    font-size: clamp(12px, 2vw, 18px);
}

.logoTextTop,
.logoTextMiddle,
.logoTextBottom {
    margin: 0;
    color: white;
    font-family: Arial, sans-serif;
    line-height: 1.1;
}

.headerImageWrap {
    flex: 1;
    min-width: 0;
    display: flex;
    justify-content: flex-end;
}

.headerImage {
    display: block;
    max-width: 100%;
    height: auto;
}

a {
    align-items: center;
}

nav {
    margin: 15px 0px 15px 0px;
    background: #f0f0f0;
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    padding: 20px 20px;
}

.navLeftWrap,
.navRightWrap {
    display: flex;
    flex-direction: row;
    gap: 50px;
    align-items: center;
}

.navText {
    margin: 0;
    color: #959595;
    font-family: Arial, sans-serif;
    font-size: clamp(12px, 2vw, 18px);
    cursor: pointer;
}

.link-style {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    text-decoration: underline;
}

.cartIcon {
    width: 30px;
    height: 30px;
    color: white;
    display: block;
}

main {
    display: flex;
    flex-direction: column;
    background: #f0f0f0;
    border-radius: 8px;
    padding: 40px;
    box-sizing: border-box;
    height: 500px;
    overflow-x: hidden;
}

h1 {
    margin: 0;
    margin-bottom: 20px;
    font-family: Arial, sans-serif;
    font-size: clamp(28px, 5vw, 50px);
}

h2 {
    margin: 0;
    margin-bottom: 20px;
    font-family: Arial, sans-serif;
    font-size: clamp(16px, 2.5vw, 24px);
}

main form {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.dropdownMenuWrap {
    display: flex;
    flex-direction: row;
    gap: 20px;
    flex-wrap: wrap;
}

.cart-title {
    font-size: 20px;
    font-weight: bold;
    margin: 20px 0 10px;
}

select {
    display: block;
    width: 260px;
    padding: 10px 12px;
    font-size: 16px;
    border: 1px solid #cfcfcf;
    border-radius: 8px;
    background: white;
    margin-bottom: 20px;
}

.total-row {
    border-top: 1px solid #ddd;
    padding-top: 12px;
    font-weight: bold;
}

.cartBottonWrap {
    margin-top: auto;
    display: flex;
    justify-content: flex-end;
}

.orderBotton {
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    font-family: Arial, sans-serif;
    font-size: 20px;
    background: #2f73ff;
    color: white;
    cursor: pointer;
}

.orderBotton:disabled {
    background: #b8c7ef;
    cursor: not-allowed;
}

.error-msg{
    color: red;
    font-family: Arial, sans-serif;
    font-size: 15px;
}

.main-container {
    display: flex;
    flex-direction: row;        /* row (vandret) eller column (lodret) */
    justify-content: center;    /* placering på hovedaksen */
    align-items: center;        /* placering på tværaksen */
    gap: 16px;                  /* mellemrum mellem elementer */
    flex-wrap: wrap;            /* tillad linjeskift hvis der ikke er plads */

}

#amount-val {
    -moz-appearance: textfield !important;
    appearance: textfield !important;
}
#amount-val::-webkit-outer-spin-button,
#amount-val::-webkit-inner-spin-button {
    -webkit-appearance: none !important;
    margin: 0;
}
.card {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    max-width: 600px;
}

.card-title {
    font-size: 16px;
    font-weight: 500;
    margin-bottom: 1rem;
}

.option-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-bottom: 1rem;
    background: #f5f5f5;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 10px 8px;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.15s;
}

.option-grid:hover {
    border-color: #aaa;
}

.option-grid.selected {
    border: 2px solid #D85A30;
    background: #FAECE7;
}

.option-name {
    font-weight: 500;
    font-size: 13px;
    color: #333;
}

.option-price {
    font-size: 12px;
    color: #888;
    margin-top: 2px;
}

.option-grid.selected .option-name {
    color: #712B13;
}

.option-grid.selected .option-price {
    color: #993C1D;
}

.counter-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 1rem 0;
}

.counter-wrap button {
    background: #f5f5f5;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    width: 32px;
    height: 32px;
    font-size: 18px;
    cursor: pointer;
}

.counter-wrap button:hover {
    border-color: #aaa;
}

#amount-val {
    width: 60px;
    text-align: center;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 4px;
    font-size: 16px;
    font-weight: 500;
    -moz-appearance: textfield !important;
    appearance: textfield !important;
}

#amount-val::-webkit-outer-spin-button,
#amount-val::-webkit-inner-spin-button {
    -webkit-appearance: none !important;
    margin: 0;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
    padding: 6px 0;
    border-bottom: 1px solid #e0e0e0;
    color: #666;
}

.total-row {
    display: flex;
    justify-content: space-between;
    font-size: 16px;
    font-weight: 500;
    padding-top: 12px;
}

.bestil-btn {
    width: 100%;
    padding: 12px;
    background: #D85A30;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    margin-top: 1rem;
}

.bestil-btn:hover {
    background: #993C1D;
}

.bestil-btn:disabled {
    background: #e0e0e0;
    color: #aaa;
    cursor: not-allowed;
}

/* Brugeroversigt - kun til ADMIN */
.user-overview {
    background: white;
    border-radius: 20px;
    padding: 25px;
    margin-top: 30px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    max-height: 250px;
    overflow-y: auto;
}

.user-overview form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Hver bruger/ordre boks */
.user {
    background: #f9f9f9;
    border-radius: 16px;
    padding: 20px;
    border-left: 5px solid #3c1361;
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    width: 100%;
    box-sizing: border-box;
}

.user:hover {
    background: #f0f0f0;
    transform: translateX(5px);
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
}

/* Tekst i brugerboksen */
.user div {
    font-family: Arial, sans-serif;
    font-size: 16px;
    color: #333;
    background: white;
    padding: 8px 16px;
    border-radius: 10px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

/* Knap til at redigere */
.user button {
    background: #3c1361;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.3s ease;
}

.user button:hover {
    background: #5a2a7a;
    transform: scale(1.02);
}

.login-label {
    display: block;
    margin-bottom: 15px;
    margin-top: 15px;
    text-align: left;
    font-weight: bold;
}

.login-input {
    width: 100%;
    max-width: 300px;
    padding: 12px;
    border: 1px solid #ba9f94;
    border-radius: 10px;
    box-sizing: border-box;
    font-size: 16px;
}

.loginWrap {
    display: flex;
    flex-direction: row;
    gap: 20px;
}

.loginBottonWrap {
    margin-top: auto;
    display: flex;
    justify-content: flex-end;
}

.submit-button {
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    font-family: Arial, sans-serif;
    font-size: 20px;
    background: #2f73ff;
    color: white;
    cursor: pointer;
}

.login-link {
    margin-top: 20px;
    font-size: 15px;
    font-family: Arial, sans-serif;
}

.login-link a {
    color: #2f73ff;
    text-decoration: none;
}

.login-link a:hover {
    text-decoration: underline;
}

.scroll-box {
    max-height: 250px;
    overflow-y: auto;
    padding-right: 8px;
}

.user-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-top: 20px;
    overflow-y: auto;
    overflow-x: hidden;

}

.user div {
    word-break: break-word;
}


img {
    max-width: 100%;
    height: auto;
}

@media (max-width: 768px) {
    nav {
        flex-direction: column;
        text-align: center;
    }

    .navLeftWrap, .navRightWrap {
        flex-direction: column;
        gap: 10px;
    }

    .dropdownMenuWrap {
        flex-direction: column;
    }

    select, button {
        width: 100%;
    }

    .loginWrap {
        flex-direction: column;
    }
}