/* --- 1. DESIGN TOKENS --- */
:root {
    --primary: #293a2a;
    --primary-dark: #335636;
    --bg-header: #33563673; 
    --white: #ffffff;
    --text-light: rgba(255, 255, 255, 0.9);
    --text-muted: rgba(255, 255, 255, 0.65);
    --border: #ddd;
    --radius-sm: 8px;
    
    --font-main: "botanica-sans", sans-serif;
    --font-script: "botanica-script", sans-serif;
    --font-dry-brush: "botanica-script-dry-brush", sans-serif;
}

/* --- 2. BASE STYLES --- */
* { 
    box-sizing: border-box; 
    margin: 0; 
    padding: 0; 
}

body {
    background-color: var(--bg-header);
    color: var(--white);
    font-family: var(--font-main);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* --- 3. HEADER & LOGO --- */
.header {
    width: 100%;
    padding: 1rem 0;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo-img {
    height: 140px; 
    width: auto;
    display: block;
    padding-top: 1rem;
}

/* --- 4. LOGIN & LOGOUT --- */
.section-login { 
    padding-top: 2rem;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 30vh;
}

.card {
    background: transparent;
    padding: 0;
    width: 100%;
    max-width: 400px;
    text-align: center;
}

#loginForm {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

input:not(#searchInput) {
    width: 100%;
    background: transparent;
    border: none;
    border-bottom: 2px solid var(--primary);
    padding: 12px 0;
    font-family: var(--font-main);
    font-size: 1.1rem;
    color: #ffffff;
    outline: none;
    transition: border-color 0.3s;
}

input:not(#searchInput)::placeholder {
    color: var(--text-muted);
}

input:not(#searchInput):focus { 
    border-bottom-color: var(--white); 
}

.btn-primary {
    background: transparent;
    color: var(--white);
    border: 1px solid var(--white);
    padding: 12px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    width: 100%;
    margin-top: 20px;
    transition: all 0.3s;
}

.btn-primary:hover { background: var(--white); color: var(--primary-dark); }

.btn-logout {
    background: transparent;
    border: 1px solid var(--white);
    color: var(--white);
    padding: 8px 18px;
    border-radius: 6px;
    cursor: pointer;
    margin: 2rem auto 0 auto;
    display: block;
    font-size: 0.85rem;
    transition: all 0.3s;
}

/* --- 5. SEARCH INTERFACE --- */
.search-wrapper {
    max-width: 600px;
    margin: 0 auto 0.5rem auto;
    display: flex;
    justify-content: center;
}

#searchInput {
    width: 100%;
    background: transparent;
    border: none;
    border-bottom: 2px solid var(--primary);
    padding: 5px 0;
    font-size: 1.8rem;
    font-family: var(--font-script);
    color: #ffffff;
    outline: none;
    text-align: center;
}

#searchInput::placeholder {
    color: rgba(255, 255, 255, 0.7);
    opacity: 1;
}

.search-feedback {
    text-align: center;
    margin-bottom: 2rem;
    font-size: 0.85rem;
    color: var(--text-light);
}

/* --- 6. GRID & CARDS --- */
.title-margin {
    font-family: var(--font-script);
    color: var(--white);
    font-size: 2.2rem;
    text-align: left;
    margin: 2.5rem 0 1.5rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    padding-bottom: 10px;
}

.grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 25px 15px;
    width: 100%;
}

.plant-card {
    background: transparent;
    display: flex;
    flex-direction: column;
    border-bottom: 1px solid var(--primary);
    padding-bottom: 12px;
    position: relative;
}

.plant-card-image-wrapper {
    width: 100%;
    height: 140px;
    margin-bottom: 10px;
    overflow: hidden;
    border-radius: var(--radius-sm);
    position: relative;
}

.plant-card-img {
    position: absolute;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.plant-card-content h3 { font-size: 0.9rem; text-transform: capitalize; color: var(--white); }
.plant-card-content p { color: var(--text-muted); font-size: 0.75rem; font-style: italic; margin-bottom: 8px; }

.btn-add {
    background: transparent;
    border: 1px solid var(--white);
    color: var(--white);
    padding: 6px;
    border-radius: 4px;
    font-size: 0.7rem;
    cursor: pointer;
    width: 100%;
    text-transform: uppercase;
}

/* --- 7. LOAD MORE & BACK TO TOP --- */
.loading-more-style {
    display: block;
    width: fit-content;
    margin: 3rem auto;
    background: transparent;
    border: none;
    color: var(--white);
    font-family: var(--font-dry-brush);
    font-size: 1.5rem;
    cursor: pointer;
}

.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 20px;
    background: transparent;
    color: var(--primary);
    border: none;
    cursor: pointer;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.5s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

.back-to-top.is-visible { opacity: 1; visibility: visible; }
.back-to-top::before { content: ''; width: 2px; height: 30px; background-color: var(--primary); }
.back-to-top::after { content: 'TOP'; font-size: 0.6rem; letter-spacing: 2px; }

/* --- 8. DELETE BUTTON & MODALS (SKARP BAGGRUND) --- */
.btn-delete {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background: transparent;
    color: var(--text-muted);
    border: none;
    width: 30px;
    height: 30px;
    cursor: pointer;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.35); /* Let mørkning, men helt skarp */
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    /* BACKDROP BLUR ER FJERNET HERFRA */
}

.modal-content {
    background: #ffffff;
    color: #333;
    padding: 2rem;
    border-radius: 15px;
    max-width: 340px;
    width: 90%;
    text-align: center;
    box-shadow: 0 20px 40px rgba(0,0,0,0.3); /* Kraftigere skygge for at løfte den fra den skarpe baggrund */
}

.modal-content p {
    font-family: var(--font-main);
    font-size: 1.1rem;
    margin-bottom: 1.8rem;
    color: #333;
}

.modal-actions {
    display: flex;
    gap: 12px;
}

.btn-confirm {
    background: #a52a2a;
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-weight: 600;
    flex: 1;
}

.btn-cancel {
    background: #f0f0f0;
    color: #444;
    border: none;
    padding: 12px 20px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-weight: 600;
    flex: 1;
}

/* --- 9. UTILITIES & FOOTER --- */
.is-hidden { display: none; }
.garden-footer { width: 100vw; line-height: 0; margin-top: 3rem; }
.footer-img { width: 100%; height: auto; display: block; }

/* --- 10. DESKTOP MEDIA QUERIES (768px+) --- */
@media (min-width: 768px) {
    .container { padding: 0 25px; }
    .logo-img { height: 400px; padding-top: 3rem; }
    .section-login { padding-top: 4rem; }
    #searchInput { font-size: 2.2rem; }
    .title-margin { font-size: 3rem; margin: 4rem 0 2rem 0; }
    .grid {
        grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
        gap: 40px 20px;
    }
    .plant-card-image-wrapper { height: 180px; }
    .back-to-top { bottom: 40px; right: 40px; }
    .back-to-top::before { height: 40px; }
}