@import url('../../../../../projects/gbhost/public/gbstyle/gbcommonstyle.scss');

.FormModal_contentLovType {
  justify-content: center;
  background-color: var(--mat-sys-background);
  margin: auto;
  padding: 10px;
  border: 1px solid #888;
  width: 1350px;
  height: 460px;
  border-radius: 10px;
  overflow: auto;
}

// Header Section
.measure-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  background: #fff;
  border-bottom: 1px solid #e0e0e0;
  
  .header-content {
    .header-title {
      font-size: 24px;
      font-weight: 600;
      margin: 0;
    }
  }

  .header-actions {
    display: flex;
    align-items: center;
    gap: 16px;
  }

  .view-toggle {
    display: flex;
    gap: 8px;
    background: #f5f5f5;
    padding: 4px;
    border-radius: 8px;

    .btn-view-toggle {
      display: flex;
      align-items: center;
      gap: 6px;
      padding: 8px 16px;
      border: none;
      background: transparent;
      color: #666;
      font-size: 14px;
      font-weight: 500;
      border-radius: 6px;
      cursor: pointer;
      transition: all 0.2s ease;

      mat-icon {
        font-size: 20px;
        width: 20px;
        height: 20px;
      }

      &:hover {
        background: #e0e0e0;
      }

      &.active {
        background: var(--action-primary-default, #2196F3);
        color: #fff;
      }
    }
  }

  .btn-create-measure {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: var(--action-primary-default, #2196F3);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s ease;

    .btn-icon {
      font-size: 20px;
      width: 20px;
      height: 20px;
    }
  }
}

// Card View Styles
.measures-wrapper {
  padding: 24px;
}

.kra-section {
  margin-bottom: 32px;

  .kra-section-header {
    margin-bottom: 16px;

    .kra-title-wrapper {
      display: flex;
      align-items: center;
      gap: 12px;

      .kra-title {
        font-size: 18px;
        font-weight: 600;
        color: #333;
        margin: 0;
      }

      .measure-count-badge {
        background: #e3f2fd;
        color: var(--action-primary-default);
        padding: 4px 12px;
        border-radius: 12px;
        font-size: 12px;
        font-weight: 500;
      }
    }
  }
}

.measures-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 16px;
}

.measure-card {
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 16px;
  cursor: pointer;
  transition: all 0.2s ease;

  &:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
  }

  .measure-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;

    .measure-title-section {
      flex: 1;

      .measure-name {
        font-size: 16px;
        font-weight: 600;
        color: #333;
        margin: 0;
      }
    }

    .edit-icon {
      font-size: 20px;
      width: 20px;
      height: 20px;
    }
  }

  .measure-card-body {
    margin-bottom: 12px;

    .measure-description {
      font-size: 14px;
      color: #666;
      line-height: 1.5;
      margin: 0;
    }

    .no-description {
      font-size: 14px;
      color: #999;
      font-style: italic;
      margin: 0;
    }
  }

  .measure-card-footer {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;

    .measure-meta {
      display: flex;
      align-items: center;
      gap: 6px;
      font-size: 13px;

      .meta-label {
        color: #999;
        font-weight: 500;
      }

      .meta-value {
        color: #333;
        font-weight: 600;
      }
    }
  }
}

// Grid View Styles
.grid-view-wrapper {
  padding: 24px;

  .table-container {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  }
}

.measures-table {
  width: 100%;
  border-collapse: collapse;

  thead {
    background: var(--bg-surface);
    color: white;

    tr th {
      padding: 16px;
      text-align: left;
      font-size: 13px;
      font-weight: 600;
      text-transform: capitalize;
      letter-spacing: 0.5px;
      color: var(--text-primary, #1a1a1a);
    }
  }

  tbody {
    tr {
      border-bottom: 1px solid #e0e0e0;
      cursor: pointer;
      transition: background 0.2s ease;

      &:hover {
        background: #f5f5f5;
      }

      &.row-alternate {
        background: #fafafa;

        &:hover {
          background: #f0f0f0;
        }
      }

      td {
        padding: 16px;
        font-size: 14px;
        color: #333;
        vertical-align: top;

        // &:first-child {
        //   font-weight: 600;
        //   color: #1976d2;
        // }
      }
    }
  }
}

// Empty States
.empty-state-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px;
  text-align: center;

  .empty-icon {
    font-size: 48px;
    width: 48px;
    height: 48px;
    color: #ccc;
    margin-bottom: 12px;
  }

  p {
    color: #999;
    font-size: 14px;
    margin: 0;
  }
}

.empty-state-main {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 80px 20px;
  text-align: center;

  .empty-icon-large {
    font-size: 80px;
    width: 80px;
    height: 80px;
    color: #ccc;
    margin-bottom: 20px;
  }

  h3 {
    font-size: 20px;
    font-weight: 600;
    color: #333;
    margin: 0 0 8px 0;
  }

  p {
    color: #999;
    font-size: 14px;
    margin: 0 0 24px 0;
  }

  .btn-create-first {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background:var(--bg-surface);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s ease;

    mat-icon {
      font-size: 20px;
      width: 20px;
      height: 20px;
    }
  }
}