body, html {
	margin: 0;
	height: 100%;
	color: #7f2549;
	font-family: Arial;
	font-size: calc(8px + 0.5vw);
	background-color: #fdfbf8;
}

h1 {
    text-align: center;
}

.title {
    padding-top: 30px;
}

/* Default title image */
.title-image {
    height: 100px;
    width: auto;
    padding-top: 10px;
    padding-bottom: 5px;
}

/* Tablet (≤ 1024px) */
@media (max-width: 1024px) {
    .title-image {
        height: 80px;
        padding-top: 8px;
        padding-bottom: 4px;
    }
}

/* Mobile (≤ 600px) */
@media (max-width: 1024px) {
    .title-image {
        height: 80px;
        padding-top: 6px;
        padding-bottom: 3px;
    }
}

/* Default emoji (Desktop: 1280px and up) */
.emoji {
    height: 18px;           /* default desktop size */
    width: auto;            /* keep aspect ratio */
    display: inline-block;  /* behave like text */
    vertical-align: middle; /* align with text */
}

/* Tablet (≤ 1024px) */
@media (max-width: 1024px) {
    .emoji {
        height: 16px;
    }
}

/* Mobile (≤ 600px) */
@media (max-width: 600px) {
    .emoji {
        height: 16px;
    }
}
 
/* Hamburger icon */
.hamburger {
    font-size: 30px;
    cursor: pointer;
    color: #7f2549;
    padding: 10px 16px;
    user-select: none;
    position: fixed;
    top: 20px;
    left: 20px;
    background: transparent;
    z-index: 1100;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

/* Hidden state for hamburger */
.hamburger.hidden {
    opacity: 0;
    visibility: hidden;
}

/* Sidebar styles */
.sidebar {
    height: 100%;
    width: 0; /* hidden by default */
    position: fixed;
    top: 0;
    left: 0;
    background-color: #fdfbf8;
    border-right: 1px solid #7f2549;
    overflow-x: hidden;
    transition: 0.3s;
    padding-top: 60px;
    box-shadow: 2px 0 5px rgba(0,0,0,0.2);
    z-index: 1200;
}

/* Sidebar links */
.sidebar a {
    padding: 15px 30px;
    text-decoration: none;
    font-size: 18px;
    color: #7f2549;
    display: block;
    transition: 0.3s;
}

.sidebar a:hover {
    background-color: #e7d7df;
    color: #5a1a3a;
}

/* Close button (X) on top right inside sidebar */
.sidebar .closebtn {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 30px;
    cursor: pointer;
}

/* Overlay that dims the page when sidebar is open */
.overlay {
    position: fixed;
    display: none;
    top: 0;
    left: 0;
    height: 100%;
    width: 100%;
    background-color: rgba(0,0,0,0.5);
    z-index: 1100;
}

/* Submenu container */
.submenu {
    background-color: #f7f1f5;
    padding-left: 20px;
}

/* Subtab links */
.subtab {
    font-size: 16px;
    padding: 10px 30px;
    display: block;
    color: #7f2549;
    text-decoration: none;
}

.subtab:hover {
    background-color: #e1d0dd;
    color: #5a1a3a;
}

/* Style for the submenu toggle link (Motherhood) */
.submenu-toggle {
    cursor: pointer;
    display: block;
    padding: 15px 30px;
    color: #7f2549;
    text-decoration: none;
    font-size: 18px;
    user-select: none;
}

.submenu-toggle:hover {
    background-color: #e7d7df;
    color: #5a1a3a;
}

/* Centering style */
.center-content {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	text-align: center;
	margin: auto;
	padding: 20px 20px 50px 20px; /* top right bottom left */
}

.center-content img.image {
	max-width: 100%;
	height: auto;
}

/* Default uploaded image */
.uploaded-image {
    max-width: 500px;
    max-height: 500px;
    display: block;
    margin: 0 auto;
    width: 100%;   /* shrink if container is smaller */
    height: auto;  /* keep aspect ratio */
}

/* Tablet (≤ 1024px) */
@media (max-width: 1024px) {
    .uploaded-image {
        max-width: 400px;
        max-height: 400px;
    }
}

/* Mobile (≤ 600px) */
@media (max-width: 600px) {
    .uploaded-image {
        max-width: 350px;
        max-height: 350px;
    }
}

#ingredients {
    width: 100%;
    max-width: 700px;
    font-size: 1em;
    padding: 10px;
    border-radius: 6px;
    border: 1px solid #ccc;
    box-sizing: border-box;
}

/* Smaller on mobile devices */
@media (max-width: 600px) {
    #ingredients {
        font-size: 0.9em;
        height: 120px; /* Smaller height for mobile */
    }
}

/* Submit button */
button[type="submit"] {
    background-color: #651635;
    color: white;           	   /* Text color for contrast */
    border: none;           	   /* Remove border */
    padding: 5px 10px;     	   /* Size of button */
    font-size: calc(8px + 0.5vw);  /* Text size */
    border-radius: 5px;     	   /* Rounded corners */
    cursor: pointer;        	   /* Pointer on hover */
}

button[type="submit"]:hover {
    background-color: #54122d; /* Slightly darker on hover */
}

/* Loader container */
#loader {
    position: relative;
    width: 60px;
    height: 60px;
    margin: 30px auto;
    display: none; /* hidden initially */
}
  
/* Spinning ring */
.loader-ring {
    box-sizing: border-box;
    width: 100%;
    height: 100%;
    border: 6px solid #f3f3f3;
    border-top: 6px solid #7f2549;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}
  
/* Centered % text */
.loader-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 12px;
    font-weight: bold;
    color: #7f2549;
    pointer-events: none;
}
  
@keyframes spin {
    0%   { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

#backToTop {
    display: none;
    position: fixed;
    bottom: 40px;
    right: 40px;
    z-index: 999;
    background-color: #333;
    color: #fff;
    border: none;
    padding: 12px 18px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
}
  
#backToTop:hover {
    background-color: #555;
}
  
