@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;600;800&display=swap');

*, *::before, *::after {
    box-sizing: border-box;
}

body { 
    font-family: 'Inter', sans-serif; 
    display: flex; 
    flex-direction: column; 
    align-items: center; 
    padding: 20px; 
    background-color: #f8fafc;
}

.banner {
    background-color: whitesmoke;
    border: 1px solid rgba(75, 75, 75, 0.2);
    position: absolute;
    padding-left: 20px;
    padding-bottom: 10px;
    height: 60px;
    width: 100%;
    top: 0;
}

.banner p {
    position: absolute;
    display: inline;
    font-size: 1.2em;
    font-weight: 500;
}

.banner p, .menu-toggle {
    color: #888;
}


/* ==================================== HAMBURGER MENU ======================================= */

.menu-toggle {
  background: none;
  border: none;
  cursor: pointer;
  padding: 10px;
  float: right;
  margin-top: 5px;
}

.menu-toggle:hover {
  opacity: 0.5;
}

.app-header h1 {
    font-weight: 600;
}

.aligner {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(75, 75, 75, 0.2);
    background-color: whitesmoke;
    padding: 20px;
    flex-direction: column;
    align-items: center;
    border-radius: 10px;
    margin-top: 60px;
    max-width: 400px;
    display: flex;
}

header p {
    font-weight: 550;
}

h1 {
    border: 1px solid rgba(75, 75, 75, 0.2);
    border-radius: 8px;
    text-align: center;
    padding: 5px;
}

input { 
    position: relative;
    width: 100%; 
    padding: 10px 0 10px 10px; 
    font-size: 1.2rem; 
    border: 2px solid #ccc; 
    border-radius: 8px; 
}

input:focus {
  outline: none; /* Removes the default browser glow */
  border: 2px solid skyblue; /* Adds your own custom border */
}

#search::placeholder {
    font-size: 0.8em;
    opacity: 0.6;
}

#results { 
    grid-template-columns: 1fr 1fr; 
    gap: 10px; 
    width: 100%; 
    max-width: 300px; 
}

.card {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.4); 
    padding: 40px 20px; 
    border-radius: 8px; 
    text-align: center;
    font-size: 0.9em; 
    font-weight: bold; 
    color: whitesmoke;
}

.card:hover {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.5);
}

.safe { 
    background: linear-gradient(180deg, #28a745, forestgreen);  
}

.toxic { 
    background: linear-gradient(180deg, indianred, #c00); 
}

.hidden { 
    display: none; 
}

.note {
    grid-column: 1 / -1;
    display: none;
    align-items: flex-start;
    gap: 8px;
    background-color: #f0f4f8;
    border: 1px solid #d0d9e2;
    border-radius: 8px;
    padding: 10px 14px;
    margin: 10px 0 5px;
    font-size: 0.8rem;
    color: #555;
}

.note::before {
    content: "ℹ";
    flex-shrink: 0;
    font-size: 14px;
}

.disclaimer {
    font-size: 0.7rem;
    color: #888;
    text-align: center;
    line-height: 1.4;
    margin-top: 20px;
    padding-top: 12px;
    border-top: 1px solid rgba(75, 75, 75, 0.15);
}

/* =================================== DROPDOWN RESULTS =================================== */

/* Container to anchor the dropdown */
.input-wrapper {
    position: relative;
    width: 300px;
    margin: 10px auto;
    margin-bottom: 25px;
    text-align: center;
}

/* Remove margin from input since the wrapper now handles it */
.input-wrapper input {
    margin: 0;
}

/* Dropdown Menu Styles */
.dropdown {
    position: absolute;
    top: 100%; /* Sits exactly below the input */
    left: 0;
    width: 100%;
    background: white;
    border: 2px solid #ccc;
    border-top: none;
    border-radius: 0 0 8px 8px;
    list-style: none;
    padding: 0;
    margin: 0;
    max-height: 200px;
    overflow-y: auto;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    z-index: 10;
}

/* Individual List Items */
.dropdown li {
    padding: 12px 15px;
    cursor: pointer;
    border-bottom: 1px solid #eee;
    font-size: 1.1rem;
    color: #333;
}

.dropdown li:last-child {
    border-bottom: none;
}

/* Hover and Keyboard Navigation Active State */
.dropdown li:hover, 
.dropdown li.active {
    background-color: skyblue;
    color: #000;
}


/* ===== HANDHELD MEDIA (MOBILE, TABLET) @media (max-width: 480px) block ===== */



@media (max-width: 480px) {

    body {
        width: 275px;
    }

    .aligner {
        max-width: 250px;
        margin: 50px auto;
    }

    input, .dropdown {
        max-width: 200px;
    }

    .input-wrapper ul {
        left: 25px;
    }

    #results {
        width: 200px;
        display: flex;
        flex-direction: row;
        margin: 0 auto;
        gap: 15px;
    }

    .card {
        padding: 25px 15px;
    }
}


