:root {
    /* Colors */
    --primary-color: #3e6330;
    --primary-color-highlight: #1F2C1A;
    --secondary-color: #f6f7f5; /* light gray */
    --secondary-color-highlight: #F2F2F2;
    --tertiary-color: #ffffff; /* white */
    --quarternary-color: #1f2c1a; /* dark gray */
    --secondary-color-transparent: #E8E8E8CC;
    --accent-border: #A1A7C7;

    --primary-gradient: linear-gradient(to right, var(--primary-color), var(--primary-color-highlight));

    /* Fonts */
    /*--font-primary: "Courier New", monospace;*/
    /*--font-secondary: "Open Sans", sans-serif;*/
    --font-primary: "Shadows Into Light Two", cursive;
    --font-secondary: "Cutive Mono", monospace;
    --font-tertiary: "Open Sans", sans-serif;

    --font-secondary-size: 1rem;
    --font-secondary-weight: 300;
    --font-secondary-spacing: 0.5px;

    /* Layout */
    --navbar-height: 50px;
    --horizontal-margin: 2rem;

    --table-width: 500px;

}

body {
    padding: 0px;
    margin: 0;
    background-color: var(--tertiary-color);
    font-family: var(--font-secondary);
}

.page-layout {
    display: grid;
    grid-template-columns: 1fr minmax(300px, 800px) 1fr;
    min-height: 95vh;
}

.page-layout::before,
.page-layout::after {
    content: "";
    background: var(--secondary-color); 
}

.center-column {
    padding-right: 2rem;
    padding-left: 2rem;
    padding-top: 2rem;
    padding-bottom: 2rem;
    min-height: 95vh;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.control-panel {
    background-color: var(--tertiary-color);
    width: var(--table-width);
    position: sticky;
    top: var(--navbar-height);
    padding-top: 15px;
    z-index: 9998;
}

/* ALERTS */

.alert-container {
    position: fixed;
    top: 100px;                 
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999;            
    width: 100%;
    display: flex;
    justify-content: center;
    pointer-events: none;
}
.alert {
    color: white;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 1rem;
    max-width: var(--table-width);
}
.alert {
    opacity: 0;
    transform: translateY(-10px);
    pointer-events: none;
    transition: opacity 0.4s ease, transform 0.4s ease;
}
/* When visible */
.alert.show {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}
/* Fade out class */
.alert.hide {
    opacity: 0;
    transform: translateY(-10px);
}
.alert-success {
    background-color: var(--primary-color-highlight);
    border: 1px solid white;
}
.alert-error {
    background-color: darkred;
}
#alert-type {
    font-size: 1.1rem;
    margin-bottom: 5px;
}
#alert-message {
    margin-top: 0;
}
#alert-close-img {
    height: 16px;
    width: 16px;
    margin-right: 15px;
}
#alert-type-img {
    height: 32px;
    width: 32px;
    margin-left: 15px;
}
#alert-close-img:hover {
    cursor: pointer;
}




/* BUTTONS (kept from your version) */
.button {
    padding: 5px 15px;
    border-radius: 15px;
    border: 2px solid transparent;
    font-family: var(--font-secondary);
    font-size: var(--font-secondary-size);
    font-weight: var(--font-secondary-weight);
    letter-spacing: var(--font-secondary-spacing);
    margin: 3px;
    transition: all 0.2s ease-in-out;
    cursor: pointer;
}

.primary-button {
    background-color: var(--primary-color);
    color: var(--tertiary-color);
    border-color: var(--primary-color);
}

.primary-button:hover {
    background-color: var(--primary-color-highlight);
    transform: translateY(-1px);
}

.secondary-button {
    background-color: var(--secondary-color-highlight);
    color: var(--quarternary-color);
    border-color:  var(--secondary-color-highlight);
}

.secondary-button:hover {
    background-color: var(--secondary-color-highlight);
    transform: translateY(-1px);
}

/* INPUTS & FORM ELEMENTS */
.select, .text-input {
    border-radius: 15px;
    box-sizing: border-box;
}

.select, .text-input {
    padding: 7px;
    text-align: left;
    font: var(--font-secondary);
    appearance: none;
    border: 2px solid var(--primary-color);
    outline: none;
}

.select:hover {
    cursor: pointer;
}

/* LINKS */
a {
    text-decoration: none;
}

/* LOADING OVERLAY */
.loading-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--secondary-color-transparent);
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.loading-spinner {
    margin-top: 10px;
    width: 100px;
    height: 100px;
    border: 10px solid var(--tertiary-color);
    border-top: 10px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* NAVIGATION BAR */
.navbar {
    z-index: 9999;
    position: sticky;
    top: 0;
    background-color: var(--primary-color);
    height: var(--navbar-height);
    display: flex;
    align-items: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.navbar-links {
    height: 100%; 
    list-style: none;
    display: flex;
    align-items: stretch;
    width: 100%;
    justify-content: space-between;
    margin: 0;
    padding: 0;
}

.navbar-links li {
    height: 100%;
    display: flex;
    align-items: center;
}

.navbar-links li a {
    height: 100%;
    color: var(--tertiary-color);
    font-family: var(--font-secondary);
    font-size: var(--font-secondary-size);
    font-weight: var(--font-secondary-weight);
    letter-spacing: var(--font-secondary-spacing);
    display: flex;
    align-items: center;
    transition: background-color 0.2s ease-in-out;
    padding: 0 1rem;
}

.navbar-links li a:hover {
    background-color: var(--primary-color-highlight);
}

/* Style for the logout button to match other nav items */
.navbar-links li.logout {
    margin-left: auto;
    display: flex; /* Ensure the logout item behaves like other nav items */
    align-items: center; /* Center the button vertically */
}

.navbar-links li.logout button {
    background-color: transparent; /* No background */
    border: none; /* Remove border */
    color: var(--tertiary-color); /* Match the text color */
    font-family: var(--font-secondary);
    font-size: var(--font-secondary-size);
    font-weight: var(--font-secondary-weight);
    letter-spacing: var(--font-secondary-spacing);
    padding: 0 1rem; /* Match the padding of the links */
    height: 100%; /* Match the height of the navbar */
    display: flex; /* Flex to center the button text vertically */
    align-items: center; /* Center text vertically */
    cursor: pointer; /* Change cursor to pointer */
    transition: background-color 0.2s ease-in-out;
}

.navbar-links li.logout button:hover {
    background-color: var(--primary-color-highlight); /* Hover effect to match links */
}

.nav-title {
    color: var(--tertiary-color);
    font-family: var(--font-primary);
    font-size: 24px;
    margin: 0 25px 0 10px;
}

.icon-tree {
    height: 3rem;
    width: auto;
    margin-left: 10px;
}

h1 {
    color: var(--font-primary);
    font-family: var(--font-primary);
}
table {
    width: var(--table-width);
    border-collapse: collapse;
    border-spacing: 0;
}

.gift-row, .header-row {
    height: auto;
}

.header-row {
    color: var(--tertiary-color);
    background: var(--primary-gradient);
}

.checkbox-column {
    width: 20px;
    text-align: center;
    white-space: nowrap;
}

td, th {
    padding: 15px 15px;
    word-wrap: break-word;
    overflow-wrap: break-word;
    word-break: break-all;
}

td {
    font-family: var(--font-tertiary);
    white-space: pre-wrap;
}

tr {
    border: 2px solid var(--primary-color);
}

tr:hover {
    cursor: pointer;
    background-color: var(--secondary-color-highlight);
}

.img-button {
    background: none;
    border: none;
    padding: 0;
    margin: 0;
}

.img-button img {
    height: 1.8rem;
    width: auto;
    margin-left: 5px;
}

#add-item-button-img {
    height: 2rem;
}

.img-button img:hover {
    cursor: pointer;
}

#gift-form {
    margin-top: 25px;
    display: flex;
    width: var(--table-width);
    align-items: center;
}

#new-gift-name {
    width: 100%;
}

#action-menu {
    width: var(--table-width);
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
}

.sub-menu-action-bar-left {
    display: flex;
    align-items: center;
}

.sub-menu-action-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.details-row {
    background-color: var(--secondary-color);
}

h4 {
    font-size: 0.9rem;
    color: var(--tertiary-color);
    background: var(--primary-gradient);
    margin: 0;
    padding: 10px 10px;
    border-radius: 15px;
}


/* LOGIN PAGE */
#login-content-container {
    position: relative; /* needed for absolute positioning of the image */
    height: 100vh;
    width: 100%;
    background-color: black;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: white;
    overflow: hidden; /* ensures image doesn't spill */
}

#login-content-container img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover; /* cover div without stretching */
    opacity: 0.5; /* 60% opacity */
    z-index: 2; /* behind the text and form */
}

#login-form {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    z-index: 10; /* make sure form is above image */
    position: relative;
}

#login-form input, #login-form button {
    width: 300px;
}

#login-h1 {
    font-size: 4rem;
    margin: 0;
    z-index: 10; /* ensure heading is above image */
    position: relative;
}

#login-h3 {
    font-size: 1.5rem;
    z-index: 10;
    position: relative;
}

.select-label-container {
    width: var(--table-width);
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 10px;
}

#unsaved-directions {
    display: none;
    margin-left: auto;
    text-align: right; 
}

.unsaved-row {
    background-color: #ffcccc !important;
}


/* Hide the native checkbox */
input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    border: 2px solid var(--primary-color);
    border-radius: 5px; /* slight roundness */
    display: inline-block;
    position: relative;
    cursor: pointer;
    background: var(--tertiary-color);
    transition: all 0.2s ease;
    vertical-align: middle;
    margin-right: 6px;
}

/* Hover effect */
input[type="checkbox"]:hover {
    box-shadow: 0 0 4px var(--primary-color);
    background: var(--secondary-color-highlight);
}

/* Checked state */
input[type="checkbox"]:checked {
    background: var(--primary-gradient);
    border-color: var(--primary-color-highlight);
}

/* The checkmark */
input[type="checkbox"]:checked::after {
    content: "✓";
    font-size: 14px;
    font-weight: bold;
    color: white;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -59%);
}

input[type="checkbox"].unsaved-checkbox {
    border-color: darkred !important;
    background: #8b0000 !important; /* darkred fill */
}

input[type="checkbox"].unsaved-checkbox:hover {
    box-shadow: 0 0 4px darkred !important;
    background: #a30000 !important;
}


.settings-content {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    width: var(--table-width);
}

#notifications-form, #password-form {
    display: flex;
    flex-direction: column;
    width: var(--table-width);
    gap: 0.5rem;
}

#email-submit {
    display: inline-block;
    width: auto;
    align-self: flex;
}

.notifications-checkboxes {
    display: flex;
    flex-direction: column;
}

.form-button {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: var(--table-width);
}

#password-submit, #email-submit {
    width: 250px;
}

.card {
  width: var(--table-width);
  height: 50px;
  cursor: pointer;
  perspective: 1000px;
}

.card-inner {
  width: 100%;
  height: 100%;
  position: relative;
  transition: transform 0.8s;
  transform-style: preserve-3d;
}

.card.revealed .card-inner {
  transform: rotateY(180deg);
}

.card-front, .card-back {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
  border: 2px solid var(--primary-color);;
  border-radius: 15px;
  background: white;
}

.card-back {
  transform: rotateY(180deg);
  background: var(--tertiary-color);
  color: var(--primary-color);
  font-weight: bold;
}

@media only screen and (max-width: 768px) {
    :root {
        --table-width: 350px;
        --font-secondary-size: 0.9rem;
    }

    .nav-title {
        display: none;
    }

    .navbar-links {
        justify-content: center;
    }

    #login-h1 {
        font-size: 3rem;
    }
    
    #login-h3 {
        font-size: 1.2rem;
    }

    .center-column {
        padding-top: 0;
    }
    
}

.snowflake {
    color: #fff;
    font-size: 1.5em;
    font-family: Arial;
    text-shadow: 0 0 1px #000;
  }
  
  @-webkit-keyframes snowflakes-fall{0%{top:-10%}100%{top:100%}}@-webkit-keyframes snowflakes-shake{0%{-webkit-transform:translateX(0px);transform:translateX(0px)}50%{-webkit-transform:translateX(80px);transform:translateX(80px)}100%{-webkit-transform:translateX(0px);transform:translateX(0px)}}@keyframes snowflakes-fall{0%{top:-10%}100%{top:100%}}@keyframes snowflakes-shake{0%{transform:translateX(0px)}50%{transform:translateX(80px)}100%{transform:translateX(0px)}}.snowflake{position:fixed;top:-10%;z-index:9999;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:default;-webkit-animation-name:snowflakes-fall,snowflakes-shake;-webkit-animation-duration:10s,3s;-webkit-animation-timing-function:linear,ease-in-out;-webkit-animation-iteration-count:infinite,infinite;-webkit-animation-play-state:running,running;animation-name:snowflakes-fall,snowflakes-shake;animation-duration:10s,3s;animation-timing-function:linear,ease-in-out;animation-iteration-count:infinite,infinite;animation-play-state:running,running}.snowflake:nth-of-type(0){left:1%;-webkit-animation-delay:0s,0s;animation-delay:0s,0s}.snowflake:nth-of-type(1){left:10%;-webkit-animation-delay:1s,1s;animation-delay:1s,1s}.snowflake:nth-of-type(2){left:20%;-webkit-animation-delay:6s,.5s;animation-delay:6s,.5s}.snowflake:nth-of-type(3){left:30%;-webkit-animation-delay:4s,2s;animation-delay:4s,2s}.snowflake:nth-of-type(4){left:40%;-webkit-animation-delay:2s,2s;animation-delay:2s,2s}.snowflake:nth-of-type(5){left:50%;-webkit-animation-delay:8s,3s;animation-delay:8s,3s}.snowflake:nth-of-type(6){left:60%;-webkit-animation-delay:6s,2s;animation-delay:6s,2s}.snowflake:nth-of-type(7){left:70%;-webkit-animation-delay:2.5s,1s;animation-delay:2.5s,1s}.snowflake:nth-of-type(8){left:80%;-webkit-animation-delay:1s,0s;animation-delay:1s,0s}.snowflake:nth-of-type(9){left:90%;-webkit-animation-delay:3s,1.5s;animation-delay:3s,1.5s}

