/* style.css - Gesamtversion mit vergrößerten Listenelementen */

/* Farbvariablen für einfache Anpassung */
:root {
    --primary-color: #0d6efd; /* Bootstrap Blue */
    --primary-hover-color: #0b5ed7;
    --text-color-dark: #212529; /* Dark Gray */
    --text-color-medium: #495057;
    --background-light: #f8f9fa; /* Very light gray */
    --background-card: #ffffff; /* White */
    --border-color: #dee2e6;
    --shadow-color: rgba(0, 0, 0, 0.1);
    --danger-color: #dc3545; /* Rot für Löschen etc. */
    --danger-hover-color: #c82333;
}

body {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;
    line-height: 1.6;
    background-color: var(--background-light);
    color: var(--text-color-medium);
    margin: 0;
    padding: 0; /* Kein Body-Padding, Container regelt das */
}

/* Container für den Hauptinhalt */
.container {
    max-width: 700px; /* Breite anpassen nach Bedarf */
    margin: 40px auto; /* Oben/Unten Abstand, Auto für Zentrierung */
    padding: 30px;
}

h1 { /* Allgemeines H1 */
    color: var(--text-color-dark);
    margin-bottom: 20px; /* Allgemeiner Abstand */
    font-size: 2.8rem; /* Größer für index.php */
    font-weight: 600;
    text-align: center;
}

h2 { /* Allgemeines H2 */
    color: var(--text-color-dark);
    font-size: 1.75rem;
    margin-top: 0; /* Überschreibt ggf. Standard-Browser-Margin */
    margin-bottom: 25px;
    font-weight: 500;
}

a { /* Allgemeiner Link-Stil */
    color: var(--primary-color);
    text-decoration: none;
}

a:hover {
    color: var(--primary-hover-color);
    text-decoration: underline;
}

hr {
    margin: 20px 0;
    border: 0;
    border-top: 1px solid #eee;
}

/* --- Hauptaktionen (index.php) --- */
.main-actions {
    display: flex;
    justify-content: center;
    gap: 25px; /* Abstand zwischen Links */
    margin-bottom: 50px; /* Mehr Abstand nach unten */
    flex-wrap: wrap; /* Umbruch bei schmalen Bildschirmen */
}

.main-actions a {
    display: inline-flex; /* Stellt sicher, dass Flexbox angewendet wird */
    align-items: center; /* Vertikal zentrieren */
    gap: 10px; /* Abstand zwischen Icon und Text */
    text-align: left; /* Text linksbündig (falls umbrochen) */
    color: var(--primary-color); /* Farbe explizit setzen */
    text-decoration: none; /* Unterstreichung entfernen */
    font-size: 1rem;
    font-weight: 500;
    padding: 5px 0; /* Vertikales Padding für Klickfläche */
}

.main-actions a:hover {
    color: var(--primary-hover-color);
    text-decoration: underline; /* Unterstreichung bei Hover */
}


/* --- Liste der Geschäfte-Karten (index.php) --- */
.store-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid; /* Erlaubt einfachen Abstand */
    gap: 25px; /* Abstand zwischen den Karten */
}

.store-card {
    background-color: var(--background-card);
    border-radius: 8px;
    padding: 25px 30px;
    box-shadow: 0 3px 10px var(--shadow-color);
    border: 1px solid #e9ecef; /* Leichter Rand */
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}

.store-card h3 {
    margin: 0 0 20px 0; /* Abstand nur nach unten */
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-color-dark);
}

.store-card .button-group {
    display: flex;
    gap: 15px; /* Abstand zwischen Buttons */
    flex-wrap: wrap; /* Umbruch falls nötig */
}

.store-card .button-group a,
.store-card .button-group button {
    flex-grow: 1; /* Buttons teilen sich den Platz */
    background-color: var(--primary-color);
    color: #fff;
    padding: 12px 15px; /* Mehr vertikales Padding */
    border: none;
    border-radius: 6px;
    text-decoration: none;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    text-align: center;
    transition: background-color 0.2s ease;
    /* Flexbox für Icon+Text im Button */
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px; /* Kleinerer Abstand im Button */
}

.store-card .button-group a:hover,
.store-card .button-group button:hover {
    background-color: var(--primary-hover-color);
    color: #fff; /* Sicherstellen, dass Text weiß bleibt */
}


/* --- Spezifisches Styling für view_list.php --- */
.list-header {
    text-align: center;
    margin-bottom: 30px;
}

.header-prefix {
    display: block;
    font-size: 1.1rem;
    color: var(--text-color-medium);
    margin-bottom: 5px;
    font-weight: 400;
}

.header-store-name { /* H1 in view_list.php */
    font-size: 2.6rem;
    color: var(--text-color-dark);
    font-weight: 600;
    margin: 0;
    line-height: 1.2;
    text-align: center; /* Sicherstellen, dass es zentriert ist */
}

.list-navigation {
    margin-bottom: 25px;
    padding-bottom: 15px;
}

.list-navigation p {
    margin: 5px 0;
}

.list-navigation a {
    /* Verwendet allgemeine Link-Stile, ggf. anpassen */
    font-weight: 500;
    display: inline-flex; /* Flexbox für Link-Inhalt */
    align-items: center; /* Vertikal zentrieren */
    gap: 8px; /* Abstand */
}

.list-instructions {
    margin-bottom: 20px;
    color: var(--text-color-medium);
    font-size: 1rem;
}

.shopping-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 12px;
}

.shopping-list li {
    display: flex;
    align-items: center;
    background-color: var(--background-card);
    border-radius: 8px;
    padding: 15px 20px;
    border: 1px solid #e9ecef;
    border-bottom: 1px solid #e9ecef;
    margin-bottom: 0;
    transition: opacity 0.4s ease-out, transform 0.4s ease-out, background-color 0.2s ease;
}

.shopping-list li:hover {
    background-color: #f8f9fa;
}

/* Checkbox in der Einkaufsliste (vergrößert) */
.shopping-list .styled-checkbox {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    width: 33px; /* 50% größer als 22px */
    height: 33px; /* 50% größer als 22px */
    border: 2px solid #adb5bd; /* Etwas dickerer Rand */
    border-radius: 7px; /* Etwas rundere Ecken */
    margin-right: 30px; /* Mehr Abstand */
    cursor: pointer;
    position: relative;
    flex-shrink: 0;
    background-color: #fff;
    transition: border-color 0.2s ease, background-color 0.2s ease;
}

/* Artikelname in der Einkaufsliste (vergrößert) */
.shopping-list .item-name {
    font-size: 2.95rem; /* 50% größer als 1.3rem */
    color: var(--text-color-dark);
    font-weight: 500;
    line-height: 1.3;
    flex-grow: 1;
}

/* Klasse für das Entfernen von Elementen */
.shopping-list li.removing {
    opacity: 0;
    transform: scale(0.95);
}

/* Statusanzeige für AJAX auf view_list.php */
#ajax-status-view {
    display: block;
    margin-top: 15px;
    min-height: 1.2em;
    font-style: italic;
    color: var(--text-color-medium);
}

/* Nachricht für leere Einkaufsliste */
#empty-list-message {
    margin-top: 20px;
    padding: 20px;
    font-weight: 500;
    text-align: center;
    background-color: #e9f5e9;
    color: #1e4620;
    border: 1px solid #c8e6c9;
    border-radius: 6px;
}


/* --- Allgemeine Formular Elemente & Tabellen --- */
table {
    border-collapse: collapse;
    width: 100%;
    margin-bottom: 20px;
    background-color: #fff;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}
th, td {
    border: 1px solid var(--border-color);
    padding: 10px 12px;
    text-align: left;
    vertical-align: middle;
}
th {
    background-color: #f8f9fa;
    font-weight: 600;
    color: var(--text-color-dark);
}
tr:nth-child(even) td {
     background-color: #fdfdfd;
}

.table-responsive { /* Wrapper für Tabellen */
   overflow-x: auto;
   -webkit-overflow-scrolling: touch;
   display: block;
   width: 100%;
}


input[type=text],
input[type=password],
input[type=number],
input[type=email] {
    padding: 10px 12px;
    margin-bottom: 10px;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    font-size: 1rem;
    width: 100%;
    box-sizing: border-box;
}
/* Normale Checkbox (nicht die in der Einkaufsliste) */
input[type=checkbox] {
    margin-right: 5px;
    transform: scale(1.1);
}
label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
}
button, input[type=submit] {
    background-color: var(--primary-color);
    color: white;
    padding: 10px 18px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    transition: background-color 0.2s ease;
    line-height: 1.5; /* Sorgt für konsistente Höhe */
}
button:hover, input[type=submit]:hover {
    background-color: var(--primary-hover-color);
}

/* Spezifischer Button-Stil (z.B. für Löschen) */
.button-danger {
    background-color: var(--danger-color);
}
.button-danger:hover {
    background-color: var(--danger-hover-color);
}


/* --- Status / Feedback Meldungen --- */
.feedback {
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 5px;
    border: 1px solid transparent;
}
.feedback.error {
    color: #721c24;
    background-color: #f8d7da;
    border-color: #f5c6cb;
}
.feedback.success {
    color: #155724;
    background-color: #d4edda;
    border-color: #c3e6cb;
}
.feedback.info {
    color: #856404;
    background-color: #fff3cd;
    border-color: #ffeeba;
}


/* --- Icon Styling --- */
.icon-main-action {
    width: 64px;
    height: 64px;
    object-fit: contain;
    flex-shrink: 0;
}

.icon-button {
    width: 24px; /* Kleinere Größe für Buttons */
    height: 24px;
    object-fit: contain;
    flex-shrink: 0;
}

.icon-link {
    width: 20px; /* Kleinere Größe für Links */
    height: 20px;
    object-fit: contain;
    vertical-align: middle; /* Hilft bei Inline-Flex zur Sicherheit */
    flex-shrink: 0;
}


/* --- Style für Logout Link (falls separat benötigt) --- */
.logout-link {
    display: block;
    text-align: center;
    margin-top: 30px;
    color: var(--text-color-medium);
}


/* --- Responsive Anpassungen --- */
@media (max-width: 600px) {
    .container {
        margin-left: 10px;
        margin-right: 10px;
        padding: 20px;
        margin-top: 20px;
        margin-bottom: 20px;
    }

    /* H1 allgemein auf kleinen Screens anpassen */
    h1 {
       font-size: 2.2rem;
    }

    /* H2 allgemein auf kleinen Screens anpassen */
    h2 {
        font-size: 1.5rem;
        margin-bottom: 20px;
    }

    /* Anpassung Main Actions (index.php) */
    .main-actions {
        gap: 15px;
        justify-content: center;
        margin-bottom: 30px;
    }
    .main-actions a {
        gap: 8px;
    }

    /* Anpassung Store Cards (index.php) */
     .store-card {
         padding: 20px;
    }
    .store-card .button-group {
        flex-direction: column;
        gap: 12px;
    }
     .store-card .button-group a,
     .store-card .button-group button {
         width: 100%;
         box-sizing: border-box;
         gap: 6px;
     }

     /* Anpassung List Header (view_list.php) */
     .header-prefix {
         font-size: 1rem;
     }
     .header-store-name { /* H1 spezifisch für Liste */
         font-size: 2.1rem;
     }
     .list-navigation a {
         gap: 6px;
     }

     /* Anpassung Shopping List Items (view_list.php - vergrößert) */
     .shopping-list li {
         padding: 12px 15px; /* Padding eventuell anpassen */
     }
     .shopping-list .styled-checkbox {
         /* Kleinere Größe für mobile Ansicht, aber auch 50% größer als vorherige mobile Größe */
         width: 30px; /* Größer als ursprünglich mobil */
         height: 30px;
         margin-right: 25px; /* Abstand anpassen */
         border-radius: 6px;
     }
      .shopping-list .item-name {
         /* Größer als ursprünglich mobil */
         font-size: 1.7rem;
     }

     /* Anpassung Icons auf kleinen Screens */
     .icon-main-action {
        width: 48px;
        height: 48px;
     }
     .icon-button {
        width: 20px;
        height: 20px;
     }
      .icon-link {
         width: 18px;
         height: 18px;
     }
}