/* Main form container */
form {
  padding: 0;
  margin: 0;
  background-color: white;
  font-family: "Helvetica Neue", sans-serif;
}

/* Employee label styling */
.employeewise-leave-container div {
  margin: 0px 0 0px 0;
  font-size: 14px;
  font-weight: normal;
  color: #333333;
  font-family: "Helvetica Neue", sans-serif;
}


.attendance-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin: 0;
  font-size: 13px;
  font-family: "Helvetica Neue", sans-serif;

  background-color: #ffffff;
  border: 1px solid #e0e0e0;
  border-radius: 16px;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08);
  overflow: hidden;
  table-layout: auto;
}

.employeewise-leave-container .attendance-table {
  margin-left: 0;
  margin-right: 0;
}

/* Header row styling */
.SummaryTablethead {
  background-color: var(--bg-surface, #F4E7FF);
}

.SummaryTablethead th {
  padding: 0 10px;
  text-align: center;
  font-weight: 600;
  font-size: 12px;
  color: #000000;
  border-right: 1px solid var(--bg-surface, #F4E7FF);
  white-space: nowrap;
  background-color: var(--bg-surface, #F4E7FF);
  height: 32px;
  line-height: 32px;
  vertical-align: middle;

  &:last-child {
    border-right: none;
  }

  &:nth-child(1) {
    min-width: 90px;
    width: 90px;
  }

  &:nth-child(2),
  &:nth-child(3) {
    min-width: 80px;
    width: 80px;
  }

  &:nth-child(4),
  &:nth-child(5),
  &:nth-child(6),
  &:nth-child(7),
  &:nth-child(9),
  &:nth-child(10),
  &:nth-child(11) {
    min-width: 70px;
    width: 70px;
  }

  &:nth-child(8),
  &:nth-child(12) {
    min-width: 80px;
    width: 80px;
  }
}

/* Body cell styling */
.tbodytd {
  padding: 8px 6px;
  text-align: center;
  border-bottom: 1px solid #f1f3f4;
  border-right: 1px solid #f1f3f4;
  font-size: 13px;
  color: #495057;
  vertical-align: middle;
  background-color: #ffffff;
  font-weight: normal;

  &:last-child {
    border-right: none;
  }

  &:nth-child(1) {
    font-weight: 500;
    padding-left: 10px;
  }

  &:nth-child(9) {
    font-family: "Helvetica Neue", sans-serif;
  }
}

tbody tr:nth-child(odd) {
  background-color: #ffffff;
}

tbody tr:nth-child(even) {
  background-color: var(--bg-surface, #F4E7FF);
}

tbody tr:hover .tbodytd {
  background-color: var(--bg-surface, #F4E7FF) !important;
}

:host {
  * {
    box-sizing: border-box;
  }
}

/* =========================================================
   Responsive adjustments
   ========================================================= */

@media screen and (max-width: 1200px) {
  .attendance-table {
    font-size: 12px;
    width: 100%;
  }

  .SummaryTablethead th {
    padding: 0 6px;
    font-size: 11px;
  }

  .tbodytd {
    padding: 6px 4px;
    font-size: 12px;
  }
}

@media screen and (max-width: 992px) {
  .attendance-table {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
  }

  .SummaryTablethead th,
  .tbodytd {
    min-width: 60px;
    padding: 5px 3px;
    font-size: 10px;
  }
}

/* Print styles */
@media print {
  .attendance-table {
    border-collapse: collapse;
    width: 100%;
    box-shadow: none;
    border-radius: 0;
  }

  .attendance-table th,
  .attendance-table .tbodytd {
    border: 1px solid #000 !important;
    padding: 5px;
  }

  .SummaryTablethead,
  .SummaryTablethead th {
    background-color: var(--bg-surface, #F4E7FF) !important;
  }
}

/* ================= Employee Row ================= */

.employee-row {
  display: flex;
  align-items: center;
  margin-bottom: 10px;
}

.employee-row label {
  margin-right: 8px;
}

/* 🔹 Employee name pill input */
.employee-input {
  width: 180px;
  height: 36px;
  padding: 6px 12px;
  border-radius: 14px;
  border: 1px solid #d0d0d0;
  background-color: #f9f9f9;
  font-size: 13px;
  color: #222;
  outline: none;
  box-shadow: none;
  line-height: 24px;
}

.employee-input::placeholder {
  color: #888;
}

/* ================= Date filter row ================= */

.date-filter-container {
  display: flex;
  gap: 20px;
  margin-bottom: 20px;

  /* ✅ FIX: align everything on the same straight line */
  align-items: center;
}

.filter-date {
  display: flex;
  flex-direction: column;
}

.date-label {
  font-weight: 600;
  margin-bottom: 5px;
}

/* =========================================================
   NEW PILL-STYLE DATE INPUT  (Matches screenshot)
   ========================================================= */

.filter-period {
  width: 140px;

  ::ng-deep {
    .mat-mdc-text-field-wrapper {
      min-height: 36px;
      height: 36px;
      border-radius: 20px;
      border: 1px solid #e0e0e0;
      background-color: #ffffff;
      padding: 0 16px;

      .mat-mdc-form-field-focus-overlay {
        background-color: transparent !important;
      }

      .mdc-notched-outline {
        display: none !important;
      }
    }

    .mat-mdc-form-field-flex {
      align-items: center;
    }

    .mat-mdc-form-field-infix {
      padding: 0 !important;
      min-height: 0 !important;
      border: none;
    }

    input {
      font-size: 13px;
      padding: 0;
      border: none;
      outline: none;
      background: transparent;
      color: #333;
      text-align: center;
    }

    .mat-mdc-form-field-icon-suffix,
    .mat-datepicker-toggle {
      display: none !important;
    }
  }
}

/* ================= Buttons ================= */

/* Clear button container - positioned below table */
.clear-btn-container {
  height: 32px;
  padding: 6px 16px;
  margin-bottom: 2px;
  width: auto;
}

.clear-btn {
  background: var(--action-primary-default, #834DD0);
  color: #fff;
  padding: 0px 18px;
  width: 100px;
  height: 38px;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  cursor: pointer;
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
  opacity: 1;
  transform: rotate(0deg);
  transition: all 0.2s ease;
}

.clear-btn:hover {
  filter: brightness(0.85);
  transform: scale(1.02);
}

.clear-btn:active {
  filter: brightness(0.75);
}

.load-btn {
  background: var(--action-primary-default, #834DD0);
  color: #fff;
  padding: 4px 16px;
  width: 100px;
  height: 34px;
  /* ✅ match date pill height */
  border: none;
  border-radius: 8px;
  font-size: 16px;
  cursor: pointer;
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
  opacity: 1;
  transform: rotate(0deg);
  transition: all 0.2s ease;
}

.load-btn:hover {
  filter: brightness(0.85);
  transform: scale(1.02);
}

.load-btn:active {
  filter: brightness(0.75);
}

/* ================= Scroll container ================= */

.employeewise-leave-container {
  height: calc(100vh - 140px);
  overflow-y: auto;
  overflow-x: hidden;
  padding: 16px;
  font-family: "Helvetica Neue", sans-serif;

  scrollbar-width: none;
  -ms-overflow-style: none;

  &::-webkit-scrollbar {
    display: none;
  }
}

/* ================= Tab Container Alignment ================= */

.TabContainer {
  display: inline-block;
  margin-top: 16px;
}

::ng-deep .FormsTabGroup {
  display: inline-grid;
  grid-template-rows: auto 1fr;
  width: max-content;

  .mat-mdc-tab-header {
    border-bottom: 1px solid var(--bg-surface, #F4E7FF);
    width: 100%;
  }

  .mat-mdc-tab-labels {
    justify-content: flex-start;
  }

  .mat-mdc-tab-body-wrapper {
    width: 100%;
  }

  .mat-mdc-tab-body-content {
    padding: 0;
    overflow: visible;
    width: 100%;
  }

  .mat-mdc-tab-body {
    width: 100%;
  }
}

/* Table wrapper to match tab header width */
.table-wrapper {
  width: 100%;
  overflow: hidden;
  overflow-x: auto;

  .attendance-table {
    width: 100%;
    table-layout: auto;
    min-width: max-content;
  }
}



.employee-filter-row {
  display: flex;
  justify-content: flex-start;
  align-items: flex-start;
  margin-bottom: 10px;
}

.employee-info-left {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.employee-info-left .employee-row {
  margin-bottom: 4px;
}

.employee-info-left .date-filter-container {
  margin-bottom: 0;
}

/* ✅ FIX: keep button straight line with date inputs */
.date-filter-aligned {
  display: flex;
  align-items: center;
  /* ✅ changed from flex-end */
  gap: 16px;
}

.date-filter-aligned .filter-period {
  width: 150px;
}

.date-filter-aligned .load-btn {
  height: 36px;
  padding: 0 20px;

  /* ✅ remove the push down */
  margin-top: 0;
  align-self: center;
}

/* ================= Picklist Styling ================= */
.employee-wrapper {
  display: flex;
  flex-direction: column;
  gap: 0px;
  margin-bottom: 10px;
}

.employee-label {
  display: none !important;
  height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
}

.employee-row {
  display: flex;
  align-items: center;
  margin-bottom: 0;
  gap: 8px;
}

.employee-row gb-newpicklist {
  width: 276px !important;
  height: 42px !important;
  opacity: 1;
  transform: rotate(0deg);
  flex-shrink: 0;
  padding: 0 !important;
  display: inline-block !important;
  overflow: visible !important;
  position: relative;
  z-index: 10;
}

:host ::ng-deep gb-newpicklist {
  width: 100% !important;
  height: 100% !important;
  display: block !important;
  position: relative;
  z-index: 10;
}

:host ::ng-deep gb-newpicklist .mat-mdc-form-field {
  width: 100% !important;
  height: 42px !important;
  margin: 0 !important;
  position: relative;
  z-index: 10;
}

:host ::ng-deep gb-newpicklist .mat-mdc-text-field-wrapper {
  width: 100% !important;
  height: 42px !important;
  min-height: 42px !important;
  padding: 0 !important;
  background-color: #ffffff !important;
  position: relative;
  z-index: 10;
  overflow: visible !important;
}

:host ::ng-deep gb-newpicklist .mdc-notched-outline {
  display: none !important;
}

:host ::ng-deep gb-newpicklist .mdc-notched-outline__leading,
:host ::ng-deep gb-newpicklist .mdc-notched-outline__notch,
:host ::ng-deep gb-newpicklist .mdc-notched-outline__trailing {
  display: none !important;
}

:host ::ng-deep gb-newpicklist .mat-mdc-form-field-flex {
  width: 100% !important;
  height: 42px !important;
  align-items: center;
  justify-content: center !important;
  padding: 0 16px !important;
}

:host ::ng-deep gb-newpicklist .mat-mdc-form-field-infix {
  border: none !important;
  padding: 0 !important;
  min-height: 0 !important;
}

:host ::ng-deep gb-newpicklist .mat-mdc-form-field-focus-overlay {
  background-color: transparent !important;
  display: none !important;
}

:host ::ng-deep gb-newpicklist .mat-mdc-form-field-label {
  display: none !important;
}

:host ::ng-deep gb-newpicklist .mat-mdc-floating-label {
  display: none !important;
}

:host ::ng-deep gb-newpicklist input {
  color: #333 !important;
}

:host ::ng-deep gb-newpicklist input::placeholder {
  color: transparent !important;
}

/* ================= Date Field Styling ================= */
.filter-period {
  width: 120px !important;
  height: 36px !important;
  border-radius: 18px !important;
  position: relative !important;

  ::ng-deep {
    .mat-mdc-text-field-wrapper {
      width: 120px !important;
      height: 36px !important;
      min-height: 36px !important;
      border-radius: 18px !important;
      border: 1px solid #b0b0b0 !important;
      background-color: #ffffff !important;
      padding: 0 !important;
    }

    .mat-mdc-form-field-flex {
      width: 120px !important;
      height: 36px !important;
      align-items: center !important;
      padding: 0 12px !important;
    }

    .mdc-notched-outline {
      display: none !important;
    }

    .mdc-notched-outline__leading,
    .mdc-notched-outline__notch,
    .mdc-notched-outline__trailing {
      display: none !important;
    }

    input {
      font-size: 12px !important;
      padding: 0 !important;
      border: none !important;
      outline: none !important;
      background: transparent !important;
      color: #333 !important;
      text-align: center !important;
      height: 36px !important;
      line-height: 36px !important;
    }

    .mat-mdc-form-field-infix {
      padding: 0 !important;
      min-height: 0 !important;
      border: none !important;
    }

    .mat-mdc-form-field-icon-suffix,
    .mat-datepicker-toggle {
      display: none !important;
    }

    .mat-mdc-form-field-focus-overlay {
      background-color: transparent !important;
    }
  }

  &:hover ::ng-deep .mat-mdc-text-field-wrapper {
    border-color: #999 !important;
  }

  &:focus-within ::ng-deep .mat-mdc-text-field-wrapper {
    border-color: var(--action-primary-default, #834DD0) !important;
    border-width: 2px !important;
  }
}



.date-filter-container,
.date-filter-aligned {
  align-items: center !important;
}

/* Force Material field internal alignment */
.date-filter-container ::ng-deep .mat-mdc-form-field-flex,
.date-filter-aligned ::ng-deep .mat-mdc-form-field-flex {
  align-items: center !important;
}

/* Ensure wrapper behaves like center-aligned block */
.date-filter-container ::ng-deep .mat-mdc-text-field-wrapper,
.date-filter-aligned ::ng-deep .mat-mdc-text-field-wrapper {
  display: flex;
  align-items: center;
}

/* Button baseline fix */
.date-filter-container .load-btn,
.date-filter-aligned .load-btn {
  height: 36px;
  line-height: 36px;
  margin: 0 !important;
  margin-top: 35px !important;
  padding-top: 0;
  padding-bottom: 0;
  align-self: flex-start !important;
  position: relative;
  top: 0;
}

/* ================= Lightbox Vertical View ================= */
.lightbox-vertical-container {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 100%;
  padding-bottom: 20px;
}

.section-block {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.section-header {
  display: flex;
  align-items: center;
  padding-left: 12px;
  border-left: 4px solid #F37021;
  margin-bottom: 8px;
  height: 24px;
}

.section-title {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  color: #F37021;
  font-family: inherit;
  line-height: normal;
}

/* ================= Lightbox Heading ================= */
.lightbox-heading {
  margin-bottom: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.selected-date-label {
  font-size: 24px;
  font-weight: 700;
  color: #834DD0;
  margin: 0;
  font-family: inherit;
}

.planned-info-row {
  display: flex;
  gap: 40px;
  align-items: center;
}

.info-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.info-label {
  font-size: 14px;
  color: #666;
  font-weight: 500;
}

.info-value {
  font-size: 16px;
  color: #333;
  font-weight: 400;
}
