:root {
  --bg-main: #1c1f3b;
  --bg-secondary: #282c4d;
  --surface: #3c3f68;
  --color-4: #4d4d80;
  --text-primary: #FFFFFF;
  --text-secondary: #9ea0b1;
  --text-dark: #7c7e8a;
  --main-purple: #561594;
  --accent-yellow: #FFCC00;
  --success: #25bb00;
  --error: #ef190e;

  --font-header: 'Montserrat', 'Roboto';
  --font-body: 'Inter', "Arial";
  --font-subtext: 'Oswald';
}

.material-symbols-outlined {
  font-variation-settings:
    'FILL' 0,    /* 0 = outline, 1 = filled */
    'wght' 300,  /* weight: 100–700 */
    'GRAD' 0,    /* grade: -50–200 */
    'opsz' 24;   /* optical size: 20–48 */
  font-size: 32px; /* controls size */
  color: var(--text-primary);     /* controls color */
  cursor: pointer;
  transform-origin: center;
}

body {
  background-color: var(--bg-main);
  color: var(--text-primary);
  margin: 0;
}

p {
  line-height: 1;
  margin: 0;
  padding: 0;
}

button {
  cursor: pointer;
}

h1 {
  margin: 0;
  padding: 0;
}

h2 {
  margin: 0;
  padding: 0;
}

.purple-border {
  border: 3px solid var(--main-purple);
}

.purple-shadow {
  box-shadow: 0 0px 10px var(--main-purple);
  border-radius: 0.5em;
}

.disabled {
  --disabled-color: #5c5c64;
  color: var(--disabled-color) !important;
  border-color: var(--disabled-color) !important;
  background-color: transparent !important;

  cursor: default !important;
}

#invitee-search,
#brother-search {
  box-sizing: border-box;
  width: 100%;
  height: 3.5rem;

  font-size: 20px;
  font-family: var(--font-body);
  font-weight: bolder;

  color: var(--text-primary);

  background-color: var(--bg-secondary);
  border: 4px solid var(--surface);
  border-radius: 10px;
  padding: .5em;
}

#invitee-search::placeholder,
#brother-search::placeholder {
  color: var(--text-secondary);
}

.error-border{
  border-color: var(--error) !important;
}

.submit-button, .cancel-button {
  border-radius: 10px;

  font-family: var(--font-header);
  font-weight: 500;
  font-size: 1.15em;

  display: flex;
  justify-content: center;
  align-items: center;

  text-align: center;

  padding: 0.25em 0.75em;
  height: 2.5em;

  transition: all .2s;
  cursor: pointer;
}

.submit-button {
  background-color: var(--success);
  color: var(--text-primary);
  border: 3px solid var(--success);
}

.cancel-button {
  background-color: transparent;
  border: 2px solid var(--text-dark);
  color: var(--text-dark);
}

.cancel-button:hover {
  transform:scale(1.02);
  background-color: var(--color-4);
}

.submit-button:hover {
  transform: scale(1.02);
  background-color: #3ba720;
}

.input-field {
  display: flex;
  flex-direction: column;
  gap: .25em;
  width: 100%;
}

.input-field label {
  color: var(--text-primary);
  font-family: var(--font-header);
  font-size: 16px;
  font-weight: 400;
  margin-left: .25em;
}

.input-field input {
  height: 2.25em;
  border: 3px solid var(--surface);
  background-color: transparent;
  border-radius: 10px;

  padding-left: .5em;

  font-size: 1.25em;
  font-family: var(--font-header);
  font-weight: 300;

  color: var(--text-primary);
}

.required-notif {
  margin-left: .25em;
  color: var(--error);
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 200;
}

.modal-header {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  
  padding: .25em .5em .5em .5em;
  border-bottom: 1px solid var(--color-4);

  font-family: var(--font-header);
}

.modal-header h2 {
  font-size: 23px;
  font-weight: 500;
}

.modal-close-button {
  font-size: 24px;
  color: var(--text-secondary);
  transition: color .2s;
}

.modal-footer {
  display: flex;
  flex-direction: row-reverse;
  justify-content: end;
  align-items: center;

  width: 100%;

  border-top: 1px solid var(--color-4);
  padding: .75em .5em .5em .5em;
  box-sizing: border-box;
  
  gap: .5em;
}

.modal-overlay {
  display: flex; /* always flex for centering */
  justify-content: center;
  align-items: center;
  
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0,0,0,0.5);
  
  opacity: 0;              /* start invisible */
  pointer-events: none;    /* prevent interaction when hidden */
  transition: opacity 0.3s ease; /* fade effect */
  z-index: 1000;
}

body.modal-open {
  overflow: hidden;  /* disables scrolling */
  overscroll-behavior: contain; /* prevents "rubber band" scrolling on touch devices */
}

.modal-overlay.show {
  opacity: 1;
  pointer-events: all;
}

#loading-pop-up {
  width: 60%;
  background-color: var(--bg-secondary);
  transition: opacity .2s;
  padding: 1em 1em;

  position: absolute;
  left: 50%;
  top: 50%;
  gap: 1em;

  pointer-events: none;

  transform: translate(-50%, -50%);
  z-index: 1000;
  transition: opacity .3s;

  display: flex;
  flex-flow: column;
  justify-content: space-evenly;
  align-items: center;

  text-align: center;

  border: 4px solid var(--surface);
  border-radius: 15px;
}

#loading-pop-up-text {
  font-size: 30px;
  font-family: var(--font-subtext);
  font-weight: 400;
  color: var(--text-secondary);
}

#progress-icon {
  animation: spin 1s linear infinite;
  color: var(--text-secondary);
}

#progress-icon, #load-success-icon, #load-fail-icon {
  font-size: 40px;
}

#load-success-icon {
  color: var(--success);
}

#load-fail-icon {
  color: var(--error);
}

@keyframes spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

.list-item-options-icon {
  color: var(--text-secondary);
}

.list-item-option-wrapper {
  position: relative;
  display: flex;
}

.list-item-option-menu {
  display: none;
  position: absolute; /* Ensures it floats */
  background-color: var(--surface);
  border-radius: 8px;
  list-style: none;
  text-decoration: none;
  padding: .5em 0;
  margin: 0;
  z-index: 10;

  top: 50%;   /* right below the parent */
  right: 100%;/* aligned to the right edge */

  transform: translate(-50%, -50%);

  box-shadow: 0 2px 10px rgba(0,0,0,0.2);

  font-family: var(--font-body);
  font-size: 17px;
  font-weight: 400;

  padding: .25em 1em;
  padding-right: 1.25em;
}

.list-item-option {
  cursor: pointer;
  padding: .25em 0;
  margin: .5em 0;
  color: var(--text-secondary);

  transition: color .2s;
}

.list-item-option:hover, .modal-close-button:hover {
  color: var(--text-dark);
}

.list-item-option-wrapper.show-list-item-options .list-item-option-menu {
  display: block;
}

.show-list-item-options {
  display: block;
}

.dropdown {
  background-color: var(--surface);
  border: 3px solid var(--color-4);
  border-radius: 10px;
  padding: 0.5em;
  font-family: var(--font-header);
  font-weight: 300;
  font-size: 1.25em;
  color: var(--text-primary);
  cursor: pointer;
  height: 2.5em;

  box-sizing: border-box;
}

.dropdown option {
  font-family: var(--font-header);
  font-weight: 300 !important;
  font-size: 1em;
  color: var(--text-primary);
}

#confirmation-modal {
  background-color: var(--bg-secondary);
  border-radius: 8px;
  padding: .5em;
  max-width: 85vw;
  min-width: 15rem;
  width: 25rem;
  box-shadow: 0 2px 10px rgba(0,0,0,0.3);

  transform: translateY(-20px);
  transition: transform 0.3s ease;

  z-index: 500;
}

#confirmation-modal-text {
  font-size: 1.5em;
  font-family: var(--font-body);
  font-weight: 500;
  color: var(--text-secondary);

  text-align: center;
  width: 100%;
  margin: 1em 0;
}

.destructive-button {
  background-color: var(--error) !important;
  color: var(--text-primary) !important;
  border-color: var(--error) !important;
}

.row-between {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.row-between .right-justify-col {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: flex-end;
  gap: 1em;
}

@media (min-width: 600px) {
  .row-between .right-justify-col {
    flex-direction: row;
    justify-content: flex-end;
    align-items: center;
    
  }
}