.centered-field-container {
  display: flex;
  justify-content: center;
}

.big-input-field {
  font-size: 1.5rem;
  /* border: none; */
  color: #797979;
  border: 1px solid #797979;
  /* background-color: #797979; */
  padding: .8rem 0rem;
  width: 100%;
  text-align: center;
}

@media only screen and (min-width: 1200px) {
  .big-input-field {
    width: 600px;
  }
}

.big-button {
  font-size: 1.5rem;
  padding: .8rem 2.4rem;
  text-align: center;
  margin-top: .4rem;
  margin-bottom: 2rem;
  width: 600px;
}

.ghost-button {
  background-color: #fafafa;
  padding: .4rem 4rem;
  border-radius: .2rem;

  border: 2px solid var(--primary-color);
  font-family: Roboto;
  font-size: 1rem;
  color: var(--grey-2);

  &:hover {
    background-color: var(--primary-color);
    cursor: pointer;
    color: #ffffff;
  }
}

.primary-shaded {
  background-color: var(--primary-color);
  color: #efefef;
  border: #797979;

  &:hover {
    background-color: #c21057e2;
    cursor: pointer;
  }
}

.qube-button {
  background-color: var(--primary-color);
  display: flex;
  align-items: center;
  gap: .5rem;
  color: white;
  font-size: 1rem;
  padding: .5rem 1rem;
  border-radius: 2px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, .6);
  /* &:hover{
   background-color: scale-color($primary-color, $lightness: 10%); 
  }  */
}

.inline-button {
  display: inline;
  color: var(--primary-color);
  background: linear-gradient(to right, var(--primary-color), var(--primary-color)) no-repeat right;
  background-size: 0% auto;

  transition: background-size 0.3s, background-position 0s;

  &:hover {
    background-size: 100% auto;
    background-position: left;
    color: #efefef;
  }

  /* &:hover{
    background-color: #797979;
  } */
}

.inline-button-padding {
  padding: .2rem .4rem;
}

.text-field {
  font-family: -apple-system, system-ui, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 1.1rem;
  font-weight: 500;
  width: 100%;
  padding: .5rem;
  margin-bottom: 1rem;
  outline: none;
  border: 1px solid #a4a4a4;
}

.title-field {
  font-family: -apple-system, system-ui, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 1.1rem;
  font-weight: 500;
  width: 100%;
  padding: .5rem;
  margin-bottom: 1rem;
  border: none;
  outline: none;
  border-bottom: 1px solid #a4a4a4;
}

.textarea-field {
  font-family: -apple-system, system-ui, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 1.1rem;
  font-weight: 500;
  width: 100%;
  padding: .2rem;
  margin-bottom: 1rem;
  border: 1px solid #a4a4a4;
}

.large-textarea-field-with-border {
  font-family: -apple-system, system-ui, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 1.1rem;
  font-weight: 400;
  width: 100%;
  min-height: 400px;
  padding: .5rem;
  margin-bottom: 1rem;
  border: 1px solid #a4a4a4;
  outline: none;
}


.large-textarea-field {
  font-family: -apple-system, system-ui, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 1.1rem;
  font-weight: 400;
  width: 100%;
  min-height: 400px;
  padding: .5rem;
  margin-bottom: 1rem;
  border: none;
  outline: none;
}

.small-textarea-field-with-border {
  font-family: -apple-system, system-ui, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 1.1rem;
  font-weight: 400;
  width: 100%;
  min-height: 200px;
  padding: .5rem;
  margin-bottom: 1rem;
  border: 1px solid #a4a4a4;
  outline: none;
}

.small-textarea-field {
  font-family: -apple-system, system-ui, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 1.1rem;
  font-weight: 400;
  width: 100%;
  min-height: 200px;
  padding: .5rem;
  margin-bottom: 1rem;
  border: none;
  outline: none;
}

.writing-area {
  width: 100%;
  background-color: #ffffff;
  padding: 1rem .5rem .5rem .5rem;
}

.status-bar {
  padding: .2rem .4rem;
  background-color: #cfcfcf;
}

.create-button {
  background-color: #f2f2f2;
  padding: .2rem 1rem;
  border-radius: .1rem;
  border: 1px solid #d0d0d0;
  font-family: Roboto;
  font-size: 1rem;
  color: var(--grey-2);

  &:hover {
    background-color: #e4e4e4;
  }

}

.background-grey {
  background-color: #7e7e7e;
}

.background-blue {
  background-color: #2196F3;
  /* Example Material Blue */
}

.background-red {
  background-color: #f44336;
  /* Example Material Red */
}

.background-teal {
  background-color: #009688;
  /* Example Material Teal */
}

.background-black {
  background-color: #000000;
}

.background-light-grey {
  background-color: #f5f5f5;
}



.width-10 {
  width: 10rem;
  text-align: center;
}

.rounded-corners {
  border-radius: 5rem;
}

.material-button {
  /* Positioning and Layout */
  position: relative;
  /* Required for the ripple effect */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  overflow: hidden;
  /* Clips the ripple effect to the button's bounds */

  /* Box Model */
  padding: 10px 24px;
  border: none;
  border-radius: 4px;

  /* Typography */
  color: #ffffff;
  font-size: 12px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 1.25px;

  /* Style and Interaction */
  cursor: pointer;
  outline: none;

  /* Shadow for elevation effect */
  box-shadow: 0 2px 2px 0 rgba(0, 0, 0, 0.14),
    0 3px 1px -2px rgba(0, 0, 0, 0.12),
    0 1px 5px 0 rgba(0, 0, 0, 0.2);

  /* Smooth transition for hover effects */
  transition: box-shadow 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* On hover, increase the elevation */
.material-button:hover {
  box-shadow: 0 4px 5px 0 rgba(0, 0, 0, 0.14),
    0 1px 10px 0 rgba(0, 0, 0, 0.12),
    0 2px 4px -1px rgba(0, 0, 0, 0.2);
}

/* The element that creates the ripple */
.material-button::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 5px;
  height: 5px;
  background: rgba(255, 255, 255, 0.5);
  border-radius: 50%;
  transform: translate(-50%, -50%) scale(1);
  opacity: 0;
  transition: transform 0.5s, opacity 1s;
}

/* The active state triggers the ripple animation */
.material-button:active::after {
  transform: translate(-50%, -50%) scale(100);
  opacity: 1;
  transition: transform 0s, opacity 0s;
  /* Reset instantly for next click */
}

/* Ensure the button text appears above the ripple effect */
.material-button span {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
}

.material-button .material-symbols-outlined,
.material-button .material-icons {
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* Container for the text box */
.material-textbox {
  position: relative;
  margin-top: 30px;
  margin-bottom: 30px;
}

/* Common styles for both input and textarea */
.material-textbox input,
.material-textbox textarea {
  width: 100%;
  padding: 10px 0 5px 0;
  font-size: 1.2rem;
  font-family: inherit;
  color: #333;
  border: none;
  border-bottom: 1px solid #9e9e9e;
  outline: none;
  background-color: transparent;
  /* Add this to ensure label isn't hidden */
  position: relative;
  /* Ensure input is on top of the label initially */
  z-index: 1;
}

.material-textbox textarea {
  resize: vertical;
  min-height: 50px;
  field-sizing: content;
}

.material-textbox label {
  position: absolute;
  top: 10px;
  left: 0;
  font-size: 16px;
  color: #9e9e9e;
  pointer-events: none;
  transition: all 0.2s ease-out;
  z-index: 0;
  /* Position label behind the input text */
}

.material-textbox .focus-line {
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 2px;
  background-color: #2196F3;
  transition: all 0.2s ease-out;
  z-index: 2;
}

/* === Animation States (The Fix is Here) === */

/* When the input is in focus OR is not showing the placeholder, move the label up */
.material-textbox input:focus~label,
.material-textbox input:not(:placeholder-shown)~label,
.material-textbox textarea:focus~label,
.material-textbox textarea:not(:placeholder-shown)~label {
  top: -20px;
  font-size: 1rem;
  color: #2196F3;
}

/* When the input/textarea is in focus, expand the focus line */
.material-textbox input:focus~.focus-line,
.material-textbox textarea:focus~.focus-line {
  width: 100%;
  left: 0;
}

/* Readonly state for material textbox */
.material-textbox input[readonly] {
  color: #797979;
  cursor: not-allowed;
  border-bottom: 1px dashed #9e9e9e;
}

.material-textbox input[readonly]:focus~label {
  color: #9e9e9e;
}

.material-textbox input[readonly]:focus~.focus-line {
  width: 0;
  left: 50%;
}

.position-relative {
  position: relative;
}

.absolute-top-right {
  position: absolute;
  top: .5rem;
  right: .5rem;
}

.absolute-bottom-right {
  position: absolute;
  bottom: .5rem;
  right: .5rem;
}

/* -- The main container for the checkbox -- */
.material-checkbox {
  display: inline-flex;
  align-items: center;
  cursor: pointer;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen,
    Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;
  font-size: 16px;
  color: #333;
  /* Prevents text selection on repeated clicks */
  user-select: none;
}

/* -- Hide the default browser checkbox -- */
.material-checkbox input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

/* -- The custom checkbox box -- */
.checkmark {
  position: relative;
  display: inline-block;
  width: 20px;
  height: 20px;
  margin-right: 12px;
  border: 2px solid #6c757d;
  /* Grey border for unchecked state */
  border-radius: 4px;
  transition: all 0.2s cubic-bezier(0.23, 1, 0.32, 1);
}

/* -- Style the checkmark when the input is checked -- */
.material-checkbox input:checked~.checkmark {
  background-color: #0d6efd;
  /* Blue background for checked state */
  border-color: #0d6efd;
}

/* -- Create the checkmark icon using a pseudo-element -- */
.checkmark::after {
  content: "";
  position: absolute;
  display: none;
  /* Hide by default */
  left: 6px;
  top: 2px;
  width: 5px;
  height: 10px;
  border: solid white;
  border-width: 0 3px 3px 0;
  /* The "magic" to create a checkmark shape */
  transform: rotate(45deg);
}

/* -- Show the checkmark icon when the checkbox is checked -- */
.material-checkbox input:checked~.checkmark::after {
  display: block;
}

/* == STATES == */

/* -- 1. Hover State -- */
/* Add a subtle background color on hover for better UX */
.material-checkbox:hover .checkmark {
  background-color: rgba(0, 0, 0, 0.05);
}

.material-checkbox input:checked:hover~.checkmark {
  background-color: #0b5ed7;
  /* Darker blue on hover when checked */
}

/* -- 2. Focus State (for accessibility) -- */
/* Add a "focus ring" when the user tabs to the checkbox */
.material-checkbox input:focus-visible~.checkmark {
  box-shadow: 0 0 0 3px rgba(13, 110, 253, 0.25);
}

/* -- 3. Disabled State -- */
.material-checkbox.disabled {
  cursor: not-allowed;
  color: #adb5bd;
  /* Muted text color */
}

.material-checkbox.disabled .checkmark {
  border-color: #ced4da;
  background-color: #e9ecef;
}

.material-checkbox.disabled input:checked~.checkmark {
  border-color: #ced4da;
  background-color: #ced4da;
}


/* ... keep all your existing styles for forms ... */


/* -- ADD THESE RULES FOR READ-ONLY/SHOW VIEWS -- */

/* Apply checked styles to the box when the parent has .is-checked */
.material-checkbox.is-checked .checkmark {
  background-color: #0d6efd;
  border-color: #0d6efd;
}

/* Show the checkmark icon when the parent has .is-checked */
.material-checkbox.is-checked .checkmark::after {
  display: block;
}


/* The back button container */
.material-back-button {
  /* Flexbox for easy centering of icon and text */
  display: inline-flex;
  align-items: center;
  justify-content: center;

  /* Sizing: Start as a circle */
  width: 48px;
  height: 48px;

  /* Styling: Flat and grey */
  background-color: #e0e0e0;
  /* Material grey */
  border: none;
  border-radius: 50%;
  /* Makes it a circle */
  cursor: pointer;
  padding: 0;
  /* Remove default button padding */
  overflow: hidden;
  /* Hides the text when collapsed */

  /* Animation: Smooth transitions for all properties */
  transition: width 0.3s ease, border-radius 0.3s ease, background-color 0.2s ease;
}

/* Hover state for the button */
.material-back-button:hover {
  /* Elongate the button */
  width: 110px;

  /* Change from circle to pill shape */
  border-radius: 24px;

  /* Slightly darker grey on hover */
  background-color: #d6d6d6;
}

/* The back arrow icon */
.back-icon {
  /* Ensures the icon doesn't shrink */
  flex-shrink: 0;

  /* Creating the arrow shape using borders */
  display: inline-block;
  width: 7px;
  /* Arrow size */
  height: 7px;
  /* Arrow size */
  border-top: 2px solid #333;
  border-left: 2px solid #333;

  /* Rotate the shape to point left */
  transform: rotate(-45deg);

  /* Position the arrow correctly */
  margin-left: 4px;
  /* Slight offset for centering */
  transition: margin 0.3s ease;
}

.material-back-button:hover .back-icon {
  margin-left: 0;
  /* Adjust margin on hover */
}

/* The descriptive text */
.back-text {
  /* Hide text by default */
  font-size: 14px;
  font-weight: 500;
  color: #333;
  white-space: nowrap;
  /* Prevents text from wrapping */

  /* Start hidden */
  opacity: 0;
  width: 0;
  margin-left: 0;

  /* Smooth transition for fading and sliding in */
  transition: opacity 0.2s ease, width 0.3s ease, margin-left 0.3s ease;
}

/* Show the text on button hover */
.material-back-button:hover .back-text {
  opacity: 1;
  width: auto;
  /* Allow text to take its natural width */
  margin-left: 12px;
  /* Space between icon and text */
}

.trix-editor {
  min-height: 300px;
}

/* Container - Renamed to material-input-small */
.material-input-small {
  position: relative;
  margin-top: 20px;
  margin-bottom: 20px;
  width: 100px;
  /* Constrained width specifically for small inputs */
  font-family: 'Roboto', sans-serif;
}

/* The actual Input field */
.material-input-small .material-input {
  width: 100%;
  padding: 10px 0 10px 5px;
  font-size: 16px;
  color: #333;
  border: none;
  border-bottom: 1px solid #999;
  outline: none;
  background: transparent;
  transition: border-color 0.2s;
}

/* Remove default number spinners */
.material-input-small .material-input::-webkit-outer-spin-button,
.material-input-small .material-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.material-input-small .material-input[type=number] {
  -moz-appearance: textfield;
}

/* The Floating Label */
.material-input-small .material-label {
  position: absolute;
  top: 10px;
  left: 5px;
  color: #999;
  font-size: 16px;
  font-weight: normal;
  pointer-events: none;
  transition: 0.2s ease all;
}

/* Active State (Focus or Has Content) */
.material-input-small .material-input:focus~.material-label,
.material-input-small .material-input:not(:placeholder-shown)~.material-label {
  top: -20px;
  left: 0;
  font-size: 12px;
  color: #6200ee;
  font-weight: 500;
}

/* The Animated Bottom Bar */
.material-input-small .focus-border {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background-color: #6200ee;
  transition: 0.3s;
}

.material-input-small .material-input:focus~.focus-border {
  width: 100%;
}

/* Error State */
.material-input-small.error .material-input {
  border-bottom-color: #d32f2f;
}

.material-input-small.error .material-label {
  color: #d32f2f;
}

.material-input-small.error .focus-border {
  background-color: #d32f2f;
}

.native-select {
  width: 300px;
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: 8px;
  background-color: #f9f9f9;
  font-family: 'Segoe UI', sans-serif;
  font-size: 16px;
  color: #333;
  /* Removes default browser styling in some browsers */
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;

  /* Custom Scrollbar (Works in Chrome/Safari/Edge) */
  scrollbar-width: thin;
  scrollbar-color: #888 #f1f1f1;
}

/* Hover effect on options (Limited support) */
.native-select option {
  padding: 8px 12px;
  border-bottom: 1px solid #eee;
}

.native-select option:checked {
  background-color: #007bff linear-gradient(0deg, #007bff 0%, #007bff 100%);
  color: #fff;
}

/* Hide scrollbar but keep functionality */
.hide-scrollbar::-webkit-scrollbar {
  display: none;
}

.hide-scrollbar {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

/* Optional: Fade effect on edges */
.mask-linear-fade {
  mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
}

/* Select box */
/* Container to position the custom arrow */
.material-select-container {
  position: relative;
  width: 250px;
  font-family: 'Roboto', sans-serif;
}

/* The actual select box */
.material-select {
  width: 100%;
  padding: 20px 32px 8px 16px;
  /* Extra right padding for the arrow */
  font-size: 16px;
  color: rgba(0, 0, 0, 0.87);
  background-color: #f5f5f5;
  /* Material "Filled" style background */
  border: none;
  border-bottom: 1px solid rgba(0, 0, 0, 0.42);
  border-radius: 4px 4px 0 0;
  /* Rounded top corners */

  /* CRUCIAL: This hides the default browser arrow */
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  cursor: pointer;
  transition: all 0.2s ease;
}

/* Material Design Focus State */
.material-select:focus {
  outline: none;
  border-bottom: 2px solid #6200ea;
  /* Your primary theme color */
  background-color: #eeeeee;
}

/* Custom Dropdown Arrow */
.material-select-container::after {
  content: "▼";
  /* Or use an SVG/Material Icon here */
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 10px;
  color: rgba(0, 0, 0, 0.6);
  pointer-events: none;
  /* Ensures clicking the arrow still opens the select */
}