body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    background: #f4f4f4;
}

.container {
    padding: 20px;
    background-color: rgba(255, 255, 255, 0.95);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.2);
    border-radius: 12px;
    text-align: center;
    box-sizing: border-box;
}

.sideBar-container {
    display: flex;
    min-height: 100vh;
}

.input{
    background-color: #f0faf4;
    border: 1px solid #c5e1cc;
    border-radius: 8px;
    box-sizing: border-box;
    width: 100%;
    margin-top: 20px;
    padding: 15px;
    font-size: 16px;
}

.button{
    background-color: #25c068;
    color: #fff;
    border: none;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s;
    border-radius: 8px;
    box-sizing: border-box;
    width: 100%;
    margin-top: 20px;
    padding: 15px;
    font-size: 16px;

}

.button:hover {
    background-color: #2c8656;
}

/* Styled textarea */
.textarea {
    background-color: #f0faf4; /* Light green background for consistency */
    border: 1px solid #c5e1cc; /* Subtle green border */
    border-radius: 8px; /* Rounded edges */
    box-sizing: border-box; /* Ensure padding doesn't affect width */
    width: 100%; /* Full width for the container */
    height: 100px; /* Default height for multiline input */
    padding: 15px; /* Add padding inside the textarea */
    font-size: 16px; /* Match font size with other inputs */
    font-family: inherit; /* Use the same font as the rest of the app */
    color: #333; /* Dark text for readability */
    resize: vertical; /* Allow vertical resizing but not horizontal */
}

.textarea:focus {
    outline: none; /* Remove default focus outline */
    border-color: #4caf50; /* Highlighted border color on focus */
    box-shadow: 0 0 5px rgba(76, 175, 80, 0.4); /* Subtle green glow */
}
/* Nav Side Bar */

/* Styled select dropdown */
.select {
    background-color: #f0faf4; /* Light green background */
    border: 1px solid #c5e1cc; /* Subtle green border */
    border-radius: 8px; /* Rounded edges */
    box-sizing: border-box; /* Ensure padding doesn't affect width */
    width: 100%; /* Full width for the container */
    padding: 10px 15px; /* Padding for consistency */
    font-size: 16px; /* Match font size with other inputs */
    font-family: inherit; /* Use the same font as the rest of the app */
    color: #333; /* Dark text for readability */
    appearance: none; /* Remove default browser styling for a cleaner look */
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 6'%3E%3Cpath fill='%23333' d='M0 0l5 6 5-6z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 12px 12px;
    cursor: pointer; /* Pointer cursor to indicate interaction */
}

.select:focus {
    outline: none; /* Remove default focus outline */
    border-color: #4caf50; /* Highlighted border color on focus */
    box-shadow: 0 0 5px rgba(76, 175, 80, 0.4); /* Subtle green glow */
}

.sidebar {
    min-width: 200px;
    background-color: #25c068;
    color: #fff;
    padding: 2rem 1rem;
    display: flex;
    flex-direction: column;
    box-shadow: 2px 0 8px rgba(0, 0, 0, 0.15);
}

.sidebar h2 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: #ffffff;
}

.nav-item {
    margin: 1rem 0;
    padding: 0.8rem 1rem;
    color: #ffffff;
    text-decoration: none;
    font-size: 1rem;
    border-radius: 8px;
    display: block;
    transition: background-color 0.3s;
}

.nav-item:hover {
    background-color: #2c8656;
}

.main-content {
    flex: 1;
    padding: 2rem;
    background-color: #f7f7f7;
}

.main-content h1 {
    font-size: 2rem;
    margin-bottom: 1.5rem;
    color: #646363;
}

.card {
    background-color: #ffffff;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    margin-bottom: 1.5rem;
}

.card h3 {
    font-size: 1.3rem;
    margin-bottom: 0.8rem;
    color: #646363;
}

.card p {
    color: #666;
}

/* Modal overlay styling */
.modal {
    display: none; /* Hidden by default */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

/* Modal content styling */
.modal-content {
    position: relative;
    background-color: #fff;  /* Light background color to match theme */
    margin: 10% auto;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.3);
    width: 300px;
    text-align: center;
    font-family: Arial, sans-serif;
}

.select {
    margin: 10px 0px 20px;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 16px;
}

.nav-controls {
  position: fixed;      /* Float relative to viewport */
  bottom: 20px;         /* Always 20px above viewport bottom */           /* Keep same offset from the left */
  width: 180px;           /* Width spans most of sidebar */
  display: flex;        /* Arrange child icons in a row */
  align-items: center;  /* Vertically center icons */
  justify-content: flex-start; /* Icons start on the left */
  border: 1px solid #ccc;       /* Grey border */
  border-radius: 12px;          /* Rounded corners */
  padding: 0.5rem;              /* Space inside container */
  background-color: transparent;/* Transparent background */
  z-index: 1000;         /* Ensure it sits above other content */
}

.nav-center-icon {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  font-size: 1.5rem;
  color: inherit;
  text-decoration: none;
}

/* Vertical divider lines at 1/3 and 2/3 of width */
.nav-controls::before,
.nav-controls::after {
  content: "";
  position: absolute;
  top: 8px;        /* Adjust as needed for padding */
  bottom: 8px;     /* Adjust as needed for padding */
  width: 1px;
  background-color: #ccc;
}
.nav-controls::before {
  left: 33.33%;
}
.nav-controls::after {
  left: 66.66%;
}
.nav-controls:hover {
  background-color: rgba(0, 0, 0, 0.03); /* Very subtle hover */
}

/* Style for back-arrow icon (common to every sidebar) */
.nav-back-icon {
  font-size: 1.5rem;
  color: inherit;
  text-decoration: none;
  padding: 0.25rem 0.5rem;  /* Keeps some padding around the arrow */
}

/* Home icon in nav-controls */
.nav-controls .nav-home-icon {
  flex: 1;
  text-align: right;
  font-size: 2rem;
  color: inherit;
  text-decoration: none;
  cursor: pointer;
  margin-right: 15px;
}
.nav-controls .nav-home-icon:hover {
  background-color: rgba(0, 0, 0, 0.03);
}

/* This rule just centers the title text */
.modal-title-flex {
    text-align: center;
    padding: 5px 0;
}

/* This positions the icon and sets up the tooltip container */
.title-icon {
    position: absolute;
    top: 40px; /* Adjust as needed */
    right: 30px; /* Adjust as needed */
    width: 30px;
    height: 30px;
    cursor: pointer;
    z-index: 10;
}

.js-tooltip {
    /* --- Positioning & Design --- */
    position: fixed;
    background-color: #ffc107;
    color: #333;
    padding: 6px 12px;
    border-radius: 5px;
    font-size: 13px;
    font-weight: bold;
    white-space: nowrap;
    z-index: 9999;

    /* --- Hide by default with a fade transition --- */
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease-in-out;
    pointer-events: none;
}

.js-tooltip.visible {
    opacity: 1;
    visibility: visible;
}

/* Styling for the PDF Preview Modal */
.pdf-modal-content {
    width: 900px; /* Wider for A4 aspect ratio */
    max-width: 90vw;
}

.pdf-viewer {
    border: 1px solid #ccc;
    background-color: #f0f0f0;
    overflow: auto;
    max-height: 75vh; /* Limit the viewer height */
    margin: 15px 0;
}

#pdf-canvas {
    display: block;
    margin: 0 auto; /* Center the canvas */
}

.pdf-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin-top: 10px;
}

/* --------------------------------------------------- Reusable Search Bar Componets --------------------------------------------------- */

/* Main container for the search and create button block */
.page-controls-container {
    display: flex;
    flex-direction: column; /* Stacks the search bar on top of the button */
    align-items: center;    /* Horizontally centers the items */
    gap: 20px;
    margin-bottom: 20px;
}

/* A wrapper to help center the search bar */
.search-container {
  display: flex;
  justify-content: center;
  width: 100%;
}

/* The main search bar style with rounded corners */
.search-bar-main {
  width: 100%;
  max-width: 600px; /* Or whatever max-width you prefer */
  padding: 12px 20px;
  font-size: 16px;
  border: 1px solid #ccc;
  border-radius: 30px; /* Makes it pill-shaped */
  box-sizing: border-box;
}

/* ----------------------- ---------------- ----------------  Shared settings button for modals ---------------- ---------------- ---------------- */
.settings-btn {
  position: absolute;
  top: 10px;
  left: 10px;
  width: 20px;
  height: 20px;
  padding: 0;
  margin: 0;
  z-index: 1003;
  background: transparent;
  border: none;
  cursor: pointer;
  transition: color 0.3s ease;
}
.settings-btn:hover {
  color: #000;
}
.settings-btn .settings-icon {
  width: 20px;
  height: 20px;
  object-fit: contain;
  display: block;
  transition: transform 0.5s ease;
  transform-origin: center center;
}
.settings-btn.spin .settings-icon {
  transform: translateX(58px) rotate(180deg);
}
.settings-btn::before {
  content: "";
  position: absolute;
  bottom: -3px;
  left: 0;
  width: 0;
  height: 25px;
  border: 1px solid transparent;
  border-radius: 20px;
  transition: width 0.5s ease, border-color 0.3s ease;
  z-index: 0;
}
.settings-btn.spin::before {
  width: 80px;
  border-color: #a8aba9;
  background-color: lightgrey;
}

/* Delete icon for modals */
.delete-icon {
  position: absolute;
  top: 0.6rem;
  left: 2.5rem;
  width: 20px;
  height: 20px;
  cursor: pointer;
  display: block;
  opacity: 0;
  /* Set the default transition with NO delay */
  transition-property: opacity;
  transition-duration: 0.2s;
  transition-timing-function: ease;
  transition-delay: 0s;
  z-index: 1005;
}

/* This rule now also sets the delay, but only when fading IN */
.settings-btn.spin + .delete-icon {
    opacity: 1;
    transition-delay: 0.2s;
}

/* ----------------------------------------------------------  Custom Close Button Styling ------------------------------------------------------------- */
#customerModal .close-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 32px;
    height: 32px;
    
    /* Visual styles */
    background-color: #f1f1f1;
    border: 1px solid #ddd;
    border-radius: 50%; /* Makes it circular */
    color: #555;
    
    /* Text centering */
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    line-height: 1;
    
    cursor: pointer;
    transition: background-color 0.2s;
    padding: 0px 0px 2px 1px;
}

#customerModal .close-btn:hover {
    background-color: #e0e0e0;
    color: #000;
}

/* Close button styling */
.close-btn {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 1.2rem;
    cursor: pointer;
}