.job-worker-container {
  width: auto;
  height: 90vh;
  overflow: hidden;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: calc(var(--space-m) * 1px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  display: flex;
  flex-direction: column;
  justify-content: start;
  position: relative;

  .dialog-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px 24px 16px;
    border-bottom: 1px solid #e0e0e0;
    background: linear-gradient(135deg, #af02be 0%, #764ba2 100%);
    color: white;
  }

  .close-btn {
    background-color: transparent;

    &:hover {
      cursor: pointer;
    }
  }

  .dialog-title {
    display: inline-flex;
    align-items: center;
    gap: calc(var(--space-m) *1px);
  }

  // .jobtitle-icon {
  //   font-size: calc(var(--font-lineHeight-l) *1px) !important;
  // }

  .closurepart {
    display: flex;
    align-items: center;
  }

  .closeicon {
    cursor: pointer;
    color: var(--button-secondary-text-disabled);
  }

  .closeicon mat-icon {
    font-size: calc(var(--font-lineHeight-l) *1px);
    vertical-align: middle;
  }

  .lightbox-title {
    font-size: calc(var(--font-size-md) *1px);
    font-weight: var(--font-weight-semiBold);
    line-height: calc(var(--font-lineHeight-l) * 1px);
    color: var(--text-primary);
  }

  .section {
    display: grid;
    gap: calc(var(--space-s) *1px);
    background-color: var(--bg-subtle);
    border: 1px solid var(--border-subtle);
    padding-top: calc(var(--space-m) *1px);
    padding-right: calc(var(--space-l) *1px);
    padding-bottom: calc(var(--space-m) *1px);
    padding-left: calc(var(--space-l) *1px);
    border-radius: calc(var(--size-radius-m) *1px); 
  }

  .section-header {
    display: inline-flex;
    vertical-align: center;
    gap: calc(var(--space-s) *1px);
  }

  .layout{
    display: inline-flex;
    flex-direction: column;
    width:100%;
    gap:calc(var(--space-xl) *1px)
  }

  .dialog-content {
    background-color: var(--bg-surface);
    padding-top: calc(var(--space-l) *1px);
    padding-right: calc(var(--space-xl) *1px);
    padding-bottom: calc(var(--space-l) *1px);
    padding-left: calc(var(--space-xl) *1px);
    overflow-y: auto;

    .eligibility-banner {
      display: flex;
      align-items: center;
      gap: 10px;
      padding: 12px 16px;
      margin-bottom: 16px;
      border-radius: 8px;
      background-color: #fdecea;
      border-left: 4px solid #c62828;
      color: #7a1c1c;
      font-size: 0.92rem;

      mat-icon {
        color: #c62828;
      }
    }

    .section-card {
      background: white;
      border-radius: 12px;
      padding: 20px;
      margin-bottom: 20px;
      box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
      border: 1px solid #e3f2fd;

      .section-icon {
        margin-right: 12px;
        color: #1976d2;
        font-size: 1.5rem;
      }

      h3 {
        margin: 0;
        color: #a719d2;
        font-size: 1.2rem;
        font-weight: 500;
      }
    }

    .info-grid {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 16px;

      @media (max-width: 600px) {
        grid-template-columns: 1fr;
      }

      .info-item {
        display: flex;
        flex-direction: column;
        padding: 12px;
        background: #f5f5f5;
        border-radius: 8px;
        border-left: 4px solid #c921f3;

        .info-label {
          font-size: 0.9rem;
          color: #666;
          margin-bottom: 4px;
          font-weight: 500;
        }

        .info-value {
          font-size: 1.1rem;
          color: #333;
          font-weight: 600;
        }
      }
    }

    .form-grid {
      display: grid;
      gap: calc(var(--space-l) *1px);

      .full-width {
        width: calc(var(--size-field-min-s) *1px);
      }

      .run-mode-group {
        display: flex;
        gap: calc(var(--space-l) *1px);
      }

      .form-field {
        .field-label {
          display: block;
          margin-bottom: 12px;
          font-weight: 500;
          color: #333;
          font-size: 1rem;
        }

        .static-label {
          display: flex;
          align-items: center;
          padding: 8px 12px;
          border-radius: 8px;
          background-color: #f0f7ff;
          color: #333;
          font-weight: 500;
          width: fit-content;

          mat-icon {
            margin-right: 8px;
            font-size: 1.2rem;
            color: #1976d2;
          }
        }
      }

      .schedule-options {
        padding: 20px;
        background: #e3f2fd;
        border-radius: 8px;
        border-left: 4px solid #b821f3;

        .datetime-list {
          display: flex;
          flex-direction: column;
          gap: 20px;
        }

        .datetime-row {
          display: flex;
          align-items: flex-start;
          gap: 20px;

          &__label {
            display: flex;
            align-items: center;
            gap: 8px;
            flex: 0 0 130px;
            padding-top: 14px;
            font-weight: 600;
            color: #333;
            font-size: 0.95rem;
            white-space: nowrap;

            mat-icon {
              color: #7b1fa2;
              font-size: 1.3rem;
            }
          }

          &__fields {
            display: flex;
            flex: 1;
            gap: 16px;

            .date-field {
              flex: 1.4;
              min-width: 170px;
            }

            .time-field {
              flex: 1;
              min-width: 150px;
            }
          }

          @media (max-width: 700px) {
            flex-direction: column;
            align-items: stretch;
            gap: 8px;

            &__label {
              flex: 0 0 auto;
              padding-top: 0;
            }

            &__fields {
              flex-direction: column;

              .date-field,
              .time-field {
                min-width: 0;
              }
            }
          }
        }
      }
    }
  }

  .action-buttons {
    display: flex;
    gap: calc(var(--space-s) * 1px);


    // .cancel-btn {
    //   min-width: 120px;
    //   height: 44px;
    //   border: 2px solid #ccc;
    //   color: #666;

    //   mat-icon {
    //     margin-right: 8px;
    //   }

    //   &:hover {
    //     background-color: #f5f5f5;
    //     border-color: #999;
    //   }
    // }

    // 
    
    

    @media (max-width: 600px) {
      flex-direction: column;

      .cancel-btn,
      .submit-btn {
        width: 100%;
      }
    }
  }
}

::ng-deep .mat-radio-button {
  width: 24px !important;
  height: 24px !important;
}

// Custom Material Form Field Styles
::ng-deep {
  .mat-mdc-form-field {
    .mat-mdc-text-field-wrapper {
      background-color: #fafafa;

      &:hover {
        background-color: #f0f0f0;
      }
    }

    &.mat-focused {
      .mat-mdc-text-field-wrapper {
        background-color: white;
      }
    }
  }

  .mat-mdc-select-panel {
    .mat-mdc-option {
      display: flex;
      align-items: center;

      mat-icon {
        margin-right: 8px;
        color: #666;
      }

      &.mdc-list-item--selected {
        mat-icon {
          color: #1976d2;
        }
      }
    }
  }
}

// Responsive Design
@media (max-width: 768px) {
  .job-worker-container {
    .dialog-content {
      padding: 16px;

      .section-card {
        padding: 16px;
        margin-bottom: 16px;
      }
    }
  }
}


@media (max-width: 480px) {
  .job-worker-container {
    .dialog-header {
      padding: 16px;

      .dialog-title {}
    }
  }
}