
@import url('https://fonts.googleapis.com/css?family=Poppins;100,200,300,400,500,600,700,800,900');
@import 'variables.css';

/*-------------------- Placard Style CSS --------------------*/

.main-content {
  flex: 20;
  padding: 20px;
  overflow-y: auto;
  background: linear-gradient(90deg, black, #2A003D);
  
}

    .container {
      background-color:transparent;    
      display: flex;
      gap: 20px;
      padding: 20px;
      width: 100%;    
      justify-content: center;
      margin-bottom: 20px;
      margin-top: 80px;
      align-items: stretch;
      max-width: 2000px; 
      margin-left: auto;
      margin-right: auto;
    }
    
/* =================================This section is the style for the 2  containers */
    .form-container, .print-container {
      background: var(--background-glass);
      padding: 20px;      
      border-radius: 12px;
      flex: 1;
      display: flex;
      flex-direction: column;
      height: 115em;       
      border: 2px solid var(--primary-color);
      max-width: 1000px; 
    }

    .form-container:hover, 
    .print-container:hover {
      box-shadow: 0 0 30px var(--primary-color);
      border: 2px solid var(--primary-color);   
    }
/* =======================================This section above is the style for the 2  containers */
    input:-webkit-autofill,
    textarea:-webkit-autofill,
    select:-webkit-autofill {
      background-color: var(--input-bg-color) !important;
      -webkit-box-shadow: 0 0 0 100px #111 inset !important;
      -webkit-text-fill-color: #fff !important;
    }


    .form-container h1, .print-container h1 {
      text-align: center;
      margin-bottom: 20px;
      font-size: 3em;
      color: var(--text-color);
    }

    .form-group {
      margin-bottom: 15px;
    }

    .form-group label {
      display: block;
      font-size: 2em;
      font-weight: bold;
      font-family: "Poppins";
      margin-bottom: 10px;
    }

    .form-group input,
    .form-group select,
    .form-group textarea {
      font-family: "Poppins";
      background: var(--container-color);
      color:var(--text-color);
      width: 50%;
      min-width: 300px; /* Ensures usability on smaller screens */
      max-width: 100%; /* Prevents overflow */
      padding: 1.1rem;
      border: 2px solid var(--primary-color);
      border-radius: 8px;
      font-size: 14px;
      outline: none;
      transition: border 0.3s ease-in-out;
      box-sizing: border-box;
    } 

    .form-group textarea {      
          height: 150px;
          resize: none;
    }

    /*------------------------------------------ Style the scrollbar for textarea */
    .form-group textarea::-webkit-scrollbar {
      width: 5px; /* Width of the scrollbar */
    }

    /* Track (the background of the scrollbar) */
    .form-group textarea::-webkit-scrollbar-track {
      background: var(--container-color); /* Background color */
      border-radius: 8px;
    }

    /* Handle (the draggable part of the scrollbar) */
    .form-group textarea::-webkit-scrollbar-thumb {
      background: var(--primary-color); /* Scrollbar color */
      border-radius: 8px;
      transition: background 0.3s;
    }

/* Handle on hover */
    .form-group textarea::-webkit-scrollbar-thumb:hover {
      background: #5c0074; /* Slightly darker color when hovered */
    }


    .form-group textarea {    
      height: 15rem;
      resize: none;
    }

    .print-content {
      max-width: 100%;
      max-height: 100vh;
      padding: 5px;
      overflow-y: auto;
      box-sizing: border-box;
      width: 776px;
      height: 1056px;
      background-color: white;
      color: black;
      margin: 0 auto;
      box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
      position: relative;
      display: flex;
      flex-direction: column;
    }

    .print-header {
      margin-bottom: 10px;
    }

    .print-body {
      flex-grow: 1;
      word-wrap: break-word;
      overflow-wrap: break-word;
      white-space: normal;
      max-width: 100%;
      padding-bottom: 20px; 
      overflow: hidden;
      text-align: center;
    }

    .print-footer {
      text-align: center;
      margin-top: auto;
      padding-top: 20px;
      border-top: 1px solid #ddd;
      font-family: Arial, sans-serif;
      font-size: 30px;
    }

    .print-footer p {
      margin: 10px 0;
    }

    .print-footer span {
      font-weight: bold;
    }

    .print-content h2 {
      font-size: 48px;
      margin-bottom: 5px;
      margin-top: 5px;
      text-align: center;
    }  

/* Specifically target the checkbox label and input */
    .checkbox-group label{
      display: block;
      font-size: 2em;
      font-weight: bold;
      font-family: "Poppins";
      margin-bottom: 10px;
    }

    .checkbox-group {
      display: flex;
      font-weight: bold;
      align-items: center;
      margin-bottom: 10px;
      gap: 10px; /* Adjust spacing between label and checkbox */
    }

/* Change checkbox color to indigo */
    .bold-checkbox {
      accent-color: var(--primary-color); 
    }

/*-------------------- Media Queries --------------------*/

/* For tablets and small screens (max-width: 991px) */
@media (max-width: 991px) {
  
  
  .layout {
    flex-direction: column;
    margin-top: 80px; /* Adjust to header height */
  }
  
  .container {
    flex-direction: column;
    gap: 30px;
    padding: 0 10px;
  }
  
  .sidebar {
    width: 100%;
    padding: 20px;
    margin-bottom: 20px;
  }
  
  .main-content {
    padding: 10px;
  }
  
  .print-container {
    width: 100%;
  }
}

/* For phones (max-width: 450px) */
@media (max-width: 450px) {
  
  
  .container {
    gap: 20px;
  }
  
  .form-container,
  .print-container {
    padding: 20px;
  }
  
  .sidebar {
    width: 100%;
    padding: 15px;
  }
}

.form-header {
    display: flex;
    justify-content: center; /* Center the title */
    align-items: center;
    margin-bottom: 20px;
    width: 100%;
}

.form-header h1 {
    margin: 0;
}

.action-section {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-bottom: 20px; /* Add space between button and title */
}

/* Update media queries for better responsiveness */
@media (max-width: 1920px) {
    .container {
        max-width: 1800px;
    }
    
    .form-container, .print-container {
        max-width: 900px;
    }
}

@media (max-width: 1440px) {
    .container {
        max-width: 1400px;
    }
    
    .form-container, .print-container {
        max-width: 700px;
    }
}

@media (max-width: 991px) {
    .layout {
        flex-direction: column;
        margin-top: 80px;
    }
    
    .container {
        flex-direction: column;
        gap: 30px;
        padding: 0 10px;
    }
    
    .form-container, .print-container {
        width: 100%;
        max-width: 100%;
    }
}

@media (max-width: 450px) {
    .form-header {
        flex-direction: column;
        gap: 15px;
    }
    
    .action-section {
        width: 100%;
        justify-content: center;
    }
    
    .btn {
        width: 100%;
        max-width: 80PX;
        text-align: center;
    }
}

.btn {
    padding: 10px 20px;
    background: var(--primary-color);
    color: var(--text-color);
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1.2em;
    transition: all 0.3s ease;
}

.btn:hover {
    background: var(--secondary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

/* Style the date input and its calendar icon */
input[type="date"] {
    color-scheme: dark;
    position: relative;
    background: var(--container-color);
    color: var(--text-color);
}

/* Style the calendar icon for Webkit browsers (Chrome, Safari, Edge) */
input[type="date"]::-webkit-calendar-picker-indicator {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='18' rx='2' ry='2'%3E%3C/rect%3E%3Cline x1='16' y1='2' x2='16' y2='6'%3E%3C/line%3E%3Cline x1='8' y1='2' x2='8' y2='6'%3E%3C/line%3E%3Cline x1='3' y1='10' x2='21' y2='10'%3E%3C/line%3E%3C/svg%3E");
    filter: brightness(1);
    opacity: 0.8;
    cursor: pointer;
    transition: opacity 0.2s ease;
}

input[type="date"]::-webkit-calendar-picker-indicator:hover {
    opacity: 1;
}

/* Style the calendar icon for Firefox */
input[type="date"]::-moz-calendar-picker-indicator {
    filter: invert(1);
    opacity: 0.8;
    cursor: pointer;
}

input[type="date"]::-moz-calendar-picker-indicator:hover {
    opacity: 1;
}

/* Style the number input spinners */
input[type="number"] {
    color-scheme: dark;
    position: relative;
    background: var(--container-color);
    color: var(--text-color);
}

/* Chrome, Safari, Edge, Opera */
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
    opacity: 0.8;
    height: 20px;
    position: relative;
    cursor: pointer;
    filter: invert(1); /* Makes the arrows white */
    background: transparent;
}
