/* Overlay */
.action-panel-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background-color: rgba(0, 0, 0, 0.3);
  display: flex;
  justify-content: flex-end;
  align-items: flex-start;
  padding: 80px 20px 20px 20px;
}

/* Panel Container */
.action-panel {
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
  width: 320px;
  max-height: calc(100vh - 120px);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* Header */
.action-panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;

  padding: 16px 20px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;

  .action-panel-title {
    font-size: 16px;
    font-weight: 600;
    letter-spacing: 0.5px;
  }
}

/* header icon group */
.header-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Trigger icon (inside action panel header) */
.action-trigger-btn {
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;

  width: 28px;
  height: 28px;
  border-radius: 50%;
  transition: all 0.2s ease;

  mat-icon {
    font-size: 20px;
    width: 20px;
    height: 20px;
    color: #ffffff;
  }

  &:hover {
    background-color: rgba(255, 255, 255, 0.25);
    transform: rotate(10deg) scale(1.05);
  }

  &:active {
    transform: scale(0.95);
  }
}

/* Close button */
.close-btn {
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;

  width: 28px;
  height: 28px;
  border-radius: 50%;
  transition: background-color 0.2s;

  &:hover {
    background-color: rgba(255, 255, 255, 0.2);
  }

  mat-icon {
    font-size: 20px;
    width: 20px;
    height: 20px;
    color: #ffffff;
  }
}

/* Loading + Empty */
.action-panel-loading,
.action-panel-empty {
  margin: 12px;
  padding: 12px 14px;

  border-radius: 10px;
  border: 1px solid #e9ecef;
  background: #f8f9fa;

  display: flex;
  align-items: center;
  gap: 10px;

  font-size: 13px;
  color: #495057;

  mat-icon {
    font-size: 18px;
    width: 18px;
    height: 18px;
    color: #667eea;
  }
}

/* spin animation for loading icon */
.spin {
  animation: gb-spin 1s linear infinite;
}

@keyframes gb-spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

/* Action List */
.action-list {
  padding: 12px;
  overflow-y: auto;
  flex: 1;
}

/* Action item */
.action-item {
  display: flex;
  align-items: center;
  width: 100%;

  padding: 14px 16px;
  margin-bottom: 8px;

  background: #f8f9fa;
  border: 1px solid #e9ecef;
  border-radius: 10px;

  cursor: pointer;
  transition: all 0.2s ease;
  text-align: left;

  &:hover {
    background: #e9ecef;
    border-color: #dee2e6;
    transform: translateX(4px);
  }

  &:last-child {
    margin-bottom: 0;
  }

  .action-icon {
    font-size: 22px;
    width: 22px;
    height: 22px;
    margin-right: 14px;
  }

  .action-label {
    flex: 1;
    font-size: 14px;
    font-weight: 500;
    color: #333;
  }

  .arrow-icon {
    font-size: 20px;
    width: 20px;
    height: 20px;
    color: #adb5bd;
    transition: transform 0.2s, color 0.2s;
  }

  &:hover .arrow-icon {
    transform: translateX(4px);
    color: #667eea;
  }
}

/* Data Section */
.data-section {
  margin: 12px;
  padding: 16px;

  background: #f8f9fa;
  border-radius: 10px;
  border: 1px solid #e9ecef;

  .data-title {
    font-weight: 600;
    font-size: 14px;
    color: #667eea;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid #e9ecef;
  }

  .data-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid #f1f3f4;

    &:last-child {
      border-bottom: none;
    }

    .label {
      font-size: 13px;
      color: #6c757d;
    }

    .value {
      font-size: 13px;
      font-weight: 600;
      color: #333;
      max-width: 58%;
      text-align: right;
      word-break: break-word;
    }
  }
}

/* Help Box */
.inline-help-box {
  margin: 12px;
  padding: 16px;

  background: #e3f2fd;
  border: 1px solid #90caf9;
  border-radius: 10px;

  h4 {
    margin: 0 0 8px 0;
    font-size: 14px;
    color: #1565c0;
    display: flex;
    align-items: center;
    gap: 8px;

    mat-icon {
      font-size: 18px;
      width: 18px;
      height: 18px;
    }
  }

  p {
    margin: 0 0 12px 0;
    font-size: 13px;
    color: #1976d2;
  }

  button {
    padding: 8px 16px;
    background: #1976d2;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 13px;
    cursor: pointer;
    transition: background-color 0.2s;

    &:hover {
      background: #1565c0;
    }
  }
}

/* Hidden state */
.hidden {
  display: none !important;
}
