/* Generel styling */
@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&display=swap');

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Roboto', sans-serif;
    background: url('../src/Produkter opstillet.jpg') no-repeat center center fixed;
    background-size: cover;
    color: #343a40;
    line-height: 1.6;
    min-height: 100vh;
    padding: 0;
}

/* Main container der fylder hele siden korrekt */
.main-container {
    display: grid;
    grid-template-columns: 1fr 350px;
    min-height: 100vh;
    backdrop-filter: blur(3px);
    max-width: 1400px;
    width: 100%;
    margin: 0 auto;
    position: relative;
    padding-top: 20px;
}

/* Venstre sektion - produkter */
.product-section {
    padding: 40px;
    overflow-y: auto;
    height: 100vh;
}

/* Produkt grid - nu med kun 2 produkter i bredden */
.produkt-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
    padding-right: 20px;
    padding-top: 12px;
}

.produkt {
    background: rgb(247, 243, 232);
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    position: relative;
    border: 1px solid rgba(0, 0, 0, 0.08);
    width: 100%;
}

/* Højre sektion - samlet info (flyttet mod midten) */
.summary-section {
    background: rgba(255, 255, 255, 0.95);
    padding: 40px 30px 40px 20px;
    height: 100vh;
    position: sticky;
    top: 0;
    overflow-y: auto;
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.05);
    border-left: 1px solid rgba(0, 0, 0, 0.1);
    margin-left: 20px;
}

/* Primær knap (tilføj produkt) */
#add-product-button {
    background: rgba(159, 177, 137, 0.95);
    color: #fff;
    border: none;
    padding: 14px;
    border-radius: 8px;
    font-size: 16px;
    cursor: pointer;
    width: 45%;
    margin-top: 20px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    font-weight: 500;
}

#add-product-button:hover {
    background: rgba(139, 157, 117, 0.95);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

/* Send resultat knap */
#send-result-button {
    background: rgba(159, 177, 137, 0.95);
    color: #fff;
    border: none;
    padding: 14px;
    border-radius: 8px;
    font-size: 16px;
    cursor: pointer;
    width: 100%;
    margin-top: 15px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    font-weight: 500;
}

#send-result-button:hover {
    background: rgba(139, 157, 117, 0.95);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

/* Sletknap (beholdt rød farve for advarsel) */
button.delete-button {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background-color: #f44336;
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    transition: background-color 0.3s ease;
}

button.delete-button:hover {
    background-color: #d32f2f;
}

/* Nulstil knap (original styling) */
button.reset-button {
    position: absolute;
    top: 12px;
    right: 50px;
    background: none;
    border: none;
    cursor: pointer;
}

button.reset-button img {
    width: 22px;
    height: 22px;
    transition: transform 0.3s ease;
}

button.reset-button:hover img {
    transform: rotate(90deg);
}

/* Rediger knap med ID */
#edit-product-button {
    background: rgba(159, 177, 137, 0.95);
    color: #fff;
    border: none;
    padding: 12px;
    border-radius: 8px;
    font-size: 16px;
    cursor: pointer;
    width: 100%;
    margin-top: 10px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    font-weight: 500;
    display: block;
}

#edit-product-button:hover {
    background: rgba(139, 157, 117, 0.95);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

/* Gem knap med ID */
#save-product-button {
    background: rgba(159, 177, 137, 0.95);
    color: #fff;
    border: none;
    padding: 12px;
    border-radius: 8px;
    font-size: 16px;
    cursor: pointer;
    width: 100%;
    margin-top: 10px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    font-weight: 500;
    display: none; /* Skjult som standard */
}

#save-product-button:hover {
    background: rgba(139, 157, 117, 0.95);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

/* Modal knapper */
.modal-content button {
    background: rgba(159, 177, 137, 0.95);
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 5px;
    cursor: pointer;
    margin-top: 10px;
    transition: all 0.3s ease;
}

.modal-content button:hover {
    background: rgba(139, 157, 117, 0.95);
}

/* Samlet info styling */
.summary-group {
    margin-bottom: 30px;
}

.summary-title {
    font-size: 1.2rem;
    color: #007bff;
    margin-bottom: 20px;
    font-weight: 600;
}

/* Responsivt design */
@media (max-width: 1024px) {
    .main-container {
        grid-template-columns: 1fr;
        max-width: 100%;
    }

    .product-section {
        height: auto;
        padding: 30px;
    }

    .summary-section {
        height: auto;
        position: static;
        padding: 30px;
        margin-left: 0;
    }

    .produkt-container {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .product-section, .summary-section {
        padding: 20px;
    }

    .produkt-container {
        grid-template-columns: 1fr;
    }

    #add-product-button {
        width: 100%;
    }
}

/* Animationer */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Modal styling */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.7);
}

.modal-content {
    background-color: white;
    margin: 10% auto;
    padding: 30px;
    width: 90%;
    max-width: 500px;
    border-radius: 10px;
    position: relative;
}

.close-button {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 24px;
    cursor: pointer;
    color: #9FB189;
}

/* Input felter */
input, select {
    width: 100%;
    padding: 12px;
    margin-bottom: 15px;
    border: 1px solid #ddd;
    border-radius: 6px;
}

/* Materiale info */
.materiale-info {
    display: none;
    margin-top: 15px;
    padding: 15px;
    background-color: #f8f9fa;
    border-radius: 6px;
}
.right-section label {
    font-family: 'Roboto', sans-serif;
    font-size: 14px;
    color: #4a5568; /* Lidt blålig grå */
    font-weight: 500;
    margin-bottom: 6px;
    display: block;
    text-transform: uppercase; /* Gør teksten til store bogstaver hvis du ønsker */
    letter-spacing: 0.5px;
    font-family: inherit;
}
#packwise-image {
    position: absolute;
    top: 15px;
    left: 0;
    width: 200px; /* Adjust the width as needed */
    height: auto; /* Maintain aspect ratio */
}