/* CSS Document main.css - This included basic styles for all pages which contains the standards for
	- menu, 
	- footer,
	- flex container - price details container
	- and other elements on all pages. */

/* General body definition */

body { 
    font-family: serif; 
    margin: 0; 
    padding: 0;
}

/* Header and Menu */
      header {    /*  Linear gradient background:  */
        background: linear-gradient(to right, #8e44ad, #d2b4de);
        padding: 20px;
        display: flex;
        align-items: center;
      }

      .logo {        /*  Logy styling  */
        width: 50px;
        height: 50px;
        object-fit: contain;
        margin-right: 20px;
      }

      nav { /*  Navigation Styling  */
        font-size: 16px;
		  display: flex;
        align-items: center;
      }		
		

      .dropdown { /*  Dropdown menu styling  */
        position: relative;
        display: inline-block;
      }

      .dropbtn, .menu-item { /*  Dropdown menu styling  */
        color: white;
        background-color: transparent;
        padding: 10px;
        font-size: 16px;
        border: none;
        cursor: pointer;
        text-decoration: none;
        display: inline-block;
        vertical-align: middle;
      }

	nav.menu-item { /*  Dropdown menu styling  */
        color: white;
        background-color: transparent;
        padding: 10px;
        font-size: 16px;
        border: none;
        cursor: pointer;
        text-decoration: none;
        display: inline-block;
        vertical-align: middle;
		
		}

.dropdown-content { /*  Dropdown menu styling  */
    display: none;
    position: absolute;
    background-color: #8e44ad;
    min-width: 500px; /* Increased width to accommodate more space */
    box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
    z-index: 1;
    top: 100%;
    left: 0;
    padding: 20px; /* Added padding around the entire dropdown */
}

.dropdown:hover .dropdown-content {/*  Dropdown menu styling  */
    display: flex;
}
		
.category-column {/* Category column styling within dropdown */
    flex: 1;
    padding: 0 15px; /* Increased padding on the sides */
    background-color: #8e44ad;
    margin-right: 20px; /* Added margin between columns */
}

.category-column:last-child {/* Category column styling within dropdown */
    margin-right: 0; /* Remove margin from the last column */
}

.category-item {/* Category column styling within dropdown */
    display: block;
    padding: 8px 0; /* Increased vertical padding */
    color: white;
    text-decoration: none;
}

/* Used by one column menu / sub-menu */

.dropdown.single-column .dropdown-content {
  width: auto;
  min-width: 200px;
  max-width: 250px;
}

.dropdown.single-column .category-column {
  width: 100%;
}


/* Flex Container  */ /* Product Prices Flex Container */

	#flex-container {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(235px, 6fr)); /* Responsive grid columns */
        gap: 10px; /* Gap between grid items */
        padding: 20px; /* Padding around the grid */
        border: 1px solid #ccc; /* Border for visualization */
        background-color: DodgerBlue;
      }
        .monthmonth, .monthyear, .yearyear { font-weight: 600; margin-right: 5px; }
        .name-value {
            font-size: 17px;
            font-weight: 700;
            margin-bottom: 20px;
            color: #ff00d2;
            min-height: 69px;
        }
        #flex-container > div {
			position: relative;
            background-color: #f0f0f0;
            padding: 20px 10px 10px 10px;
            border: 1px solid #aaa;
            text-align: left;
            font-size: 16px;
        }
        .item { display: inline-flex; }
        #loadingSpinner { text-align: center; margin: 20px; }
        .spinner {
            border: 8px solid rgba(0, 0, 0, 0.1);
            border-left: 8px solid #3498db;
            border-radius: 50%;
            width: 50px;
            height: 50px;
            animation: spin 1s linear infinite;
        }
        @keyframes spin {
            0% { transform: rotate(0deg); }
            100% { transform: rotate(360deg); }
        }



/* Footer used */

footer {
    background-color: #333;
    color: white;
    padding: 20px 0;
    text-align: center;
    width: 100%;
}

.footer-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.footer-banner {
    background-color: #555;
    padding: 10px 0;
    margin-bottom: 20px;
}

.footer-banner h3 {
    margin: 0;
}

.footer-nav {
    display: flex;
    justify-content: center;
}

.footer-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: inline-flex;
    flex-wrap: wrap;
    justify-content: center;
}

.footer-nav li {
    margin: 5px 10px;
}

.footer-nav a {
    color: white;
    text-decoration: none;
}

/* Footer used */

.tooltip {
    position: absolute;
    top: 5px;
    right: 5px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background-color: #007bff;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-style: italic;
    font-weight: bold;
}

.tooltip-text {
    visibility: hidden;
    width: 350px;
    background-color: #555;
    color: #fff;
    text-align: center;
    border-radius: 6px;
    padding: 5px;
    position: absolute;
    z-index: 1;
    bottom: 125%;
    left: 50%;
    margin-left: -100px;
    opacity: 0;
    transition: opacity 0.3s;
}

.tooltip:hover .tooltip-text {
    visibility: visible;
    opacity: 1;
}

/* Extended search box and search box features  */

#filterInput {
    width: 100%;
    max-width: 600px;
    padding: 10px;
    margin-bottom: 20px;
    font-size: 16px;
}

.loading-indicator {
    display: none;
    width: 30px;
    height: 30px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-left: 10px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.search-container {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}

     /* Mobile menu styles */
        .menu-toggle {
            display: none;
            background: none;
            border: none;
            color: white;
            font-size: 24px;
            cursor: pointer;
        }

        @media screen and (max-width: 768px) {
            .menu-toggle {
                display: block;
            }

            nav {
                display: none;
                flex-direction: column;
                align-items: flex-start;
                width: 100%;
            }

            nav.active {
                display: flex;
            }

            .dropdown {
                width: 100%;
            }

            .dropdown-content {
                position: static;
                min-width: 100%;
                display: none;
                flex-direction: column;
            }

            .dropdown.active .dropdown-content {
                display: flex;
            }

            .category-column {
                margin-right: 0;
                margin-bottom: 20px;
            }
        }


/* Comparison table CSS Styles */
.comparison-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 20px;
}

.comparison-table th, .comparison-table td {
  padding: 10px;
  text-align: left;
  border-bottom: 1px solid #ddd;
}

.comparison-table th {
  background-color: #f2f2f2;
}

.comparison-table tr:hover {
  background-color: #f5f5f5;
}
