@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; 
    flex-direction: column; 
    padding: 20px; 
    background-color: #f8fafc;
    overflow-y: auto;
}


/* =============================== BANNER ================================== */


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

.banner a {
    position: absolute;
    display: inline;
    font-size: 1.2em;
    font-weight: 500;
    bottom: 15px;
}

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

.banner-title {
    position: absolute;
    display: inline;
    font-size: 1.2em;
    font-weight: 500;
    color: #888;
    text-decoration: none;
}

.banner-title:hover {
    color: #333;
}

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

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

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


/* ===== SLIDE-OUT MENU ===== */

.menu-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 100;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.menu-overlay.active {
    display: block;
    opacity: 1;
}

.side-menu {
    position: fixed;
    top: 0;
    right: 0;
    height: 100%;
    width: 260px;
    background: #fff;
    box-shadow: -4px 0 20px rgba(0, 0, 0, 0.15);
    transform: translateX(100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 101;
    display: flex;
    flex-direction: column;
    padding: 80px 0 30px;
}

.side-menu.active {
    transform: translateX(0);
}

.menu-close {
    position: absolute;
    top: 18px;
    right: 20px;
    background: none;
    border: none;
    font-size: 1.8rem;
    color: #888;
    cursor: pointer;
    line-height: 1;
}

.menu-close:hover {
    color: #333;
}

.side-menu ul {
    list-style: none;
    padding: 0;
    margin: 0;
    flex: 1;
}

.side-menu ul li {
    border-bottom: 1px solid #f0f0f0;
}

.side-menu ul li a {
    display: block;
    padding: 16px 28px;
    text-decoration: none;
    color: #333;
    font-size: 0.95rem;
    font-weight: 500;
    transition: background 0.15s, color 0.15s;
}

.side-menu ul li a:hover {
    background: #f8fafc;
    color: #000;
}

.menu-footer {
    padding: 0 28px;
    font-size: 0.75rem;
    color: #bbb;
}


/* =============================== ABOUT ================================== */


@media (min-width: 601px) {
    .about-aligner {
        min-width: 550px;
    }
}

.pcheck {
    font-weight: 600;
}

.about-aligner {
    max-width: 520px;
    gap: 0;
    text-align: left;
    padding: 30px;
}

.back-link {
    font-size: 0.75rem;
}

.back-link:hover {
    color: steelblue;
}

.about-aligner .app-header {
    margin-bottom: 10px;
    width: 100%;
}

.about-aligner .app-header p {
    display: none;
}

.about-content {
    width: 100%;
}

.about-content section {
    margin-bottom: 32px;
}

.about-content h2 {
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #aaa;
    margin-bottom: 10px;
}

.about-content p {
    font-size: 0.95rem;
    color: #444;
    line-height: 1.75;
    margin-bottom: 10px;
}

.about-content a {
    color: steelblue;
    text-decoration: none;
}

.about-content a:hover {
    text-decoration: underline;
}

.contact-section {
    background: #f0f4f8;
    border: 1px solid #d0d9e2;
    border-radius: 10px;
    padding: 20px 24px;
}

.contact-btn {
    display: inline-block;
    margin-top: 12px;
    padding: 10px 20px;
    background: #333;
    color: #fff !important;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none !important;
    transition: background 0.2s;
}

.contact-btn:hover {
    background: #000;
}

.about-footer {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 20px;
    margin-top: 10px;
    border-top: 1px solid rgba(75, 75, 75, 0.15);
    font-size: 0.75rem;
    color: #aaa;
}

.about-footer a, .back-link {
    color: #aaa;
    text-decoration: none;
}

.about-footer a:hover, .back-link:hover {
    color: #333;
}

.about-footer span {
    margin-left: 70px ;
}

@media (max-width: 600px) {
    .about-aligner {
        padding: 20px;
    }
}


/* =============================== BODY ================================== */

.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: 60px auto 0;
    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;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

.header-logo {
    height: 44px;
    width: auto;
}

input { 
    position: relative;
    width: 100%; 
    padding: 10px 38px 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.65rem;
    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: 100%;
    margin: 10px auto;
    margin-bottom: 25px;
    text-align: center;
}

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

#clear-btn {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: #aaa;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s, transform 0.3s;
}

#clear-btn:hover {
    color: #555;
    transform: translateY(-50%) rotate(180deg);
}


/* 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 auto;
    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;
}


/* ============================= STATIC PAGES =================================== */

#full-page-link {
    display:none;
    grid-column: 1 / -1;
    text-align:center;
    font-size:0.8rem;
    color:#888;
    text-decoration:none;
    padding-top:4px;
}

#full-page-link:hover {
    color: steelblue;
}



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


@media (max-width: 600px) {
    body {
        padding: 0;
    }

    .aligner {
        width: calc(100% - 20px);
        max-width: 100%;
        min-width: 95%;
        margin: 70px auto 0;
    }

    .input-wrapper {
        width: 100%;
    }

    input, .dropdown {
        width: 100%;
        max-width: 100%;
    }

    #results {
        width: 100%;
        max-width: 100%;
        display: grid;
        grid-template-columns: 1fr 1fr;
    }

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