/*-------------------------------------------------------------
/* File: style.css
/* Description: CSS styling
/*-------------------------------------------------------------
/* Author: Alyssa Cabana
/*-------------------------------------------------------------*/

/*--------------------------------------
/* General styling
/*--------------------------------------*/
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100%;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Segoe UI', sans-serif;
    line-height: 1.6;
    overflow-y: auto;
}

main {
    flex: 1 0 auto;
}

/*--------------------------------------
/* Nav
/*--------------------------------------*/
header nav,
footer nav {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1rem;
}

nav a {
    margin: 0 10px;
    font-weight: bold;
    text-decoration: none;
    transition: background-color 0.3s ease;
    display: inline-block;
}

nav a:hover {
    border-radius: 4px;
}
/*--------------------------------------
/* Headings
/*--------------------------------------*/
.admin-panel h1,
.admin-panel h2 {
    text-align: center;
}

.checkout h1 {
    text-align: center; 
    margin-top: 2rem;
}
/*--------------------------------------
/* Centering
/*--------------------------------------*/
.submit {
    text-align: center; 
}

.cart-table-container h2,
.checkout-table-container {
    text-align: center;
    margin-bottom: 1.5rem;
}
/*--------------------------------------
/* Containers
/*--------------------------------------*/
.page-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/*--------------------------------------
/* Hero Section
/*--------------------------------------*/
.hero {
    text-align: center;
    padding-top: 1rem;
}

.hero-text img {
    width: 200px;
    height: auto;
    display: block;
    margin-left: auto;
    margin-right: auto;
}

/*--------------------------------------
/* Sections
/*--------------------------------------*/
section {
    padding: 2rem;
    text-align: center;
}

/*--------------------------------------
/* Highlights Section
/*--------------------------------------*/
.highlights h2 {
    margin-bottom: 1.5rem;
}

.highlight-video {
    width: 80%;
    max-width: 600px;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    display: block;
    margin: 0 auto;
}

/*--------------------------------------
/* Grids, Cards, and Details
/*--------------------------------------*/
.pizza-grid,
.deal-grid,
.deal-menu-grid,
.pizza-menu-grid,
.side-menu-grid,
.drink-menu-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 2rem;
    margin-top: 1rem;
}

.pizza-details,
.side-details,
.drink-details,
.deal-details {
    display: none;
}

.login-card, 
.dashboard-card {
    margin: 2rem auto;
}

.login-card h2 {
    margin-bottom: 1rem;
}

.theme-card-form {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 2rem; /* adds both row and column spacing */
    margin-top: 1rem;
}

.about-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    background-color: white;
    border-radius: 8px;
    width: 500px;
    padding: 1rem;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.25);
    text-decoration: none;
    color: inherit;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.dashboard-card,
.theme-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    background-color: white;
    border-radius: 8px;
    width: 300px;
    padding: 1rem;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.25);
    text-decoration: none;
    color: inherit;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.dashboard-card:hover,
.theme-card:hover,
.theme-submit:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.dashboard-card img,
.theme-card img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    border-radius: 6px;
    margin-bottom: 1rem;
}

.pizza-card,
.deal-card,
.login-card,
.menu-card {
    border-radius: 8px;
    width: 300px;
    padding: 1rem;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.25);
}

.pizza-card img,
.deal-card img,
.menu-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 6px;
    margin-bottom: 1rem;
}

.deal-details,
.pizza-details,
.side-details,
.drink-details {
    width: 100%;
    margin-top: -1rem;
    margin-bottom: 2rem;
    padding: 1rem;
    background-color: #f8f8f8;
    border: 1px solid #ccc;
    border-top: none;
    border-radius: 0 0 8px 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}
/*--------------------------------------
/* Dashboard, theme, and about styling
/*--------------------------------------*/
.dashboard, 
.theme,
.about {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
    margin-top: 2rem;
}

.theme-submit {
    flex-basis: 100%;
    text-align: center;
    margin-top: 1rem;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    background-color: grey;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}
.dashboard h2, 
.theme h2 {
    margin-bottom: 1rem;
}

/*--------------------------------------
/* Menu Items
/*--------------------------------------*/
.menu-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 300px;
}

/*--------------------------------------
/* Cart and checkout
/*--------------------------------------*/
.cart-table-container {
    max-width: 900px;
    margin: 2rem auto;
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.25);
    overflow-x: auto;
}

.cart-table {
    width: 100%;
    border-collapse: collapse;
}

.cart-table th,
.cart-table td {
    padding: 1rem;
    text-align: center;
    border-bottom: 1px solid #ddd;
}

.cart-table th {
    background-color: #f8f8f8;
    font-weight: bold;
}

.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

.pad-2rem {
    padding: 2rem;
}

.flex-row {
    display: flex;
    gap: 1rem;
}

.flex-child {
    flex: 1;
}

.checkout-table-container {
    max-width: 500px;  
    margin: 2rem auto;
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.25);
    overflow-x: auto;
}

/*--------------------------------------
/* Buttons
/*--------------------------------------*/
.button.full-width {
    width: 100%;
    padding: 0.75rem;
    font-size: 1rem;
}

/*--------------------------------------
/* Menu notifications
/*--------------------------------------*/
.menu-notification {
    background-color: lightgrey;
    border: 1px solid grey;
    color: #2e7d32;
    padding: 10px 20px;
    margin: 1rem auto;
    text-align: center;
    max-width: 800px;
    border-radius: 6px;
    font-weight: 500;
}

/*--------------------------------------
/* Call to action section
/*--------------------------------------*/
.call-to-action {
    padding: 2rem;
}

/*--------------------------------------
/* footer
/*--------------------------------------*/
footer {
    text-align: center;
    padding: 1rem;
    background-color: #2e7d32;
    color: white;
    margin-top: 0;
}

/*--------------------------------------
/* Contact popup
/*--------------------------------------*/
.popup {
  display: none;
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background-color: rgba(0,0,0,0.7); 
  z-index: 1000;
  backdrop-filter: blur(3px); 
}

.popup-content {
  background-color: #1c1c1c; 
  color: #FFF; 
  margin: 10% auto;
  padding: 20px;
  border-radius: 8px;
  width: 90%;
  max-width: 400px;
  position: relative;
  box-shadow: 0 4px 10px #000;
}

.popup-content h2 {
  margin-top: 0;
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  font-size: 24px;
  color: white; 
}

.popup-content .close {
  position: absolute;
  top: 10px; right: 15px;
  font-size: 24px;
  color: #A9A9A9; 
  cursor: pointer;
  transition: color 0.3s ease;
}

.popup-content .close:hover {
  color: #FFF; 
}

.popup-content input, .popup-content textarea {
  width: 100%;
  margin: 10px 0;
  padding: 12px;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-family: 'Open Sans', sans-serif;
  font-size: 16px;
  background-color: #333;
  color: #FFF;
}

.popup-content input:focus, .popup-content textarea:focus {
  outline: none;
  border-color: white; 
}

.popup-content button[type="submit"] {
  background-color: grey; 
  color: white;
  border: none;
  padding: 12px 18px;
  border-radius: 6px;
  font-size: 16px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.popup-content button[type="submit"]:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(255, 255, 255, 0.3);
}

/*--------------------------------------
/* Help link containers/buttons
/*--------------------------------------*/
.help-link-container {
    text-align: right;
    margin-top: 1rem;
    margin-right: 1rem;
}

.help-button {
    display: inline-block;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background-color: var(--primary-color, #007BFF);
    color: #fff;
    text-align: center;
    line-height: 32px;
    font-size: 18px;
    font-weight: bold;
    text-decoration: none;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    transition: background-color 0.3s ease;
}

.help-button:hover {
    background-color: var(--primary-hover-color, #0056b3);
}

/*--------------------------------------
/* Mobile responsiveness
/*--------------------------------------*/

@media (max-width: 768px) {
    .pizza-grid,
    .deal-grid,
    .deal-menu-grid,
    .pizza-menu-grid,
    .side-menu-grid,
    .drink-menu-grid {
        flex-direction: column;
        align-items: center;
    }

    nav a {
        display: block;
        margin: 0.5rem 0;
    }
}
@media (max-width: 600px) {
    .about-card {
        width: 300px;
    }
}
@media (max-width: 768px) {
  .cart-table-container,
  .checkout-table-container {
    overflow-x: auto;
    padding: 1rem;
  }

  .cart-table,
  .checkout-table,
  .admin-panel .cart-table {
    min-width: 700px; 
  }

  .cart-table th,
  .cart-table td,
  .checkout-table th,
  .checkout-table td,
  .admin-panel .cart-table th,
  .admin-panel .cart-table td {
    font-size: 0.85rem;
    padding: 0.5rem;
  }

  .cart-table-container h2,
  .checkout-table-container h2,
  .admin-panel h1 {
    font-size: 1.2rem;
  }
}