/* --- 1. DESIGN TOKENS --- */
:root {
    --primary: #293a2a;
    --primary-dark: #335636;
    --bg-header: #33563673; 
    --white: #fcfcfcdf;
    --text-light: rgba(252, 252, 252, 0.9);
    --text-muted: rgba(252, 252, 252, 0.6);
    --border: #ddd;
    --radius-sm: 8px;
    
    /* Typografi baseret på Adobe Typekit integration */
    --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 25px;
}

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

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

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

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

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

#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: var(--white);
    outline: none;
    transition: border-color 0.3s;
}

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

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

.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;
}

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

/* --- 5. SEARCH INTERFACE --- */
.search-wrapper {
    max-width: 600px;
    margin: 0 auto 1rem auto;
    display: flex;
    align-items: flex-end;
    gap: 20px;
}

#searchInput {
    flex: 2;
    background: transparent;
    border: none;
    border-bottom: 2px solid var(--primary);
    padding: 10px 0;
    font-size: 2.2rem;
    font-family: var(--font-script);
    color: var(--white);
    outline: none;
}

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

.search-feedback b {
    color: #fff;
}

.advanced-dropdown {
    flex: 1;
    background: transparent;
    border: none;
    border-bottom: 2px solid var(--primary);
    color: var(--white);
    padding: 10px 0;
    font-family: var(--font-main);
    font-size: 0.9rem;
    cursor: pointer;
    outline: none;
}

.loading-dots {
    grid-column: 1 / -1;
    text-align: center;
    font-family: var(--font-dry-brush);
    font-size: 1.4rem;
    color: var(--white);
    padding: 2rem;
    opacity: 0.8;
}

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

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 40px 20px;
    width: 100%;
}

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

.plant-card-image-wrapper {
    width: 100%;
    height: 180px;
    margin-bottom: 12px;
    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 {
    color: var(--white);
    font-size: 1rem;
    margin-bottom: 2px;
    font-weight: 600;
    text-transform: capitalize;
}

.plant-card-content p {
    color: var(--text-muted);
    font-size: 0.8rem;
    font-style: italic;
    margin-bottom: 12px;
}

.btn-add {
    background: transparent;
    border: 1px solid var(--white);
    color: var(--white);
    padding: 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    cursor: pointer;
    width: 100%;
    transition: all 0.3s;
    text-transform: uppercase;
    letter-spacing: 1px;
}

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

.btn-add.btn-added {
    background: var(--white);
    color: var(--primary-dark);
    cursor: default;
}

/* --- 8. DELETE BUTTON & MODALS --- */
.btn-delete {
    position: absolute;
    bottom: 5px;
    right: 0;
    background: transparent;
    color: var(--text-muted);
    border: none;
    width: 20px;
    height: 20px;
    cursor: pointer;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    z-index: 10;
}

.btn-delete:hover {
    color: #630c15;
    transform: scale(1.2);
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.modal-content {
    background: #fff;
    color: #293a2a;
    padding: 2rem;
    border-radius: 12px;
    max-width: 350px;
    width: 90%;
    text-align: center;
    box-shadow: 0 20px 40px rgba(0,0,0,0.3);
}

.modal-content p {
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    font-weight: 500;
    line-height: 1.4;
}

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

/* Specifikke knapper til Confirm (Slet) */
.btn-confirm {
    background: #630c15;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
}

.btn-cancel {
    background: #f0f0f0;
    color: #555;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
}

/* Overstyring af btn-primary indeni modal (til Alert OK) */
.modal-content .btn-primary {
    border: 1px solid var(--primary);
    color: var(--primary);
}

.modal-content .btn-primary:hover {
    background: var(--primary);
    color: #fff;
}

/* --- 7. UTILITIES & ANIMATIONS --- */
.is-hidden { 
    display: none; 
}

.loading-more-style {
    display: block;
    width: fit-content;
    margin: 4rem auto;
    background: transparent;
    border: none;
    color: var(--white);
    font-family: var(--font-dry-brush);
    font-size: 1.8rem;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.loading-more-style:hover {
    transform: scale(1.05);
}

/* --- 9. BACK TO TOP --- */
.back-to-top {
    position: fixed;
    bottom: 40px;
    right: 40px;
    background: transparent;
    color: var(--primary);
    border: none;
    cursor: pointer;
    z-index: 1000;
    
    /* Animation & Visibility */
    opacity: 0;
    visibility: hidden;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    transform: translateY(20px);

    /* Layout */
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

.back-to-top.is-visible {
    opacity: 1; /* Diskret når den bare er der */
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    opacity: 1; /* Lyser op ved interaktion */
}

/* Den visuelle pil (skabt med CSS-streger for et skarpt look) */
.back-to-top::before {
    content: '';
    width: 2px;
    height: 40px;
    background-color: var(--primary);
    transition: height 0.3s ease;
}

.back-to-top:hover::before {
    height: 60px; /* En lille elegant "vokse"-effekt */
}

/* Teksten under stregen */
.back-to-top::after {
    content: 'TOP';
    font-family: var(--font-main);
    font-size: 0.7rem;
    letter-spacing: 3px;
    font-weight: 300;
    text-transform: uppercase;
}

.garden-footer { 
    width: 100vw; 
    line-height: 0; 
    margin-top: 4rem;
}

.footer-img {
    width: 100%;
    max-width: 1920px;
    height: auto;
    display: block;
    margin: 0 auto;
}