/* all pages/header page/ browse section */
#movie-page-header {
    position: fixed;
    top: 0;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px;
    background-color: lightblue;
    gap: 10px;
    z-index: 1000; /* keeps it above other stuff */
}

#site-name {
    color: white;
    background-color: #08F;
    padding: 10px;  /* top, right, bottom, left for bg */
    font-family: Impact, fantasy;
    display: inline-block;
    font-size: 30px;
    border-radius: 20px;
    margin: 0;
}

#site-name a {
    color: white;
}

#search-form {
    display: flex;
    position: relative;
    gap: 5px;
    align-items: center;
}

#search-input {
    padding: 5px;
    font-size: 16px;
}

.autocomplete-suggestions {
    margin-top: 7px;
    margin-left: -3px;
    border: 1px solid #ccc;
    background: white;
    cursor: pointer;
    overflow: auto;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    min-width: 218px;
    max-height: 150px;
    z-index: 1000;
}

.autocomplete-suggestion {
    padding: 12px 16px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    border-bottom: 1px solid #eee;
    font-size: 14px;
    color: #333;
    transition: background-color 0.2s;
}

.autocomplete-suggestion:hover {
    background-color: #007bff;
    color: white;
}

.autocomplete-selected {
    background-color: #007bff;
    color: white;
}

#search-options {
    /*position: absolute;*/
    top: 100%; /* directly below the button */
    width: 160px;
    background: white;
    border: 1px solid #ccc;
    padding: 10px 5px 5px;
    z-index: 100;
    margin-right: 400px;
}

#button-icon {
    width: 30px;
}

.hidden {
    display: none;
}

#search-title, #search-director, #search-star {
    width: 135px;
    margin: 5px;
}
#search-year {
    width: 50px;
    margin: 5px 90px 5px 5px;
}

.visible {
    display: block;
    position: absolute; /* so it floats below the username */
    border: 1px solid #ccc;
    padding: 5px;
    z-index: 1000;
}

#user-dropdown {
    position: absolute;
    top: 10px;
    right: 20px;
    cursor: pointer;
}

#dropdown-menu {
    position: absolute;
    right: 0;
    background-color: white;
    border: 1px solid #ccc;
    padding: 5px;
}

#logout-button {
    background: white;   /* remove button background */
    border: none;       /* remove border */
    padding: 0;         /* remove padding */
    margin: 0;
    cursor: pointer;    /* keep cursor pointer */
    font-size: 14px;    /* optional: adjust size */
}
#logout-btn:hover {
    text-decoration: underline;
}

#cart-icon {
    width: 30px;
    margin-right: 7px;
}

#cart-link {
    position: relative;
    display: inline-block;
}

#cart-count {
    position: absolute;
    top: -6px;
    right: -4px;
    background: red;
    color: white;
    border-radius: 50%;
    padding: 0 4px;
    font-size: 12px;
}

#browse-placeholder {
    background-color: #2a2a2a; /* lighter than pure black */
    color: white;
    padding: 20px;
    border-top: 1px solid #444;
}

.genre-section { text-align: center; }

.genre-list {
    list-style: disc inside;   /* bullets inside list */
    column-count: 3;
    column-gap: 3.5rem;
}

.genre-list li {
    margin: 0.25rem 0;
    break-inside: avoid;
}

@media (max-width: 900px){ .genre-list{ column-count: 2; } }
@media (max-width: 600px){ .genre-list{ column-count: 1; } }

.header-row { display: flex; gap: 1rem; align-items: center; justify-content: space-between; }
.alpha-list{
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    gap: .65rem 1rem;
    justify-content: center;
}
.alpha-list a{
    text-decoration: none;
    font-weight: 600;
}

.cart-message {
    color: green;
    font-size: 0.9em;
    display: none;
    margin-top: 4px;
    text-align: center;
}

/* main page */

#welcome-main {
    margin-top:90px;
    font-size: 20px;
    text-align: center;
}

.main-title {
    font-size: 30px;
    margin: 10px 0 5px 50px;
}

.top-movies-container-main-page {
    display: flex;
    justify-content: center;
    gap: 150px;
    margin-top: 50px;
}

.movie-card {
    text-align: center;
}

.movie-card img {
    width: 200px;
    height: 300px;
    border-radius: 10px;
}

.more-link {
    text-align: center;
    margin-top: 20px;
}

.more-link a {
    font-size: 18px;
    color: #08F;
    font-weight: bold;
}

/* movie page */

#add-to-cart {
    font-size: 15px;
    padding: 0.25rem 0.5rem;
    background-color: #28a745;
    color: white;
    border-radius: 0.25rem;
    margin: 1rem auto 0;
    width: 120px;
}

/* movies list page */

.container {
    padding: 15px 30px;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
    margin-top: 95px;
    margin-bottom: 20px;
}

.h3-container {
    padding: 15px 0 10px 0;  /* top, right, bottom, left for bg */
    display: flex;
    align-items: center;
    gap: 10px;
    position: relative;
}

#h3-title {
    width: 230px;
}

.page-size-container {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
}

.sort-container {
    display: flex;
    align-items: center;
    margin-top: 5px;
    gap: 30px;
    margin-left: 370px;
}

.sort-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
    align-items: center;
}

.sort-label {
    font-weight: bold;
    font-size: 15px;
    width: 80px;
    text-align: center;
}

.sort-option {
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 15px;
}

.sort-option:hover {
    background-color: #ddd;
}

.sort-option.selected {
    background-color: #555;
    color: white;
}

#movieStars a, #movie-table-body a, #movies a {
    color: black;
    text-decoration: underline;
}

.ratings-col {
    width: 80px;
}

.pagination {
    display: flex;
    justify-content: center;
    text-align: center;
    margin-top: 20px;
    margin-bottom: 20px;
}

.pagination button,
.pagination select {
    margin: 0 3px;
    padding: 5px 10px;
    border: 1px solid #ccc;
    background: white;
    cursor: pointer;
    border-radius: 4px;
}

.pagination button:hover {
    background: #eee;
}

.pagination .active {
    background: #08F;
    color: white;
    border-color: #08F;
}

html, body {
    height: 100%;
    margin: 0;
}

body {
    display: flex;
    flex-direction: column;
}

#browse-placeholder {
    margin-top: auto;
}

.main-content {
    flex: 1;  /* takes up all remaining space */
    display: flex;
    flex-direction: column;
}

#page-numbers {
    padding: 0 30px;
    text-align: center;
    margin-top: 5px;
}

/* single movie */

.site-header {
    display: flex;  /* direction is row by default */
    align-items: center;  /* centers items vertically (perpendicular to flex direction) */
    justify-content: center;  /* centers items horizontally (with flex direction) */
    position: relative;  /* sets this as reference point for absolute elements */
    background-color: lightblue;
}

#single-site-name {
    color: white;
    background-color: #08F;
    padding: 10px;  /* top, right, bottom, left for bg */
    font-family: Impact, fantasy;
    display: inline-block;
    font-size: 30px;
    border-radius: 20px;
    margin-top: 10px;
    margin-right: 600px;
}


.arrow {
    position: absolute;  /* positions element relative to siteHeader */
    left: 10px;
    color: black;
    font-weight: bold;
}

.back-link {
    position: absolute;
    left: 30px;
    color: black;
    font-weight: bold;
    text-decoration: underline;
}

.movie-container {
    margin-top: 95px;
    padding-left: 30px;
    padding-right: 30px;
    padding-bottom: 250px;
}

.card {
    width: 1000px;
    background-color: #f9f9f9;
    border: 1px solid #ccc;
    border-radius: 10px;
    padding: 0 20px 5px 20px;
    margin: 10px auto 0 auto;
    box-shadow: 2px 2px 8px rgba(0,0,0,0.1); /* subtle shadow */
}

#name {
    padding-top: 10px;
    margin-bottom: 0;
}

#star-name {
    padding-top: 10px;
    margin-bottom: 15px;
}

#movieStars a:hover, #movie-table-body a:hover, #movies a:hover {
    color: royalblue;
}

/* login page */

.card {
    width: 400px;
    padding: 24px;
}

.login-card-box {
    padding-top: 100px;
}

.login-title {
    text-align: center;
}

#login-header, body {
    background-color: #f0f2f5;
}

#error-msg {
    color: red;
}

/* cart page */

.shop-quantity-input {
    width: 100px;
}

#shop-actions, #shop-quantity {
    padding-left: 20px;
}

#shop-movie-title {
    padding-left: 14px;
}


#shop-proceed {
    margin-left: 930px;
    margin-top: 10px;
}

.custom-btn {
    display: inline-block;
    width: 100%;
    padding: 0.375rem 0.75rem;  /* similar to Bootstrap btn padding */
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.5;
    color: #fff;
    margin-top: 14px;
    background-color: #007bff; /* Bootstrap primary color */
    border: 1px solid #007bff;
    border-radius: 0.25rem;
    text-align: center;
    cursor: pointer;
    transition: background-color 0.15s ease-in-out, border-color 0.15s ease-in-out;
}

.custom-btn:hover {
    background-color: #0069d9;
    border-color: #0062cc;
}

/* payment page */
#error-message {
    display: none;
}

#expiration {
    max-width: 120px;
}

/* employee page */

#employeeHeader-placeholder {
    margin-bottom: -50px;
}

#employee-header {
    background-color: #212529; /* dark background */
    color: white;              /* white text */
    padding: 1rem;             /* spacing inside */
    margin-bottom: 1.5rem;     /* space below header */
    text-align: center;        /* center text */
    font-size: 1.2rem;
    font-weight: 500;
}

.employee-add-section {
    display: flex;
    margin-bottom: 40px;
    margin-top: 30px;
}

.employee-add-section .card {
    flex: 0 0 45%; /* each takes up about half the width */
}

.add-title {
    font-weight: 300;
    font-size: 25px;
    text-align: center;
}

.metadata-card {
    margin-bottom: 30px;
}

/* Grid layout for employee dashboard database metadata */
.meta-grid{
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
    align-items: start;
}

/* Make cards fit their grid cell */
.meta-grid .card{
    display: block;
    margin: 0 !important;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
    position: static;
}

.metadata-card { max-width: none; }

#metadata-table { width: 100%; }